|
libxr
Embedded C++ framework for bare-metal, RTOS and Linux
|
STM32 ADC 循环采样的 GPDMA 适配器 / GPDMA adapter for circular STM32 ADC sampling. More...
#include <stm32_adc_gpdma.hpp>
Public Member Functions | |
| HAL_StatusTypeDef | Start (ADC_HandleTypeDef *adc_handle, uint32_t *buffer, uint32_t sample_count, size_t buffer_size) |
| 挂接循环链表并启动 ADC DMA / Attach the circular list and start ADC DMA. | |
| HAL_StatusTypeDef | Stop (ADC_HandleTypeDef *adc_handle) |
| 停止 ADC DMA 并恢复 BSP 链表 / Stop ADC DMA and restore the BSP list. | |
STM32 ADC 循环采样的 GPDMA 适配器 / GPDMA adapter for circular STM32 ADC sampling.
持有一个线性循环节点,采样缓冲区由调用者提供;启动时替换 BSP 链表,停止后恢复。 Owns one linear circular node while borrowing sample storage; replaces the BSP list on startup and restores it after stopping.
Definition at line 29 of file stm32_adc_gpdma.hpp.
| HAL_StatusTypeDef LibXR::STM32GpdmaAdcAdapter::Start | ( | ADC_HandleTypeDef * | adc_handle, |
| uint32_t * | buffer, | ||
| uint32_t | sample_count, | ||
| size_t | buffer_size ) |
挂接循环链表并启动 ADC DMA / Attach the circular list and start ADC DMA.
| adc_handle | 已关联静止循环链表的 ADC 句柄 / ADC handle with a stopped circular list. |
| buffer | DMA 可访问的半字采样缓冲区 / DMA-accessible halfword sample storage. |
| sample_count | 每轮采样数,单位为半字 / Samples per cycle, in halfwords. |
| buffer_size | 缓冲区字节数 / Available buffer size in bytes. |
| HAL_StatusTypeDef LibXR::STM32GpdmaAdcAdapter::Stop | ( | ADC_HandleTypeDef * | adc_handle | ) |