RT-Thread RTOS
An open source embedded real-time operating system
rt_adc_core_ops Struct Reference

#include <adc_v2.h>

Data Fields

rt_err_t(* open )(struct rt_adc_device *device)
 
rt_err_t(* close )(struct rt_adc_device *device)
 
rt_err_t(* session_config )(struct rt_adc_device *device, rt_uint32_t channels)
 
rt_err_t(* control )(struct rt_adc_device *device, int cmd, void *args)
 

Detailed Description

ADC core driver operation table.

Field Documentation

◆ open

rt_err_t(* rt_adc_core_ops::open) (struct rt_adc_device *device)

Open and initialize the ADC hardware.

Parameters
devicePointer to the ADC device object.
Returns
Operation status.

◆ close

rt_err_t(* rt_adc_core_ops::close) (struct rt_adc_device *device)

Close and deinitialize the ADC hardware.

Parameters
devicePointer to the ADC device object.
Returns
Operation status.

◆ session_config

rt_err_t(* rt_adc_core_ops::session_config) (struct rt_adc_device *device, rt_uint32_t channels)

Configure one ADC conversion session before data transfer.

Parameters
devicePointer to the ADC device object.
channelsADC channel selection mask.
Returns
Operation status.

◆ control

rt_err_t(* rt_adc_core_ops::control) (struct rt_adc_device *device, int cmd, void *args)

Handle ADC control commands.

Parameters
devicePointer to the ADC device object.
cmdControl command.
argsPointer to the control argument buffer.
Returns
Operation status.