STM32L4xx_HAL_Driver  1.14.0
Peripheral State and Errors functions

SMARTCARD State and Errors functions. More...

Functions

HAL_SMARTCARD_StateTypeDef HAL_SMARTCARD_GetState (SMARTCARD_HandleTypeDef *hsmartcard)
 Return the SMARTCARD handle state. More...
 
uint32_t HAL_SMARTCARD_GetError (SMARTCARD_HandleTypeDef *hsmartcard)
 Return the SMARTCARD handle error code. More...
 

Detailed Description

SMARTCARD State and Errors functions.

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

Function Documentation

◆ HAL_SMARTCARD_GetError()

uint32_t HAL_SMARTCARD_GetError ( SMARTCARD_HandleTypeDef hsmartcard)

Return the SMARTCARD handle error code.

Parameters
hsmartcardPointer to a SMARTCARD_HandleTypeDef structure that contains the configuration information for the specified SMARTCARD module.
Return values
SMARTCARDhandle Error Code

Definition at line 2352 of file stm32l4xx_hal_smartcard.c.

2353 {
2354  return hsmartcard->ErrorCode;
2355 }

◆ HAL_SMARTCARD_GetState()

HAL_SMARTCARD_StateTypeDef HAL_SMARTCARD_GetState ( SMARTCARD_HandleTypeDef hsmartcard)

Return the SMARTCARD handle state.

Parameters
hsmartcardPointer to a SMARTCARD_HandleTypeDef structure that contains the configuration information for the specified SMARTCARD module.
Return values
SMARTCARDhandle state

Definition at line 2335 of file stm32l4xx_hal_smartcard.c.

2336 {
2337  /* Return SMARTCARD handle state */
2338  uint32_t temp1;
2339  uint32_t temp2;
2340  temp1 = (uint32_t)hsmartcard->gState;
2341  temp2 = (uint32_t)hsmartcard->RxState;
2342 
2343  return (HAL_SMARTCARD_StateTypeDef)(temp1 | temp2);
2344 }
__IO HAL_SMARTCARD_StateTypeDef gState
uint32_t HAL_SMARTCARD_StateTypeDef
HAL SMARTCARD State definition.
__IO HAL_SMARTCARD_StateTypeDef RxState