Zephyr Project API 4.0.0
A Scalable Open Source RTOS
|
Structure defining additional options for an ADC sampling sequence. More...
#include <adc.h>
Data Fields | |
uint32_t | interval_us |
Interval between consecutive samplings (in microseconds), 0 means sample as fast as possible, without involving any timer. | |
adc_sequence_callback | callback |
Callback function to be called after each sampling is done. | |
void * | user_data |
Pointer to user data. | |
uint16_t | extra_samplings |
Number of extra samplings to perform (the total number of samplings is 1 + extra_samplings). | |
Structure defining additional options for an ADC sampling sequence.
adc_sequence_callback adc_sequence_options::callback |
Callback function to be called after each sampling is done.
Optional - set to NULL if it is not needed.
uint16_t adc_sequence_options::extra_samplings |
Number of extra samplings to perform (the total number of samplings is 1 + extra_samplings).
uint32_t adc_sequence_options::interval_us |
Interval between consecutive samplings (in microseconds), 0 means sample as fast as possible, without involving any timer.
The accuracy of this interval is dependent on the implementation of a given driver. The default routine that handles the intervals uses a kernel timer for this purpose, thus, it has the accuracy of the kernel's system clock. Particular drivers may use some dedicated hardware timers and achieve a better precision.
void* adc_sequence_options::user_data |
Pointer to user data.
It can be used to associate the sequence with any other data that is needed in the callback function.