68#define RT_ADC_INTERN_CH_TEMPER (-1)
69#define RT_ADC_INTERN_CH_VREF (-2)
70#define RT_ADC_INTERN_CH_VBAT (-3)
rt_int16_t rt_adc_voltage(rt_adc_device_t dev, rt_int8_t channel)
get the adc resolution
rt_err_t rt_adc_enable(rt_adc_device_t dev, rt_int8_t channel)
enable the adc channel
rt_err_t rt_hw_adc_register(rt_adc_device_t adc, const char *name, const struct rt_adc_ops *ops, const void *user_data)
register the adc device
rt_uint32_t rt_adc_read(rt_adc_device_t dev, rt_int8_t channel)
read the adc value
struct rt_adc_device * rt_adc_device_t
rt_err_t rt_adc_disable(rt_adc_device_t dev, rt_int8_t channel)
disable the adc channel
@ RT_ADC_CMD_GET_RESOLUTION
#define RT_DEVICE_CTRL_BASE(Type)
const struct rt_adc_ops * ops
rt_uint8_t(* get_resolution)(struct rt_adc_device *device)
rt_err_t(* convert)(struct rt_adc_device *device, rt_int8_t channel, rt_uint32_t *value)
rt_int16_t(* get_vref)(struct rt_adc_device *device)
rt_err_t(* enabled)(struct rt_adc_device *device, rt_int8_t channel, rt_bool_t enabled)