STM32F4xx HAL Documentation
Hardware Abstraction Layer for STM32F4 familiy
|
IO operation functions. More...
Functions | |
HAL_StatusTypeDef | HAL_ADC_Start (ADC_HandleTypeDef *hadc) |
Enables ADC and starts conversion of the regular channels. | |
HAL_StatusTypeDef | HAL_ADC_Stop (ADC_HandleTypeDef *hadc) |
Disables ADC and stop conversion of regular channels. | |
HAL_StatusTypeDef | HAL_ADC_PollForConversion (ADC_HandleTypeDef *hadc, uint32_t Timeout) |
Poll for regular conversion complete. | |
HAL_StatusTypeDef | HAL_ADC_PollForEvent (ADC_HandleTypeDef *hadc, uint32_t EventType, uint32_t Timeout) |
Poll for conversion event. | |
HAL_StatusTypeDef | HAL_ADC_Start_IT (ADC_HandleTypeDef *hadc) |
Enables the interrupt and starts ADC conversion of regular channels. | |
HAL_StatusTypeDef | HAL_ADC_Stop_IT (ADC_HandleTypeDef *hadc) |
Disables the interrupt and stop ADC conversion of regular channels. | |
void | HAL_ADC_IRQHandler (ADC_HandleTypeDef *hadc) |
Handles ADC interrupt request. | |
HAL_StatusTypeDef | HAL_ADC_Start_DMA (ADC_HandleTypeDef *hadc, uint32_t *pData, uint32_t Length) |
Enables ADC DMA request after last transfer (Single-ADC mode) and enables ADC peripheral. | |
HAL_StatusTypeDef | HAL_ADC_Stop_DMA (ADC_HandleTypeDef *hadc) |
Disables ADC DMA (Single-ADC mode) and disables ADC peripheral. | |
uint32_t | HAL_ADC_GetValue (ADC_HandleTypeDef *hadc) |
Gets the converted value from data register of regular channel. | |
void | HAL_ADC_ConvCpltCallback (ADC_HandleTypeDef *hadc) |
Regular conversion complete callback in non blocking mode. | |
void | HAL_ADC_ConvHalfCpltCallback (ADC_HandleTypeDef *hadc) |
Regular conversion half DMA transfer callback in non blocking mode. | |
void | HAL_ADC_LevelOutOfWindowCallback (ADC_HandleTypeDef *hadc) |
Analog watchdog callback in non blocking mode. | |
void | HAL_ADC_ErrorCallback (ADC_HandleTypeDef *hadc) |
Error ADC callback. | |
IO operation functions.
=============================================================================== ##### IO operation functions ##### =============================================================================== [..] This section provides functions allowing to: (+) Start conversion of regular channel. (+) Stop conversion of regular channel. (+) Start conversion of regular channel and enable interrupt. (+) Stop conversion of regular channel and disable interrupt. (+) Start conversion of regular channel and enable DMA transfer. (+) Stop conversion of regular channel and disable DMA transfer. (+) Handle ADC interrupt request.
HAL_StatusTypeDef HAL_ADC_Start | ( | ADC_HandleTypeDef * | hadc | ) |
#include <stm32f4xx_hal_adc.h>
Enables ADC and starts conversion of the regular channels.
hadc | pointer to a ADC_HandleTypeDef structure that contains the configuration information for the specified ADC. |
HAL | status |
Definition at line 716 of file stm32f4xx_hal_adc.c.
References __HAL_ADC_CLEAR_FLAG, __HAL_ADC_ENABLE, __HAL_LOCK, __HAL_UNLOCK, ADC_CLEAR_ERRORCODE, ADC_COMMON_REGISTER, ADC_FLAG_EOC, ADC_FLAG_OVR, ADC_STAB_DELAY_US, ADC_STATE_CLR_SET, assert_param, ADC_InitTypeDef::ContinuousConvMode, ADC_HandleTypeDef::ErrorCode, ADC_InitTypeDef::ExternalTrigConvEdge, HAL_ADC_ERROR_DMA, HAL_ADC_ERROR_INTERNAL, HAL_ADC_ERROR_OVR, HAL_ADC_STATE_ERROR_INTERNAL, HAL_ADC_STATE_INJ_BUSY, HAL_ADC_STATE_INJ_EOC, HAL_ADC_STATE_READY, HAL_ADC_STATE_REG_BUSY, HAL_ADC_STATE_REG_EOC, HAL_ADC_STATE_REG_OVR, HAL_IS_BIT_CLR, HAL_IS_BIT_SET, HAL_OK, ADC_HandleTypeDef::Init, ADC_HandleTypeDef::Instance, IS_ADC_EXT_TRIG_EDGE, and ADC_HandleTypeDef::State.
HAL_StatusTypeDef HAL_ADC_Stop | ( | ADC_HandleTypeDef * | hadc | ) |
#include <stm32f4xx_hal_adc.h>
Disables ADC and stop conversion of regular channels.
hadc | pointer to a ADC_HandleTypeDef structure that contains the configuration information for the specified ADC. |
HAL | status. |
Definition at line 839 of file stm32f4xx_hal_adc.c.
References __HAL_ADC_DISABLE, __HAL_LOCK, __HAL_UNLOCK, ADC_STATE_CLR_SET, assert_param, HAL_ADC_STATE_INJ_BUSY, HAL_ADC_STATE_READY, HAL_ADC_STATE_REG_BUSY, HAL_IS_BIT_CLR, HAL_OK, ADC_HandleTypeDef::Instance, and ADC_HandleTypeDef::State.
HAL_StatusTypeDef HAL_ADC_PollForConversion | ( | ADC_HandleTypeDef * | hadc, |
uint32_t | Timeout ) |
#include <stm32f4xx_hal_adc.h>
Poll for regular conversion complete.
hadc | pointer to a ADC_HandleTypeDef structure that contains the configuration information for the specified ADC. |
Timeout | Timeout value in millisecond. |
HAL | status |
Definition at line 882 of file stm32f4xx_hal_adc.c.
References __HAL_ADC_CLEAR_FLAG, __HAL_ADC_GET_FLAG, __HAL_UNLOCK, ADC_FLAG_EOC, ADC_FLAG_STRT, ADC_IS_SOFTWARE_START_REGULAR, ADC_InitTypeDef::ContinuousConvMode, HAL_ADC_STATE_ERROR_CONFIG, HAL_ADC_STATE_INJ_BUSY, HAL_ADC_STATE_READY, HAL_ADC_STATE_REG_BUSY, HAL_ADC_STATE_REG_EOC, HAL_ADC_STATE_TIMEOUT, HAL_ERROR, HAL_GetTick(), HAL_IS_BIT_CLR, HAL_IS_BIT_SET, HAL_MAX_DELAY, HAL_OK, HAL_TIMEOUT, ADC_HandleTypeDef::Init, ADC_HandleTypeDef::Instance, and ADC_HandleTypeDef::State.
HAL_StatusTypeDef HAL_ADC_PollForEvent | ( | ADC_HandleTypeDef * | hadc, |
uint32_t | EventType, | ||
uint32_t | Timeout ) |
#include <stm32f4xx_hal_adc.h>
Poll for conversion event.
hadc | pointer to a ADC_HandleTypeDef structure that contains the configuration information for the specified ADC. |
EventType | the ADC event type. This parameter can be one of the following values:
|
Timeout | Timeout value in millisecond. |
HAL | status |
Definition at line 971 of file stm32f4xx_hal_adc.c.
References __HAL_ADC_CLEAR_FLAG, __HAL_ADC_GET_FLAG, __HAL_UNLOCK, ADC_AWD_EVENT, ADC_FLAG_AWD, ADC_FLAG_OVR, assert_param, ADC_HandleTypeDef::ErrorCode, HAL_ADC_ERROR_OVR, HAL_ADC_STATE_AWD1, HAL_ADC_STATE_REG_OVR, HAL_ADC_STATE_TIMEOUT, HAL_GetTick(), HAL_MAX_DELAY, HAL_OK, HAL_TIMEOUT, ADC_HandleTypeDef::Instance, IS_ADC_EVENT_TYPE, and ADC_HandleTypeDef::State.
HAL_StatusTypeDef HAL_ADC_Start_IT | ( | ADC_HandleTypeDef * | hadc | ) |
#include <stm32f4xx_hal_adc.h>
Enables the interrupt and starts ADC conversion of regular channels.
hadc | pointer to a ADC_HandleTypeDef structure that contains the configuration information for the specified ADC. |
HAL | status. |
Definition at line 1037 of file stm32f4xx_hal_adc.c.
References __HAL_ADC_CLEAR_FLAG, __HAL_ADC_ENABLE, __HAL_ADC_ENABLE_IT, __HAL_LOCK, __HAL_UNLOCK, ADC_CLEAR_ERRORCODE, ADC_COMMON_REGISTER, ADC_FLAG_EOC, ADC_FLAG_OVR, ADC_IT_EOC, ADC_IT_OVR, ADC_STAB_DELAY_US, ADC_STATE_CLR_SET, assert_param, ADC_InitTypeDef::ContinuousConvMode, ADC_HandleTypeDef::ErrorCode, ADC_InitTypeDef::ExternalTrigConvEdge, HAL_ADC_ERROR_DMA, HAL_ADC_ERROR_INTERNAL, HAL_ADC_ERROR_OVR, HAL_ADC_STATE_ERROR_INTERNAL, HAL_ADC_STATE_INJ_BUSY, HAL_ADC_STATE_INJ_EOC, HAL_ADC_STATE_READY, HAL_ADC_STATE_REG_BUSY, HAL_ADC_STATE_REG_EOC, HAL_ADC_STATE_REG_OVR, HAL_IS_BIT_CLR, HAL_IS_BIT_SET, HAL_OK, ADC_HandleTypeDef::Init, ADC_HandleTypeDef::Instance, IS_ADC_EXT_TRIG_EDGE, and ADC_HandleTypeDef::State.
HAL_StatusTypeDef HAL_ADC_Stop_IT | ( | ADC_HandleTypeDef * | hadc | ) |
#include <stm32f4xx_hal_adc.h>
Disables the interrupt and stop ADC conversion of regular channels.
hadc | pointer to a ADC_HandleTypeDef structure that contains the configuration information for the specified ADC. |
HAL | status. |
Definition at line 1162 of file stm32f4xx_hal_adc.c.
References __HAL_ADC_DISABLE, __HAL_ADC_DISABLE_IT, __HAL_LOCK, __HAL_UNLOCK, ADC_IT_EOC, ADC_IT_OVR, ADC_STATE_CLR_SET, assert_param, HAL_ADC_STATE_INJ_BUSY, HAL_ADC_STATE_READY, HAL_ADC_STATE_REG_BUSY, HAL_IS_BIT_CLR, HAL_OK, ADC_HandleTypeDef::Instance, and ADC_HandleTypeDef::State.
void HAL_ADC_IRQHandler | ( | ADC_HandleTypeDef * | hadc | ) |
#include <stm32f4xx_hal_adc.h>
Handles ADC interrupt request.
hadc | pointer to a ADC_HandleTypeDef structure that contains the configuration information for the specified ADC. |
None |
Definition at line 1199 of file stm32f4xx_hal_adc.c.
References __HAL_ADC_CLEAR_FLAG, __HAL_ADC_DISABLE_IT, __HAL_ADC_GET_FLAG, ADC_FLAG_AWD, ADC_FLAG_EOC, ADC_FLAG_JEOC, ADC_FLAG_JSTRT, ADC_FLAG_OVR, ADC_FLAG_STRT, ADC_IS_SOFTWARE_START_INJECTED, ADC_IS_SOFTWARE_START_REGULAR, ADC_IT_AWD, ADC_IT_EOC, ADC_IT_JEOC, ADC_IT_OVR, assert_param, ADC_InitTypeDef::ContinuousConvMode, ADC_InitTypeDef::EOCSelection, ADC_HandleTypeDef::ErrorCode, HAL_ADC_ConvCpltCallback(), HAL_ADC_ERROR_OVR, HAL_ADC_ErrorCallback(), HAL_ADC_LevelOutOfWindowCallback(), HAL_ADC_STATE_AWD1, HAL_ADC_STATE_ERROR_INTERNAL, HAL_ADC_STATE_INJ_BUSY, HAL_ADC_STATE_INJ_EOC, HAL_ADC_STATE_READY, HAL_ADC_STATE_REG_BUSY, HAL_ADC_STATE_REG_EOC, HAL_ADCEx_InjectedConvCpltCallback(), HAL_IS_BIT_CLR, ADC_HandleTypeDef::Init, ADC_HandleTypeDef::Instance, IS_ADC_EOCSelection, IS_ADC_REGULAR_LENGTH, ADC_InitTypeDef::NbrOfConversion, and ADC_HandleTypeDef::State.
HAL_StatusTypeDef HAL_ADC_Start_DMA | ( | ADC_HandleTypeDef * | hadc, |
uint32_t * | pData, | ||
uint32_t | Length ) |
#include <stm32f4xx_hal_adc.h>
Enables ADC DMA request after last transfer (Single-ADC mode) and enables ADC peripheral.
hadc | pointer to a ADC_HandleTypeDef structure that contains the configuration information for the specified ADC. |
pData | The destination Buffer address. |
Length | The length of data to be transferred from ADC peripheral to memory. |
HAL | status |
Definition at line 1364 of file stm32f4xx_hal_adc.c.
References __HAL_ADC_CLEAR_FLAG, __HAL_ADC_ENABLE, __HAL_ADC_ENABLE_IT, __HAL_LOCK, __HAL_UNLOCK, ADC_CLEAR_ERRORCODE, ADC_COMMON_REGISTER, ADC_DMAConvCplt(), ADC_DMAError(), ADC_DMAHalfConvCplt(), ADC_FLAG_EOC, ADC_FLAG_OVR, ADC_IT_OVR, ADC_STAB_DELAY_US, ADC_STATE_CLR_SET, assert_param, ADC_InitTypeDef::ContinuousConvMode, ADC_HandleTypeDef::DMA_Handle, ADC_HandleTypeDef::ErrorCode, ADC_InitTypeDef::ExternalTrigConvEdge, HAL_ADC_ERROR_DMA, HAL_ADC_ERROR_INTERNAL, HAL_ADC_ERROR_OVR, HAL_ADC_STATE_ERROR_INTERNAL, HAL_ADC_STATE_INJ_BUSY, HAL_ADC_STATE_INJ_EOC, HAL_ADC_STATE_READY, HAL_ADC_STATE_REG_BUSY, HAL_ADC_STATE_REG_EOC, HAL_ADC_STATE_REG_OVR, HAL_DMA_Start_IT(), HAL_IS_BIT_CLR, HAL_IS_BIT_SET, HAL_OK, ADC_HandleTypeDef::Init, ADC_HandleTypeDef::Instance, IS_ADC_EXT_TRIG_EDGE, ADC_HandleTypeDef::State, __DMA_HandleTypeDef::XferCpltCallback, __DMA_HandleTypeDef::XferErrorCallback, and __DMA_HandleTypeDef::XferHalfCpltCallback.
HAL_StatusTypeDef HAL_ADC_Stop_DMA | ( | ADC_HandleTypeDef * | hadc | ) |
#include <stm32f4xx_hal_adc.h>
Disables ADC DMA (Single-ADC mode) and disables ADC peripheral.
hadc | pointer to a ADC_HandleTypeDef structure that contains the configuration information for the specified ADC. |
HAL | status |
Definition at line 1512 of file stm32f4xx_hal_adc.c.
References __HAL_ADC_DISABLE, __HAL_ADC_DISABLE_IT, __HAL_LOCK, __HAL_UNLOCK, ADC_IT_OVR, ADC_STATE_CLR_SET, assert_param, ADC_HandleTypeDef::DMA_Handle, HAL_ADC_STATE_ERROR_DMA, HAL_ADC_STATE_INJ_BUSY, HAL_ADC_STATE_READY, HAL_ADC_STATE_REG_BUSY, HAL_DMA_Abort(), HAL_DMA_STATE_BUSY, HAL_IS_BIT_CLR, HAL_OK, ADC_HandleTypeDef::Instance, __DMA_HandleTypeDef::State, and ADC_HandleTypeDef::State.
uint32_t HAL_ADC_GetValue | ( | ADC_HandleTypeDef * | hadc | ) |
#include <stm32f4xx_hal_adc.h>
Gets the converted value from data register of regular channel.
hadc | pointer to a ADC_HandleTypeDef structure that contains the configuration information for the specified ADC. |
Converted | value |
Definition at line 1568 of file stm32f4xx_hal_adc.c.
References ADC_HandleTypeDef::Instance.
__weak void HAL_ADC_ConvCpltCallback | ( | ADC_HandleTypeDef * | hadc | ) |
#include <stm32f4xx_hal_adc.h>
Regular conversion complete callback in non blocking mode.
hadc | pointer to a ADC_HandleTypeDef structure that contains the configuration information for the specified ADC. |
None |
Definition at line 1580 of file stm32f4xx_hal_adc.c.
References UNUSED.
Referenced by ADC_DMAConvCplt(), ADC_MultiModeDMAConvCplt(), HAL_ADC_Init(), and HAL_ADC_IRQHandler().
__weak void HAL_ADC_ConvHalfCpltCallback | ( | ADC_HandleTypeDef * | hadc | ) |
#include <stm32f4xx_hal_adc.h>
Regular conversion half DMA transfer callback in non blocking mode.
hadc | pointer to a ADC_HandleTypeDef structure that contains the configuration information for the specified ADC. |
None |
Definition at line 1595 of file stm32f4xx_hal_adc.c.
References UNUSED.
Referenced by ADC_DMAHalfConvCplt(), ADC_MultiModeDMAHalfConvCplt(), and HAL_ADC_Init().
__weak void HAL_ADC_LevelOutOfWindowCallback | ( | ADC_HandleTypeDef * | hadc | ) |
#include <stm32f4xx_hal_adc.h>
Analog watchdog callback in non blocking mode.
hadc | pointer to a ADC_HandleTypeDef structure that contains the configuration information for the specified ADC. |
None |
Definition at line 1610 of file stm32f4xx_hal_adc.c.
References UNUSED.
Referenced by HAL_ADC_Init(), and HAL_ADC_IRQHandler().
__weak void HAL_ADC_ErrorCallback | ( | ADC_HandleTypeDef * | hadc | ) |
#include <stm32f4xx_hal_adc.h>
Error ADC callback.
hadc | pointer to a ADC_HandleTypeDef structure that contains the configuration information for the specified ADC. |
None |
Definition at line 1631 of file stm32f4xx_hal_adc.c.
References UNUSED.
Referenced by ADC_DMAConvCplt(), ADC_DMAError(), ADC_MultiModeDMAError(), HAL_ADC_Init(), and HAL_ADC_IRQHandler().