Zephyr API Documentation 3.7.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
adc.h File Reference

Go to the source code of this file.

Macros

#define ADC_ACQ_TIME_MICROSECONDS   (1)
 Acquisition time is expressed in microseconds.
 
#define ADC_ACQ_TIME_NANOSECONDS   (2)
 Acquisition time is expressed in nanoseconds.
 
#define ADC_ACQ_TIME_TICKS   (3)
 Acquisition time is expressed in ADC ticks.
 
#define ADC_ACQ_TIME(unit, value)
 Macro for composing the acquisition time value in given units.
 
#define ADC_ACQ_TIME_DEFAULT   0
 Value indicating that the default acquisition time should be used.
 
#define ADC_ACQ_TIME_MAX   BIT_MASK(14)
 
#define ADC_ACQ_TIME_UNIT(time)
 
#define ADC_ACQ_TIME_VALUE(time)
 

Macro Definition Documentation

◆ ADC_ACQ_TIME

#define ADC_ACQ_TIME ( unit,
value )
Value:
(((unit) << 14) | ((value) & BIT_MASK(14)))
#define BIT_MASK(n)
Bit mask with bits 0 through n-1 (inclusive) set, or 0 if n is 0.
Definition util_macro.h:68

Macro for composing the acquisition time value in given units.

◆ ADC_ACQ_TIME_DEFAULT

#define ADC_ACQ_TIME_DEFAULT   0

Value indicating that the default acquisition time should be used.

◆ ADC_ACQ_TIME_MAX

#define ADC_ACQ_TIME_MAX   BIT_MASK(14)

◆ ADC_ACQ_TIME_MICROSECONDS

#define ADC_ACQ_TIME_MICROSECONDS   (1)

Acquisition time is expressed in microseconds.

◆ ADC_ACQ_TIME_NANOSECONDS

#define ADC_ACQ_TIME_NANOSECONDS   (2)

Acquisition time is expressed in nanoseconds.

◆ ADC_ACQ_TIME_TICKS

#define ADC_ACQ_TIME_TICKS   (3)

Acquisition time is expressed in ADC ticks.

◆ ADC_ACQ_TIME_UNIT

#define ADC_ACQ_TIME_UNIT ( time)
Value:
(((time) >> 14) & BIT_MASK(2))
time_t time(time_t *tloc)

◆ ADC_ACQ_TIME_VALUE

#define ADC_ACQ_TIME_VALUE ( time)
Value:
((time) & BIT_MASK(14))