Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Initialization and de-initialization functions
[IRDA Exported Functions]
Initialization and Configuration functions. More...
Functions | |
HAL_StatusTypeDef | HAL_IRDA_Init (IRDA_HandleTypeDef *hirda) |
Initialize the IRDA mode according to the specified parameters in the IRDA_InitTypeDef and initialize the associated handle. | |
HAL_StatusTypeDef | HAL_IRDA_DeInit (IRDA_HandleTypeDef *hirda) |
DeInitialize the IRDA peripheral. | |
__weak void | HAL_IRDA_MspInit (IRDA_HandleTypeDef *hirda) |
Initialize the IRDA MSP. | |
__weak void | HAL_IRDA_MspDeInit (IRDA_HandleTypeDef *hirda) |
DeInitialize the IRDA MSP. |
Detailed Description
Initialization and Configuration functions.
============================================================================== ##### Initialization and Configuration functions ##### ============================================================================== [..] This subsection provides a set of functions allowing to initialize the USARTx in asynchronous IRDA mode. (+) For the asynchronous mode only these parameters can be configured: (++) Baud Rate (++) Word Length (++) 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. (++) Power mode (++) Prescaler setting (++) Receiver/transmitter modes [..] The HAL_IRDA_Init() API follows the USART asynchronous configuration procedures (details for the procedures are available in reference manual).
Depending on the frame length defined by the M1 and M0 bits (7-bit, 8-bit or 9-bit), the possible IRDA frame formats are listed in the following table.
Table 1. IRDA frame format. +-----------------------------------------------------------------------+ | M1 bit | M0 bit | PCE bit | IRDA frame | |---------|---------|-----------|---------------------------------------| | 0 | 0 | 0 | | SB | 8 bit data | STB | | |---------|---------|-----------|---------------------------------------| | 0 | 0 | 1 | | SB | 7 bit data | PB | STB | | |---------|---------|-----------|---------------------------------------| | 0 | 1 | 0 | | SB | 9 bit data | STB | | |---------|---------|-----------|---------------------------------------| | 0 | 1 | 1 | | SB | 8 bit data | PB | STB | | |---------|---------|-----------|---------------------------------------| | 1 | 0 | 0 | | SB | 7 bit data | STB | | |---------|---------|-----------|---------------------------------------| | 1 | 0 | 1 | | SB | 6 bit data | PB | STB | | +-----------------------------------------------------------------------+
Function Documentation
HAL_StatusTypeDef HAL_IRDA_DeInit | ( | IRDA_HandleTypeDef * | hirda ) |
DeInitialize the IRDA peripheral.
- Parameters:
-
hirda,: Pointer to a IRDA_HandleTypeDef structure that contains the configuration information for the specified IRDA module.
- Return values:
-
HAL status
Definition at line 303 of file stm32l4xx_hal_irda.c.
HAL_StatusTypeDef HAL_IRDA_Init | ( | IRDA_HandleTypeDef * | hirda ) |
Initialize the IRDA mode according to the specified parameters in the IRDA_InitTypeDef and initialize the associated handle.
- Parameters:
-
hirda,: Pointer to a IRDA_HandleTypeDef structure that contains the configuration information for the specified IRDA module.
- Return values:
-
HAL status
Definition at line 250 of file stm32l4xx_hal_irda.c.
__weak void HAL_IRDA_MspDeInit | ( | IRDA_HandleTypeDef * | hirda ) |
DeInitialize the IRDA MSP.
- Parameters:
-
hirda,: Pointer to a IRDA_HandleTypeDef structure that contains the configuration information for the specified IRDA module.
- Return values:
-
None
Definition at line 353 of file stm32l4xx_hal_irda.c.
__weak void HAL_IRDA_MspInit | ( | IRDA_HandleTypeDef * | hirda ) |
Initialize the IRDA MSP.
- Parameters:
-
hirda,: Pointer to a IRDA_HandleTypeDef structure that contains the configuration information for the specified IRDA module.
- Return values:
-
None
Definition at line 337 of file stm32l4xx_hal_irda.c.
Generated on Tue Jul 12 2022 11:00:04 by
