Zephyr API Documentation 4.0.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
adc_dt_spec Struct Reference

Container for ADC channel information specified in devicetree. More...

#include <adc.h>

Data Fields

const struct devicedev
 Pointer to the device structure for the ADC driver instance used by this io-channel.
 
uint8_t channel_id
 ADC channel identifier used by this io-channel.
 
bool channel_cfg_dt_node_exists
 Flag indicating whether configuration of the associated ADC channel is provided as a child node of the corresponding ADC controller in devicetree.
 
struct adc_channel_cfg channel_cfg
 Configuration of the associated ADC channel specified in devicetree.
 
uint16_t vref_mv
 Voltage of the reference selected for the channel or 0 if this value is not provided in devicetree.
 
uint8_t resolution
 ADC resolution to be used for that channel.
 
uint8_t oversampling
 Oversampling setting to be used for that channel.
 

Detailed Description

Container for ADC channel information specified in devicetree.

See also
ADC_DT_SPEC_GET_BY_IDX
ADC_DT_SPEC_GET

Field Documentation

◆ channel_cfg

struct adc_channel_cfg adc_dt_spec::channel_cfg

Configuration of the associated ADC channel specified in devicetree.

This field is valid only when channel_cfg_dt_node_exists is set to true.

◆ channel_cfg_dt_node_exists

bool adc_dt_spec::channel_cfg_dt_node_exists

Flag indicating whether configuration of the associated ADC channel is provided as a child node of the corresponding ADC controller in devicetree.

◆ channel_id

uint8_t adc_dt_spec::channel_id

ADC channel identifier used by this io-channel.

◆ dev

const struct device* adc_dt_spec::dev

Pointer to the device structure for the ADC driver instance used by this io-channel.

◆ oversampling

uint8_t adc_dt_spec::oversampling

Oversampling setting to be used for that channel.

This field is valid only when channel_cfg_dt_node_exists is set to true.

◆ resolution

uint8_t adc_dt_spec::resolution

ADC resolution to be used for that channel.

This field is valid only when channel_cfg_dt_node_exists is set to true.

◆ vref_mv

uint16_t adc_dt_spec::vref_mv

Voltage of the reference selected for the channel or 0 if this value is not provided in devicetree.

This field is valid only when channel_cfg_dt_node_exists is set to true.


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