Files
microchip-application-bmd38…/dac_drv_if.h
T
2024-06-27 21:30:26 +08:00

31 lines
631 B
C

#ifndef __DAC_DRV_IF_H__
#define __DAC_DRV_IF_H__
#ifdef __cplusplus
extern "C" {
#endif
#include <stdint.h>
#include <stdlib.h>
#define DAC0 (0x01 << 0)
#define DAC1 (0x01 << 1)
#define DAC2 (0x01 << 2)
#define DAC3 (0x01 << 3)
typedef struct
{
int (*init)(void);
int (*write_mode)(uint32_t channel_mask, int32_t volts);
int (*ldac_mode)(uint32_t channel_mask);
int (*write_through_mode)(uint32_t channel_mask, int32_t volts);
int (*power_control_mode)(uint32_t channel_mask, uint32_t ready_enable);
int (*reset)(void);
} dac_drv_if_t;
#ifdef __cplusplus
}
#endif
#endif /* ! __DAC_DRV_IF_H__ */