39#ifdef PREINIT_SUPPORTED
43#ifdef MikroCCoreVersion
44 #if MikroCCoreVersion >= 1
49#include "drv_digital_out.h"
50#include "drv_digital_in.h"
51#include "drv_i2c_master.h"
68#define DIGIPOT11_WIPER_SEL_A 0x11
69#define DIGIPOT11_WIPER_SEL_B 0x12
70#define DIGIPOT11_WIPER_SEL_BOTH 0x13
76#define DIGIPOT11_WIPER_FULL_SCALE 0xFF
77#define DIGIPOT11_WIPER_MID_SCALE 0x80
78#define DIGIPOT11_WIPER_ZERO_SCALE 0x00
85#define DIGIPOT11_U1_DEVICE_ADDRESS_A1A0_00 0x2C
86#define DIGIPOT11_U1_DEVICE_ADDRESS_A1A0_01 0x2D
87#define DIGIPOT11_U1_DEVICE_ADDRESS_A1A0_10 0x2E
88#define DIGIPOT11_U1_DEVICE_ADDRESS_A1A0_11 0x2F
89#define DIGIPOT11_U2_DEVICE_ADDRESS_A1A0_00 0x28
90#define DIGIPOT11_U2_DEVICE_ADDRESS_A1A0_01 0x29
91#define DIGIPOT11_U2_DEVICE_ADDRESS_A1A0_10 0x2A
92#define DIGIPOT11_U2_DEVICE_ADDRESS_A1A0_11 0x2B
110#define DIGIPOT11_MAP_MIKROBUS( cfg, mikrobus ) \
111 cfg.scl = MIKROBUS( mikrobus, MIKROBUS_SCL ); \
112 cfg.sda = MIKROBUS( mikrobus, MIKROBUS_SDA );
digipot11_return_value_t
DIGI POT 11 Click return value data.
Definition digipot11.h:152
@ DIGIPOT11_OK
Definition digipot11.h:153
@ DIGIPOT11_ERROR
Definition digipot11.h:154
err_t digipot11_set_u1_wiper(digipot11_t *ctx, uint8_t wiper_sel, uint8_t data_in)
DIGI POT 11 set u1 wiper function.
err_t digipot11_set_u2_wiper(digipot11_t *ctx, uint8_t wiper_sel, uint8_t data_in)
DIGI POT 11 set u2 wiper function.
void digipot11_cfg_setup(digipot11_cfg_t *cfg)
DIGI POT 11 configuration object setup function.
err_t digipot11_init(digipot11_t *ctx, digipot11_cfg_t *cfg)
DIGI POT 11 initialization function.
DIGI POT 11 Click configuration object.
Definition digipot11.h:137
uint8_t i2c_address_u1
Definition digipot11.h:142
uint32_t i2c_speed
Definition digipot11.h:141
uint8_t i2c_address_u2
Definition digipot11.h:143
pin_name_t scl
Definition digipot11.h:138
pin_name_t sda
Definition digipot11.h:139
DIGI POT 11 Click context object.
Definition digipot11.h:122
uint8_t u2_slave_address
Definition digipot11.h:128
uint8_t u1_slave_address
Definition digipot11.h:127
i2c_master_t i2c
Definition digipot11.h:124