28 #ifdef CONFIG_DAC_MULTI
33 struct dac *(*dac_init)(uint32_t index, uint8_t bits);
35 int32_t (*
dac_set)(
struct dac *dac, uint32_t data, TickType_t waittime);
36 int32_t (*
dac_setISR)(
struct dac *dac, uint32_t data);
48 #ifdef CONFIG_INSTANCE_NAME
54 #ifdef CONFIG_DAC_THREAD_SAVE
60 #ifdef CONFIG_DAC_MULTI
64 const struct dac_ops *ops;
67 #ifndef CONFIG_DAC_MULTI
74 struct dac *
dac_init(uint32_t index, uint8_t bits);
87 int32_t
dac_set(
struct dac *dac, uint32_t data, TickType_t waittime);
95 inline struct dac *
dac_init(uint32_t index, uint8_t bits) {
101 return a->ops->dac_init(index, bits);
105 return a->ops->dac_deinit(dac);
107 inline int32_t
dac_set(
struct dac *dac, uint32_t data, TickType_t waittime) {
109 return a->ops->dac_set(dac, data, waittime);
111 inline int32_t
dac_setISR(
struct dac *dac, uint32_t data) {
113 return a->ops->dac_setISR(dac, data);