ADC polling and DMA conversion management functions.
More...
ADC polling and DMA conversion management functions.
◆ hal_adc_conv_cplt_callback()
Conversion completed callback.
- Note
- This function should not be modified. When the callback is needed, the hal_adc_conv_cplt_callback can be implemented in the user file.
- Parameters
-
[in] | p_adc | Pointer to an ADC handle which contains the configuration information for the specified ADC module. |
◆ hal_adc_get_dma_threshold()
Get the FIFO threshold for DMA trigger.
- Parameters
-
[in] | p_adc | Pointer to an ADC handle which contains the configuration information for the specified ADC module. |
- Returns
- FIFO threshold
◆ hal_adc_poll_for_conversion()
Polling for conversion.
- Parameters
-
[in] | p_adc | Pointer to an ADC handle. |
[in] | p_data | Pointer to data buffer which to store ADC conversion results. |
[in] | length | Length of data buffer. |
- Return values
-
◆ hal_adc_set_dma_threshold()
Set the FIFO threshold for DMA trigger.
- Parameters
-
[in] | p_adc | Pointer to an ADC handle which contains the configuration information for the specified ADC module. |
[in] | threshold | FIFO threshold value ranging bwtween 0x0U ~ 0x64U. |
- Return values
-
◆ hal_adc_start_dma()
DMA for conversion.
- Parameters
-
[in] | p_adc | Pointer to an ADC handle. |
[in] | p_data | Pointer to data buffer which to store ADC conversion results. |
[in] | length | Length of data buffer, ranging between 0 and 4095. |
- Return values
-
◆ hal_adc_start_dma_sg_llp()
DMA for conversion.
- Parameters
-
[in] | p_adc | Pointer to an ADC handle. |
[in] | p_data | Pointer to data buffer which to store ADC conversion results. |
[in] | length | Length of data buffer, ranging between 0 and 4095. |
[in] | sg_llp_config | The config of source and destination's SG and LLP functions. |
- Return values
-
◆ hal_adc_stop_dma()
Abort ongoing conversion (blocking mode).
- Note
- This procedure could be only used for aborting conversion started in DMA mode. This procedure performs following operations:
- Disable ADC clock, stop conversion
- Abort DMA transfer by calling hal_dma_abort (in case of transfer in DMA mode)
- Set handle State to READY. This procedure is executed in blocking mode: when exiting function, Abort is considered as completed.
- Parameters
-
- Return values
-