Initialization and Configuration functions.
More...
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_IRDA_DeInit()
DeInitializes the IRDA peripheral.
- Parameters
-
hirda | Pointer to a IRDA_HandleTypeDef structure that contains the configuration information for the specified IRDA module. |
- Return values
-
Definition at line 367 of file stm32f4xx_hal_irda.c.
◆ HAL_IRDA_Init()
Initializes the IRDA mode according to the specified parameters in the IRDA_InitTypeDef and create the associated handle.
- Parameters
-
hirda | Pointer to a IRDA_HandleTypeDef structure that contains the configuration information for the specified IRDA module. |
- Return values
-
Definition at line 293 of file stm32f4xx_hal_irda.c.
◆ HAL_IRDA_MspDeInit()
IRDA MSP DeInit.
- Parameters
-
hirda | Pointer to a IRDA_HandleTypeDef structure that contains the configuration information for the specified IRDA module. |
- Return values
-
Definition at line 428 of file stm32f4xx_hal_irda.c.
◆ HAL_IRDA_MspInit()
IRDA MSP Init.
- Parameters
-
hirda | Pointer to a IRDA_HandleTypeDef structure that contains the configuration information for the specified IRDA module. |
- Return values
-
Definition at line 412 of file stm32f4xx_hal_irda.c.
◆ HAL_IRDA_RegisterCallback()
Register a User IRDA Callback To be used instead of the weak predefined callback.
- Note
- The HAL_IRDA_RegisterCallback() may be called before HAL_IRDA_Init() in HAL_IRDA_STATE_RESET to register callbacks for HAL_IRDA_MSPINIT_CB_ID and HAL_IRDA_MSPDEINIT_CB_ID
- Parameters
-
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 |
- Return values
-
Definition at line 460 of file stm32f4xx_hal_irda.c.
◆ HAL_IRDA_UnRegisterCallback()
Unregister an IRDA callback IRDA callback is redirected to the weak predefined callback.
- Note
- The HAL_IRDA_UnRegisterCallback() may be called before HAL_IRDA_Init() in HAL_IRDA_STATE_RESET to un-register callbacks for HAL_IRDA_MSPINIT_CB_ID and HAL_IRDA_MSPDEINIT_CB_ID
- Parameters
-
hirda | irda handle |
CallbackID | ID of the callback to be unregistered This parameter can be one of the following values:
|
- Return values
-
Definition at line 578 of file stm32f4xx_hal_irda.c.