STM32L4xx_HAL_Driver  1.14.0
Peripheral State and Error functions

IRDA State and Errors functions. More...

Functions

HAL_IRDA_StateTypeDef HAL_IRDA_GetState (IRDA_HandleTypeDef *hirda)
 Return the IRDA handle state. More...
 
uint32_t HAL_IRDA_GetError (IRDA_HandleTypeDef *hirda)
 Return the IRDA handle error code. More...
 

Detailed Description

IRDA State and Errors functions.

  ==============================================================================
            ##### Peripheral State and Error functions #####
  ==============================================================================
  [..]
    This subsection provides a set of functions allowing to return the State of IrDA
    communication process and also return Peripheral Errors occurred during communication process
     (+) HAL_IRDA_GetState() API can be helpful to check in run-time the state
         of the IRDA peripheral handle.
     (+) HAL_IRDA_GetError() checks in run-time errors that could occur during
         communication.

Function Documentation

◆ HAL_IRDA_GetError()

uint32_t HAL_IRDA_GetError ( IRDA_HandleTypeDef hirda)

Return the IRDA handle error code.

Parameters
hirdaPointer to a IRDA_HandleTypeDef structure that contains the configuration information for the specified IRDA module.
Return values
IRDAError Code

Definition at line 2232 of file stm32l4xx_hal_irda.c.

2233 {
2234  return hirda->ErrorCode;
2235 }

◆ HAL_IRDA_GetState()

HAL_IRDA_StateTypeDef HAL_IRDA_GetState ( IRDA_HandleTypeDef hirda)

Return the IRDA handle state.

Parameters
hirdaPointer to a IRDA_HandleTypeDef structure that contains the configuration information for the specified IRDA module.
Return values
HALstate

Definition at line 2215 of file stm32l4xx_hal_irda.c.

2216 {
2217  /* Return IRDA handle state */
2218  uint32_t temp1;
2219  uint32_t temp2;
2220  temp1 = (uint32_t)hirda->gState;
2221  temp2 = (uint32_t)hirda->RxState;
2222 
2223  return (HAL_IRDA_StateTypeDef)(temp1 | temp2);
2224 }
uint32_t HAL_IRDA_StateTypeDef
HAL IRDA State definition.