Zephyr API Documentation 4.4.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
adc_driver_api Struct Reference

Driver Operations ADC driver operations More...

#include <zephyr/drivers/adc.h>

Data Fields

adc_api_channel_setup channel_setup
  REQ Configure an ADC channel.
adc_api_read read
  REQ Set a read request.
adc_api_read_async read_async
  REQ Set an asynchronous read request.
adc_api_submit submit
  REQ Submit a stream request.
adc_api_get_decoder get_decoder
  OPT Get decoder APIs for that device.
uint16_t ref_internal
  REQ Internal reference voltage, in millivolts.

Detailed Description

Driver Operations ADC driver operations

This is the driver API structure any ADC driver needs to define. It contains function pointers to the operations the driver implements, as well as any other driver-specific constant data.

Members marked with REQ MUST be set by the driver, whereas those marked with OPT are optional.

See also
DEVICE_DT_INST_DEFINE()
DEVICE_DT_DEFINE()
DEVICE_API()

Field Documentation

◆ channel_setup

adc_api_channel_setup adc_driver_api::channel_setup

REQ Configure an ADC channel.

◆ get_decoder

adc_api_get_decoder adc_driver_api::get_decoder

OPT Get decoder APIs for that device.

Attention
Available only when the following Kconfig option is enabled: CONFIG_ADC_STREAM.

◆ read

adc_api_read adc_driver_api::read

REQ Set a read request.

◆ read_async

adc_api_read_async adc_driver_api::read_async

REQ Set an asynchronous read request.

Attention
Available only when the following Kconfig option is enabled: CONFIG_ADC_ASYNC.

◆ ref_internal

uint16_t adc_driver_api::ref_internal

REQ Internal reference voltage, in millivolts.

Set to 0 if internal reference is not supported.

◆ submit

adc_api_submit adc_driver_api::submit

REQ Submit a stream request.

Attention
Available only when the following Kconfig option is enabled: CONFIG_ADC_STREAM.

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