42#ifdef PREINIT_SUPPORTED
46#ifdef MikroCCoreVersion
47 #if MikroCCoreVersion >= 1
52#include "drv_digital_out.h"
53#include "drv_digital_in.h"
54#include "drv_i2c_master.h"
66#define DAC3_MAP_MIKROBUS( cfg, mikrobus ) \
67 cfg.scl = MIKROBUS( mikrobus, MIKROBUS_SCL ); \
68 cfg.sda = MIKROBUS( mikrobus, MIKROBUS_SDA )
66#define DAC3_MAP_MIKROBUS( cfg, mikrobus ) \ …
75#define DAC3_RETVAL uint8_t
78#define DAC3_INIT_ERROR 0xFF
85#define DAC3_RESET 0x06
86#define DAC3_WAKE_UP 0x09
87#define DAC3_VOLATILE_MEM 0x40
88#define DAC3_VOLATILE_ALL_MEM 0x60
89#define DAC3_VOLATILE_CONF 0x80
#define DAC3_RETVAL
Definition dac3.h:75
void dac3_set_out_voltage(dac3_t *ctx, uint16_t output)
Set output voltage function.
DAC3_RETVAL dac3_init(dac3_t *ctx, dac3_cfg_t *cfg)
Initialization function.
void dac3_cfg_setup(dac3_cfg_t *cfg)
Config Object Initialization function.
void dac3_send_command(dac3_t *ctx, uint8_t cmd)
Send command function.
void dac3_write_all_mem(dac3_t *ctx, uint16_t value)
Send command function.
dac3_pd_t
Power configuration enumeration.
Definition dac3.h:117
dac3_gain_t
Gain configuration enumeration.
Definition dac3.h:133
dac3_vrl_t
VRL configuration enumeration.
Definition dac3.h:103
@ PD_1
Definition dac3.h:121
@ NORMAL
Definition dac3.h:119
@ PD_100
Definition dac3.h:123
@ PD_500
Definition dac3.h:125
@ GAIN_1x
Definition dac3.h:135
@ GAIN_2x
Definition dac3.h:137
@ VREF_UNBUFFERED
Definition dac3.h:107
@ VDD
Definition dac3.h:105
@ VREF_BUFFERED
Definition dac3.h:109
Click configuration structure definition.
Definition dac3.h:172
uint32_t i2c_speed
Definition dac3.h:181
dac3_conf_t dac_cfg
Definition dac3.h:180
pin_name_t scl
Definition dac3.h:175
pin_name_t sda
Definition dac3.h:176
uint8_t i2c_address
Definition dac3.h:182
DAC configuration object.
Definition dac3.h:145
dac3_gain_t gain
Definition dac3.h:148
dac3_pd_t power
Definition dac3.h:147
dac3_vrl_t vrl
Definition dac3.h:146
Click ctx object definition.
Definition dac3.h:156
i2c_master_t i2c
Definition dac3.h:159
dac3_conf_t dac_cfg
Definition dac3.h:163
uint8_t slave_address
Definition dac3.h:164