Zephyr Project API 3.7.0
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
adc.h
Go to the documentation of this file.
1/*
2 * Copyright 2021 Google LLC
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6#ifndef ZEPHYR_INCLUDE_DT_BINDINGS_ADC_ADC_H_
7#define ZEPHYR_INCLUDE_DT_BINDINGS_ADC_ADC_H_
8
10
12#define ADC_ACQ_TIME_MICROSECONDS (1)
14#define ADC_ACQ_TIME_NANOSECONDS (2)
16#define ADC_ACQ_TIME_TICKS (3)
18#define ADC_ACQ_TIME(unit, value) (((unit) << 14) | ((value) & BIT_MASK(14)))
20#define ADC_ACQ_TIME_DEFAULT 0
21#define ADC_ACQ_TIME_MAX BIT_MASK(14)
22
23#define ADC_ACQ_TIME_UNIT(time) (((time) >> 14) & BIT_MASK(2))
24#define ADC_ACQ_TIME_VALUE(time) ((time) & BIT_MASK(14))
25
26#endif /* ZEPHYR_INCLUDE_DT_BINDINGS_ADC_ADC_H_ */