![]() |
MT7697 API Reference
LinkIt SDK v4
|
This section introduces the Infrared Transmitter(IRTX) APIs including terms and acronyms, supported features, software architecture, details on how to use this driver, IRTX function groups, enums, structures and functions. More...
This section introduces the Infrared Transmitter(IRTX) APIs including terms and acronyms, supported features, software architecture, details on how to use this driver, IRTX function groups, enums, structures and functions.
The following provides descriptions to the terms commonly used in the IRTX driver and how to use its various functions.
| Terms | Details |
|---|---|
| IRTX | Infrared Transmitter is the transmitter element to send infrared radiation. For more information, please refer to introduction to IrDA in Wikipedia . |
Functions | |
| hal_irtx_status_t | hal_irtx_init (void) |
| This function initializes the IRTX hardware clock. More... | |
| hal_irtx_status_t | hal_irtx_deinit (void) |
| This function deinitializes the IRTX hardware clock. More... | |
| hal_irtx_status_t | hal_irtx_send_nec_data (hal_irtx_repeat_code_t repeat_code, const uint8_t data[(12)], uint32_t bit_length) |
| This function sends the data in the NEC encoding format. More... | |
| hal_irtx_status_t | hal_irtx_send_rc5_data (hal_irtx_repeat_code_t repeat_code, const uint8_t data[(12)], uint32_t bit_length) |
| This function sends the data in the RC5 encoding format. More... | |
| hal_irtx_status_t | hal_irtx_send_rc6_data (hal_irtx_repeat_code_t repeat_code, const uint8_t data[(12)], uint32_t bit_length) |
| This function sends the data in the RC6 encoding format. More... | |
| hal_irtx_status_t | hal_irtx_configure_pulse_data_carrier (uint32_t frequency, uint32_t duty_cycle) |
| This function configures the pulse data carrier. More... | |
| hal_irtx_status_t | hal_irtx_register_pulse_data_callback (hal_irtx_pulse_data_callback_t callback, void *user_data) |
| This function registers the PWD encoding format data callback. More... | |
| hal_irtx_status_t | hal_irtx_send_pulse_data (uint32_t base_period, uint8_t *data, uint32_t length) |
| This function sends the data in the PWD encoded format. More... | |
| hal_irtx_status_t | hal_irtx_get_running_status (hal_irtx_running_status_t *running_status) |
| This function gets the current state of the IRTX. More... | |
Modules | |
| Define | |
| Enum | |
| Typedef | |
| hal_irtx_status_t hal_irtx_configure_pulse_data_carrier | ( | uint32_t | frequency, |
| uint32_t | duty_cycle | ||
| ) |
This function configures the pulse data carrier.
| [in] | frequency | pulse data carrier frequency. |
| [in] | duty_cycle | pulse data carrier duty cycle. |
| hal_irtx_status_t hal_irtx_deinit | ( | void | ) |
This function deinitializes the IRTX hardware clock.
| hal_irtx_status_t hal_irtx_get_running_status | ( | hal_irtx_running_status_t * | running_status | ) |
This function gets the current state of the IRTX.
| [out] | running_status | is the current running status. HAL_IRTX_BUSY means the IRTX is in busy state. HAL_IRTX_IDLE means the IRTX is in idle state, which can be used to transfer data immediately. |
| hal_irtx_status_t hal_irtx_init | ( | void | ) |
This function initializes the IRTX hardware clock.
| hal_irtx_status_t hal_irtx_register_pulse_data_callback | ( | hal_irtx_pulse_data_callback_t | callback, |
| void * | user_data | ||
| ) |
This function registers the PWD encoding format data callback.
Call it after the transmission is complete.
| [in] | callback | user defined callback function. |
| [in] | user_data | a user defined extension data. |
| hal_irtx_status_t hal_irtx_send_nec_data | ( | hal_irtx_repeat_code_t | repeat_code, |
| const uint8_t | data[(12)], | ||
| uint32_t | bit_length | ||
| ) |
This function sends the data in the NEC encoding format.
| [in] | repeat_code | repeat code for the NEC IRTX. |
| [in] | data | data to be sent. |
| [in] | bit_length | the number of bits in the message. |
| hal_irtx_status_t hal_irtx_send_pulse_data | ( | uint32_t | base_period, |
| uint8_t * | data, | ||
| uint32_t | length | ||
| ) |
This function sends the data in the PWD encoded format.
| [in] | base_period | the base period for sending data. |
| [in] | data | the data content to be sent. |
| [in] | length | data length in bytes. |
| hal_irtx_status_t hal_irtx_send_rc5_data | ( | hal_irtx_repeat_code_t | repeat_code, |
| const uint8_t | data[(12)], | ||
| uint32_t | bit_length | ||
| ) |
This function sends the data in the RC5 encoding format.
| [in] | repeat_code | repeat code for the RC5 IRTX. |
| [in] | data | the data content to be sent. |
| [in] | bit_length | the number of bits in the message. |
| hal_irtx_status_t hal_irtx_send_rc6_data | ( | hal_irtx_repeat_code_t | repeat_code, |
| const uint8_t | data[(12)], | ||
| uint32_t | bit_length | ||
| ) |
This function sends the data in the RC6 encoding format.
| [in] | repeat_code | repeat code for the RC6 IRTX. |
| [in] | data | the data content to be sent. |
| [in] | bit_length | the number of bits in the message. |