STM32F103xB HAL User Manual
|
Initialization and Configuration functions. More...
Functions | |
HAL_StatusTypeDef | HAL_IRDA_Init (IRDA_HandleTypeDef *hirda) |
Initializes the IRDA mode according to the specified parameters in the IRDA_InitTypeDef and create the associated handle. | |
HAL_StatusTypeDef | HAL_IRDA_DeInit (IRDA_HandleTypeDef *hirda) |
DeInitializes the IRDA peripheral. | |
__weak void | HAL_IRDA_MspInit (IRDA_HandleTypeDef *hirda) |
IRDA MSP Init. | |
__weak void | HAL_IRDA_MspDeInit (IRDA_HandleTypeDef *hirda) |
IRDA MSP DeInit. | |
HAL_StatusTypeDef | HAL_IRDA_RegisterCallback (IRDA_HandleTypeDef *hirda, HAL_IRDA_CallbackIDTypeDef CallbackID, pIRDA_CallbackTypeDef pCallback) |
Register a User IRDA Callback To be used instead of the weak predefined callback. | |
HAL_StatusTypeDef | HAL_IRDA_UnRegisterCallback (IRDA_HandleTypeDef *hirda, HAL_IRDA_CallbackIDTypeDef CallbackID) |
Unregister an IRDA callback IRDA callback is redirected to the weak predefined callback. |
Initialization and Configuration functions.
============================================================================== ##### Initialization and Configuration functions ##### ============================================================================== [..] This subsection provides a set of functions allowing to initialize the USARTx or the UARTy in asynchronous IrDA mode. (+) For the asynchronous mode only these parameters can be configured: (++) BaudRate (++) WordLength (++) Parity: If the parity is enabled, then the MSB bit of the data written in the data register is transmitted but is changed by the parity bit. Depending on the frame length defined by the M bit (8-bits or 9-bits), please refer to Reference manual for possible IRDA frame formats. (++) Prescaler: A pulse of width less than two and greater than one PSC period(s) may or may not be rejected. The receiver set up time should be managed by software. The IrDA physical layer specification specifies a minimum of 10 ms delay between transmission and reception (IrDA is a half duplex protocol). (++) Mode: Receiver/transmitter modes (++) IrDAMode: the IrDA can operate in the Normal mode or in the Low power mode. [..] The HAL_IRDA_Init() API follows IRDA configuration procedures (details for the procedures are available in reference manual).
HAL_StatusTypeDef HAL_IRDA_DeInit | ( | IRDA_HandleTypeDef * | hirda | ) |
DeInitializes the IRDA peripheral.
hirda | Pointer to a IRDA_HandleTypeDef structure that contains the configuration information for the specified IRDA module. |
HAL | status |
Definition at line 366 of file stm32f1xx_hal_irda.c.
References __HAL_IRDA_DISABLE, assert_param, __IRDA_HandleTypeDef::ErrorCode, __IRDA_HandleTypeDef::gState, HAL_IRDA_ERROR_NONE, HAL_IRDA_MspDeInit(), HAL_IRDA_STATE_BUSY, HAL_IRDA_STATE_RESET, __IRDA_HandleTypeDef::Instance, __IRDA_HandleTypeDef::MspDeInitCallback, and __IRDA_HandleTypeDef::RxState.
HAL_StatusTypeDef HAL_IRDA_Init | ( | IRDA_HandleTypeDef * | hirda | ) |
Initializes the IRDA mode according to the specified parameters in the IRDA_InitTypeDef and create the associated handle.
hirda | Pointer to a IRDA_HandleTypeDef structure that contains the configuration information for the specified IRDA module. |
HAL | status |
Definition at line 292 of file stm32f1xx_hal_irda.c.
References __HAL_IRDA_DISABLE, __HAL_IRDA_ENABLE, assert_param, __IRDA_HandleTypeDef::ErrorCode, __IRDA_HandleTypeDef::gState, HAL_IRDA_ERROR_NONE, HAL_IRDA_MspInit(), HAL_IRDA_STATE_BUSY, HAL_IRDA_STATE_READY, HAL_IRDA_STATE_RESET, __IRDA_HandleTypeDef::Init, __IRDA_HandleTypeDef::Instance, IRDA_InitCallbacksToDefault(), IRDA_SetConfig(), IRDA_InitTypeDef::IrDAMode, IS_IRDA_POWERMODE, __IRDA_HandleTypeDef::Lock, __IRDA_HandleTypeDef::MspInitCallback, IRDA_InitTypeDef::Prescaler, and __IRDA_HandleTypeDef::RxState.
void HAL_IRDA_MspDeInit | ( | IRDA_HandleTypeDef * | hirda | ) |
IRDA MSP DeInit.
hirda | Pointer to a IRDA_HandleTypeDef structure that contains the configuration information for the specified IRDA module. |
None |
Definition at line 427 of file stm32f1xx_hal_irda.c.
Referenced by HAL_IRDA_DeInit(), and HAL_IRDA_UnRegisterCallback().
void HAL_IRDA_MspInit | ( | IRDA_HandleTypeDef * | hirda | ) |
IRDA MSP Init.
hirda | Pointer to a IRDA_HandleTypeDef structure that contains the configuration information for the specified IRDA module. |
None |
Definition at line 411 of file stm32f1xx_hal_irda.c.
Referenced by HAL_IRDA_Init(), and HAL_IRDA_UnRegisterCallback().
HAL_StatusTypeDef HAL_IRDA_RegisterCallback | ( | IRDA_HandleTypeDef * | hirda, |
HAL_IRDA_CallbackIDTypeDef | CallbackID, | ||
pIRDA_CallbackTypeDef | pCallback | ||
) |
Register a User IRDA Callback To be used instead of the weak predefined callback.
hirda | irda handle |
CallbackID | ID of the callback to be registered This parameter can be one of the following values:
|
pCallback | pointer to the Callback function |
HAL | status |
Definition at line 457 of file stm32f1xx_hal_irda.c.
References __IRDA_HandleTypeDef::AbortCpltCallback, __IRDA_HandleTypeDef::AbortReceiveCpltCallback, __IRDA_HandleTypeDef::AbortTransmitCpltCallback, __IRDA_HandleTypeDef::ErrorCallback, __IRDA_HandleTypeDef::ErrorCode, __IRDA_HandleTypeDef::gState, HAL_IRDA_ABORT_COMPLETE_CB_ID, HAL_IRDA_ABORT_RECEIVE_COMPLETE_CB_ID, HAL_IRDA_ABORT_TRANSMIT_COMPLETE_CB_ID, HAL_IRDA_ERROR_CB_ID, HAL_IRDA_ERROR_INVALID_CALLBACK, HAL_IRDA_MSPDEINIT_CB_ID, HAL_IRDA_MSPINIT_CB_ID, HAL_IRDA_RX_COMPLETE_CB_ID, HAL_IRDA_RX_HALFCOMPLETE_CB_ID, HAL_IRDA_STATE_READY, HAL_IRDA_STATE_RESET, HAL_IRDA_TX_COMPLETE_CB_ID, HAL_IRDA_TX_HALFCOMPLETE_CB_ID, __IRDA_HandleTypeDef::MspDeInitCallback, __IRDA_HandleTypeDef::MspInitCallback, __IRDA_HandleTypeDef::RxCpltCallback, __IRDA_HandleTypeDef::RxHalfCpltCallback, __IRDA_HandleTypeDef::TxCpltCallback, and __IRDA_HandleTypeDef::TxHalfCpltCallback.
HAL_StatusTypeDef HAL_IRDA_UnRegisterCallback | ( | IRDA_HandleTypeDef * | hirda, |
HAL_IRDA_CallbackIDTypeDef | CallbackID | ||
) |
Unregister an IRDA callback IRDA callback is redirected to the weak predefined callback.
hirda | irda handle |
CallbackID | ID of the callback to be unregistered This parameter can be one of the following values:
|
HAL | status |
Definition at line 578 of file stm32f1xx_hal_irda.c.
References __IRDA_HandleTypeDef::AbortCpltCallback, __IRDA_HandleTypeDef::AbortReceiveCpltCallback, __IRDA_HandleTypeDef::AbortTransmitCpltCallback, __IRDA_HandleTypeDef::ErrorCallback, __IRDA_HandleTypeDef::ErrorCode, __IRDA_HandleTypeDef::gState, HAL_IRDA_ABORT_COMPLETE_CB_ID, HAL_IRDA_ABORT_RECEIVE_COMPLETE_CB_ID, HAL_IRDA_ABORT_TRANSMIT_COMPLETE_CB_ID, HAL_IRDA_AbortCpltCallback(), HAL_IRDA_AbortReceiveCpltCallback(), HAL_IRDA_AbortTransmitCpltCallback(), HAL_IRDA_ERROR_CB_ID, HAL_IRDA_ERROR_INVALID_CALLBACK, HAL_IRDA_ErrorCallback(), HAL_IRDA_MspDeInit(), HAL_IRDA_MSPDEINIT_CB_ID, HAL_IRDA_MspInit(), HAL_IRDA_MSPINIT_CB_ID, HAL_IRDA_RX_COMPLETE_CB_ID, HAL_IRDA_RX_HALFCOMPLETE_CB_ID, HAL_IRDA_RxCpltCallback(), HAL_IRDA_RxHalfCpltCallback(), HAL_IRDA_STATE_READY, HAL_IRDA_STATE_RESET, HAL_IRDA_TX_COMPLETE_CB_ID, HAL_IRDA_TX_HALFCOMPLETE_CB_ID, HAL_IRDA_TxCpltCallback(), HAL_IRDA_TxHalfCpltCallback(), __IRDA_HandleTypeDef::MspDeInitCallback, __IRDA_HandleTypeDef::MspInitCallback, __IRDA_HandleTypeDef::RxCpltCallback, __IRDA_HandleTypeDef::RxHalfCpltCallback, __IRDA_HandleTypeDef::TxCpltCallback, and __IRDA_HandleTypeDef::TxHalfCpltCallback.