![]() |
RT-Thread RTOS
An open source embedded real-time operating system
|
#include <adc_v2.h>
Data Fields | |
| rt_err_t(* | start )(struct rt_adc_device *device, rt_uint32_t channels, const struct rt_adc_sequence_cfg *cfg) |
| rt_err_t(* | read )(struct rt_adc_device *device, rt_uint32_t *value, rt_int32_t timeout_ms) |
| rt_err_t(* | stop )(struct rt_adc_device *device) |
ADC finite-sequence operation table.
| rt_err_t(* rt_adc_sequence_ops::start) (struct rt_adc_device *device, rt_uint32_t channels, const struct rt_adc_sequence_cfg *cfg) |
Start one active finite transfer session.
| device | Pointer to the ADC device object. |
| channels | ADC channel selection mask. |
| cfg | Pointer to the sequence request object. |
| rt_err_t(* rt_adc_sequence_ops::read) (struct rt_adc_device *device, rt_uint32_t *value, rt_int32_t timeout_ms) |
Read one converted sample from an active finite transfer session.
| device | Pointer to the ADC device object. |
| value | Pointer to the output sample value. |
| timeout_ms | Read timeout in milliseconds; negative means wait forever. |
| rt_err_t(* rt_adc_sequence_ops::stop) (struct rt_adc_device *device) |
Stop one active finite transfer session.
| device | Pointer to the ADC device object. |