TUKS MCU Introductory course / TUKS-COURSE-2-LED
Embed: (wiki syntax)

« Back to documentation index

Initialization and de-initialization functions

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:
HALstatus

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:
HALstatus

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.