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"
73#define I2CMUX7_CHANNEL_DISABLE 0x00
74#define I2CMUX7_CHANNEL_0 0x08
75#define I2CMUX7_CHANNEL_1 0x09
76#define I2CMUX7_CHANNEL_2 0x0A
77#define I2CMUX7_CHANNEL_3 0x0B
78#define I2CMUX7_CHANNEL_4 0x0C
79#define I2CMUX7_CHANNEL_5 0x0D
80#define I2CMUX7_CHANNEL_6 0x0E
81#define I2CMUX7_CHANNEL_7 0x0F
82#define I2CMUX7_CHANNEL_NUM_MASK 0x07
89#define I2CMUX7_DEV_ADDR_A2A1A0_000 0x70
90#define I2CMUX7_DEV_ADDR_A2A1A0_001 0x71
91#define I2CMUX7_DEV_ADDR_A2A1A0_010 0x72
92#define I2CMUX7_DEV_ADDR_A2A1A0_011 0x73
93#define I2CMUX7_DEV_ADDR_A2A1A0_100 0x74
94#define I2CMUX7_DEV_ADDR_A2A1A0_101 0x75
95#define I2CMUX7_DEV_ADDR_A2A1A0_110 0x76
96#define I2CMUX7_DEV_ADDR_A2A1A0_111 0x77
114#define I2CMUX7_MAP_MIKROBUS( cfg, mikrobus ) \
115 cfg.scl = MIKROBUS( mikrobus, MIKROBUS_SCL ); \
116 cfg.sda = MIKROBUS( mikrobus, MIKROBUS_SDA ); \
117 cfg.rst = MIKROBUS( mikrobus, MIKROBUS_RST );
err_t i2cmux7_generic_write(i2cmux7_t *ctx, uint8_t reg, uint8_t *tx_buf, uint8_t tx_len)
I2C MUX 7 I2C writing function.
err_t i2cmux7_read_channel(i2cmux7_t *ctx, uint8_t *ch_sel)
I2C MUX 7 read channel function.
err_t i2cmux7_init(i2cmux7_t *ctx, i2cmux7_cfg_t *cfg)
I2C MUX 7 initialization function.
err_t i2cmux7_generic_read(i2cmux7_t *ctx, uint8_t reg, uint8_t *rx_buf, uint8_t rx_len)
I2C MUX 7 I2C reading function.
void i2cmux7_cfg_setup(i2cmux7_cfg_t *cfg)
I2C MUX 7 configuration object setup function.
err_t i2cmux7_set_channel(i2cmux7_t *ctx, uint8_t ch_sel, uint8_t ch_slave_addr)
I2C MUX 7 set channel function.
void i2cmux7_reset_device(i2cmux7_t *ctx)
I2C MUX 7 reset device function.
i2cmux7_return_value_t
I2C MUX 7 Click return value data.
Definition i2cmux7.h:161
@ I2CMUX7_ERROR
Definition i2cmux7.h:163
@ I2CMUX7_OK
Definition i2cmux7.h:162
I2C MUX 7 Click configuration object.
Definition i2cmux7.h:145
uint32_t i2c_speed
Definition i2cmux7.h:151
pin_name_t scl
Definition i2cmux7.h:146
pin_name_t sda
Definition i2cmux7.h:147
pin_name_t rst
Definition i2cmux7.h:149
uint8_t i2c_address
Definition i2cmux7.h:152
I2C MUX 7 Click context object.
Definition i2cmux7.h:127
uint8_t ch_slave_address
Definition i2cmux7.h:136
i2c_master_t i2c
Definition i2cmux7.h:132
digital_out_t rst
Definition i2cmux7.h:129
uint8_t slave_address
Definition i2cmux7.h:135