STM32L486xx HAL User Manual
Functions
Peripheral State functions
ADC Exported Functions

ADC Peripheral State functions. More...

Functions

uint32_t HAL_ADC_GetState (ADC_HandleTypeDef *hadc)
 Return the ADC handle state.
uint32_t HAL_ADC_GetError (ADC_HandleTypeDef *hadc)
 Return the ADC error code.

Detailed Description

ADC Peripheral State functions.

 ===============================================================================
            ##### Peripheral state and errors functions #####
 ===============================================================================
    [..]
    This subsection provides functions to get in run-time the status of the  
    peripheral.
      (+) Check the ADC state
      (+) Check the ADC error code


Function Documentation

uint32_t HAL_ADC_GetError ( ADC_HandleTypeDef hadc)

Return the ADC error code.

Parameters:
hadcADC handle
Return values:
ADCerror code (bitfield on 32 bits)

Definition at line 3037 of file stm32l4xx_hal_adc.c.

References assert_param, __ADC_HandleTypeDef::ErrorCode, and __ADC_HandleTypeDef::Instance.

uint32_t HAL_ADC_GetState ( ADC_HandleTypeDef hadc)

Return the ADC handle state.

Note:
ADC state machine is managed by bitfields, ADC status must be compared with states bits. For example: " if (HAL_IS_BIT_SET(HAL_ADC_GetState(hadc1), HAL_ADC_STATE_REG_BUSY)) " " if (HAL_IS_BIT_SET(HAL_ADC_GetState(hadc1), HAL_ADC_STATE_AWD1) ) "
Parameters:
hadcADC handle
Return values:
ADChandle state (bitfield on 32 bits)

Definition at line 3023 of file stm32l4xx_hal_adc.c.

References assert_param, __ADC_HandleTypeDef::Instance, and __ADC_HandleTypeDef::State.