IO operation functions.
More...
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_ADC_ConvCpltCallback()
Regular conversion complete callback in non blocking mode.
- Parameters
-
hadc | pointer to a ADC_HandleTypeDef structure that contains the configuration information for the specified ADC. |
- Return values
-
Definition at line 1580 of file stm32f4xx_hal_adc.c.
◆ HAL_ADC_ConvHalfCpltCallback()
Regular conversion half DMA transfer callback in non blocking mode.
- Parameters
-
hadc | pointer to a ADC_HandleTypeDef structure that contains the configuration information for the specified ADC. |
- Return values
-
Definition at line 1595 of file stm32f4xx_hal_adc.c.
◆ HAL_ADC_ErrorCallback()
Error ADC callback.
- Note
- In case of error due to overrun when using ADC with DMA transfer (HAL ADC handle parameter "ErrorCode" to state "HAL_ADC_ERROR_OVR"):
- Reinitialize the DMA using function "HAL_ADC_Stop_DMA()".
- If needed, restart a new ADC conversion using function "HAL_ADC_Start_DMA()" (this function is also clearing overrun flag)
- Parameters
-
hadc | pointer to a ADC_HandleTypeDef structure that contains the configuration information for the specified ADC. |
- Return values
-
Definition at line 1631 of file stm32f4xx_hal_adc.c.
◆ HAL_ADC_GetValue()
Gets the converted value from data register of regular channel.
- Parameters
-
hadc | pointer to a ADC_HandleTypeDef structure that contains the configuration information for the specified ADC. |
- Return values
-
Definition at line 1568 of file stm32f4xx_hal_adc.c.
◆ HAL_ADC_IRQHandler()
Handles ADC interrupt request.
- Parameters
-
hadc | pointer to a ADC_HandleTypeDef structure that contains the configuration information for the specified ADC. |
- Return values
-
Definition at line 1199 of file stm32f4xx_hal_adc.c.
◆ HAL_ADC_LevelOutOfWindowCallback()
Analog watchdog callback in non blocking mode.
- Parameters
-
hadc | pointer to a ADC_HandleTypeDef structure that contains the configuration information for the specified ADC. |
- Return values
-
Definition at line 1610 of file stm32f4xx_hal_adc.c.
◆ HAL_ADC_PollForConversion()
HAL_StatusTypeDef HAL_ADC_PollForConversion |
( |
ADC_HandleTypeDef * |
hadc, |
|
|
uint32_t |
Timeout |
|
) |
| |
Poll for regular conversion complete.
- Note
- ADC conversion flags EOS (end of sequence) and EOC (end of conversion) are cleared by this function.
-
This function cannot be used in a particular setup: ADC configured in DMA mode and polling for end of each conversion (ADC init parameter "EOCSelection" set to ADC_EOC_SINGLE_CONV). In this case, DMA resets the flag EOC and polling cannot be performed on each conversion. Nevertheless, polling can still be performed on the complete sequence.
- Parameters
-
hadc | pointer to a ADC_HandleTypeDef structure that contains the configuration information for the specified ADC. |
Timeout | Timeout value in millisecond. |
- Return values
-
Definition at line 882 of file stm32f4xx_hal_adc.c.
◆ HAL_ADC_PollForEvent()
HAL_StatusTypeDef HAL_ADC_PollForEvent |
( |
ADC_HandleTypeDef * |
hadc, |
|
|
uint32_t |
EventType, |
|
|
uint32_t |
Timeout |
|
) |
| |
Poll for conversion event.
- Parameters
-
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:
- ADC_AWD_EVENT: ADC Analog watch Dog event.
- ADC_OVR_EVENT: ADC Overrun event.
|
Timeout | Timeout value in millisecond. |
- Return values
-
Definition at line 971 of file stm32f4xx_hal_adc.c.
◆ HAL_ADC_Start()
Enables ADC and starts conversion of the regular channels.
- Parameters
-
hadc | pointer to a ADC_HandleTypeDef structure that contains the configuration information for the specified ADC. |
- Return values
-
Definition at line 716 of file stm32f4xx_hal_adc.c.
◆ HAL_ADC_Start_DMA()
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.
- Parameters
-
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. |
- Return values
-
Definition at line 1364 of file stm32f4xx_hal_adc.c.
◆ HAL_ADC_Start_IT()
Enables the interrupt and starts ADC conversion of regular channels.
- Parameters
-
hadc | pointer to a ADC_HandleTypeDef structure that contains the configuration information for the specified ADC. |
- Return values
-
Definition at line 1037 of file stm32f4xx_hal_adc.c.
◆ HAL_ADC_Stop()
Disables ADC and stop conversion of regular channels.
- Note
- Caution: This function will stop also injected channels.
- Parameters
-
hadc | pointer to a ADC_HandleTypeDef structure that contains the configuration information for the specified ADC. |
- Return values
-
Definition at line 839 of file stm32f4xx_hal_adc.c.
◆ HAL_ADC_Stop_DMA()
Disables ADC DMA (Single-ADC mode) and disables ADC peripheral.
- Parameters
-
hadc | pointer to a ADC_HandleTypeDef structure that contains the configuration information for the specified ADC. |
- Return values
-
Definition at line 1512 of file stm32f4xx_hal_adc.c.
◆ HAL_ADC_Stop_IT()
Disables the interrupt and stop ADC conversion of regular channels.
- Note
- Caution: This function will stop also injected channels.
- Parameters
-
hadc | pointer to a ADC_HandleTypeDef structure that contains the configuration information for the specified ADC. |
- Return values
-
Definition at line 1162 of file stm32f4xx_hal_adc.c.