rt_err_t rt_dac_write(rt_dac_device_t dev, rt_uint32_t channel, rt_uint32_t value)
set the value of DAC
struct rt_dac_device * rt_dac_device_t
rt_err_t rt_dac_disable(rt_dac_device_t dev, rt_uint32_t channel)
disable the DAC channel
rt_err_t rt_hw_dac_register(rt_dac_device_t dac, const char *name, const struct rt_dac_ops *ops, const void *user_data)
Register a DAC device
rt_err_t rt_dac_enable(rt_dac_device_t dev, rt_uint32_t channel)
enable the DAC channel
@ RT_DAC_CMD_GET_RESOLUTION
#define RT_DEVICE_CTRL_BASE(Type)
const struct rt_dac_ops * ops
Configuration of DAC device
rt_uint8_t(* get_resolution)(struct rt_dac_device *device)
rt_err_t(* enabled)(struct rt_dac_device *device, rt_uint32_t channel)
rt_err_t(* convert)(struct rt_dac_device *device, rt_uint32_t channel, rt_uint32_t *value)
rt_err_t(* disabled)(struct rt_dac_device *device, rt_uint32_t channel)