STM32F103xB HAL User Manual
|
Initialization and Configuration functions. More...
Functions | |
HAL_StatusTypeDef | HAL_ADC_Init (ADC_HandleTypeDef *hadc) |
Initializes the ADC peripheral and regular group according to parameters specified in structure "ADC_InitTypeDef". | |
HAL_StatusTypeDef | HAL_ADC_DeInit (ADC_HandleTypeDef *hadc) |
Deinitialize the ADC peripheral registers to their default reset values, with deinitialization of the ADC MSP. | |
__weak void | HAL_ADC_MspInit (ADC_HandleTypeDef *hadc) |
Initializes the ADC MSP. | |
__weak void | HAL_ADC_MspDeInit (ADC_HandleTypeDef *hadc) |
DeInitializes the ADC MSP. | |
HAL_StatusTypeDef | HAL_ADC_RegisterCallback (ADC_HandleTypeDef *hadc, HAL_ADC_CallbackIDTypeDef CallbackID, pADC_CallbackTypeDef pCallback) |
Register a User ADC Callback To be used instead of the weak predefined callback. | |
HAL_StatusTypeDef | HAL_ADC_UnRegisterCallback (ADC_HandleTypeDef *hadc, HAL_ADC_CallbackIDTypeDef CallbackID) |
Unregister a ADC Callback ADC callback is redirected to the weak predefined callback. |
Initialization and Configuration functions.
=============================================================================== ##### Initialization and de-initialization functions ##### =============================================================================== [..] This section provides functions allowing to: (+) Initialize and configure the ADC. (+) De-initialize the ADC.
HAL_StatusTypeDef HAL_ADC_DeInit | ( | ADC_HandleTypeDef * | hadc | ) |
Deinitialize the ADC peripheral registers to their default reset values, with deinitialization of the ADC MSP.
If needed, the example code can be copied and uncommented into function HAL_ADC_MspDeInit().
hadc,: | ADC handle |
HAL | status |
Definition at line 639 of file stm32f1xx_hal_adc.c.
References __HAL_ADC_CLEAR_FLAG, ADC_CLEAR_ERRORCODE, ADC_ConversionStop_Disable(), ADC_FLAG_AWD, ADC_FLAG_EOC, ADC_FLAG_JEOC, ADC_FLAG_JSTRT, ADC_FLAG_STRT, assert_param, HAL_ADC_MspDeInit(), HAL_ADC_STATE_BUSY_INTERNAL, HAL_ADC_STATE_RESET, __ADC_HandleTypeDef::Instance, __ADC_HandleTypeDef::MspDeInitCallback, and __ADC_HandleTypeDef::State.
HAL_StatusTypeDef HAL_ADC_Init | ( | ADC_HandleTypeDef * | hadc | ) |
Initializes the ADC peripheral and regular group according to parameters specified in structure "ADC_InitTypeDef".
hadc,: | ADC handle |
HAL | status |
Definition at line 421 of file stm32f1xx_hal_adc.c.
References ADC_CFGR_EXTSEL, ADC_CLEAR_ERRORCODE, ADC_ConversionStop_Disable(), ADC_CR1_DISCONTINUOUS_NUM, ADC_CR1_SCAN_SET, ADC_CR2_CONTINUOUS, ADC_SCAN_DISABLE, ADC_SCAN_ENABLE, ADC_SQR1_L_SHIFT, ADC_STATE_CLR_SET, assert_param, ADC_InitTypeDef::ContinuousConvMode, __ADC_HandleTypeDef::ConvCpltCallback, __ADC_HandleTypeDef::ConvHalfCpltCallback, ADC_InitTypeDef::DataAlign, ADC_InitTypeDef::DiscontinuousConvMode, __ADC_HandleTypeDef::ErrorCallback, __ADC_HandleTypeDef::ErrorCode, ADC_InitTypeDef::ExternalTrigConv, HAL_ADC_ConvCpltCallback(), HAL_ADC_ConvHalfCpltCallback(), HAL_ADC_ERROR_INTERNAL, HAL_ADC_ErrorCallback(), HAL_ADC_LevelOutOfWindowCallback(), HAL_ADC_MspInit(), HAL_ADC_STATE_BUSY_INTERNAL, HAL_ADC_STATE_ERROR_CONFIG, HAL_ADC_STATE_ERROR_INTERNAL, HAL_ADC_STATE_INJ_BUSY, HAL_ADC_STATE_READY, HAL_ADC_STATE_REG_BUSY, HAL_ADC_STATE_RESET, HAL_ADCEx_InjectedConvCpltCallback(), __ADC_HandleTypeDef::Init, __ADC_HandleTypeDef::InjectedConvCpltCallback, __ADC_HandleTypeDef::Instance, IS_ADC_DATA_ALIGN, IS_ADC_EXTTRIG, IS_ADC_REGULAR_DISCONT_NUMBER, IS_ADC_REGULAR_NB_CONV, IS_ADC_SCAN_MODE, __ADC_HandleTypeDef::LevelOutOfWindowCallback, __ADC_HandleTypeDef::Lock, __ADC_HandleTypeDef::MspInitCallback, ADC_InitTypeDef::NbrOfConversion, ADC_InitTypeDef::NbrOfDiscConversion, ADC_InitTypeDef::ScanConvMode, and __ADC_HandleTypeDef::State.
void HAL_ADC_MspDeInit | ( | ADC_HandleTypeDef * | hadc | ) |
DeInitializes the ADC MSP.
hadc,: | ADC handle |
None |
Definition at line 801 of file stm32f1xx_hal_adc.c.
Referenced by HAL_ADC_DeInit(), and HAL_ADC_UnRegisterCallback().
void HAL_ADC_MspInit | ( | ADC_HandleTypeDef * | hadc | ) |
Initializes the ADC MSP.
hadc,: | ADC handle |
None |
Definition at line 787 of file stm32f1xx_hal_adc.c.
Referenced by HAL_ADC_Init(), and HAL_ADC_UnRegisterCallback().
HAL_StatusTypeDef HAL_ADC_RegisterCallback | ( | ADC_HandleTypeDef * | hadc, |
HAL_ADC_CallbackIDTypeDef | CallbackID, | ||
pADC_CallbackTypeDef | pCallback | ||
) |
Register a User ADC Callback To be used instead of the weak predefined callback.
hadc | Pointer to a ADC_HandleTypeDef structure that contains the configuration information for the specified ADC. |
CallbackID | ID of the callback to be registered This parameter can be one of the following values:
|
pCallback | pointer to the Callback function |
HAL | status |
Definition at line 830 of file stm32f1xx_hal_adc.c.
References __ADC_HandleTypeDef::ConvCpltCallback, __ADC_HandleTypeDef::ConvHalfCpltCallback, __ADC_HandleTypeDef::ErrorCallback, __ADC_HandleTypeDef::ErrorCode, HAL_ADC_CONVERSION_COMPLETE_CB_ID, HAL_ADC_CONVERSION_HALF_CB_ID, HAL_ADC_ERROR_CB_ID, HAL_ADC_ERROR_INVALID_CALLBACK, HAL_ADC_INJ_CONVERSION_COMPLETE_CB_ID, HAL_ADC_LEVEL_OUT_OF_WINDOW_1_CB_ID, HAL_ADC_MSPDEINIT_CB_ID, HAL_ADC_MSPINIT_CB_ID, HAL_ADC_STATE_READY, HAL_ADC_STATE_RESET, __ADC_HandleTypeDef::InjectedConvCpltCallback, __ADC_HandleTypeDef::LevelOutOfWindowCallback, __ADC_HandleTypeDef::MspDeInitCallback, __ADC_HandleTypeDef::MspInitCallback, and __ADC_HandleTypeDef::State.
HAL_StatusTypeDef HAL_ADC_UnRegisterCallback | ( | ADC_HandleTypeDef * | hadc, |
HAL_ADC_CallbackIDTypeDef | CallbackID | ||
) |
Unregister a ADC Callback ADC callback is redirected to the weak predefined callback.
hadc | Pointer to a ADC_HandleTypeDef structure that contains the configuration information for the specified ADC. |
CallbackID | ID of the callback to be unregistered This parameter can be one of the following values:
|
HAL | status |
Definition at line 934 of file stm32f1xx_hal_adc.c.
References __ADC_HandleTypeDef::ConvCpltCallback, __ADC_HandleTypeDef::ConvHalfCpltCallback, __ADC_HandleTypeDef::ErrorCallback, __ADC_HandleTypeDef::ErrorCode, HAL_ADC_ConvCpltCallback(), HAL_ADC_CONVERSION_COMPLETE_CB_ID, HAL_ADC_CONVERSION_HALF_CB_ID, HAL_ADC_ConvHalfCpltCallback(), HAL_ADC_ERROR_CB_ID, HAL_ADC_ERROR_INVALID_CALLBACK, HAL_ADC_ErrorCallback(), HAL_ADC_INJ_CONVERSION_COMPLETE_CB_ID, HAL_ADC_LEVEL_OUT_OF_WINDOW_1_CB_ID, HAL_ADC_LevelOutOfWindowCallback(), HAL_ADC_MspDeInit(), HAL_ADC_MSPDEINIT_CB_ID, HAL_ADC_MspInit(), HAL_ADC_MSPINIT_CB_ID, HAL_ADC_STATE_READY, HAL_ADC_STATE_RESET, HAL_ADCEx_InjectedConvCpltCallback(), __ADC_HandleTypeDef::InjectedConvCpltCallback, __ADC_HandleTypeDef::LevelOutOfWindowCallback, __ADC_HandleTypeDef::MspDeInitCallback, __ADC_HandleTypeDef::MspInitCallback, and __ADC_HandleTypeDef::State.