Zephyr API Documentation 3.7.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
adc_sequence_options Struct Reference

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).
 

Detailed Description

Structure defining additional options for an ADC sampling sequence.

Field Documentation

◆ callback

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.

◆ extra_samplings

uint16_t adc_sequence_options::extra_samplings

Number of extra samplings to perform (the total number of samplings is 1 + extra_samplings).

◆ interval_us

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.

◆ user_data

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.


The documentation for this struct was generated from the following file: