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 I2CISOLATOR5_PIN_STATE_HIGH 0x01
74#define I2CISOLATOR5_PIN_STATE_LOW 0x00
81#define I2CISOLATOR5_DEVICE_ADDRESS 0x00
99#define I2CISOLATOR5_MAP_MIKROBUS( cfg, mikrobus ) \
100 cfg.scl = MIKROBUS( mikrobus, MIKROBUS_SCL ); \
101 cfg.sda = MIKROBUS( mikrobus, MIKROBUS_SDA ); \
102 cfg.otb = MIKROBUS( mikrobus, MIKROBUS_RST ); \
103 cfg.ota = MIKROBUS( mikrobus, MIKROBUS_PWM ); \
104 cfg.ina = MIKROBUS( mikrobus, MIKROBUS_INT )
253 uint8_t *data_out, uint8_t data_out_len );
err_t i2cisolator5_init(i2cisolator5_t *ctx, i2cisolator5_cfg_t *cfg)
I2C Isolator 5 initialization function.
uint8_t i2cisolator5_get_ina_state(i2cisolator5_t *ctx)
I2C Isolator 5 get input A state function.
err_t i2cisolator5_write(i2cisolator5_t *ctx, uint8_t *data_in, uint8_t len)
I2C Isolator 5 I2C writing function.
void i2cisolator5_cfg_setup(i2cisolator5_cfg_t *cfg)
I2C Isolator 5 configuration object setup function.
void i2cisolator5_set_outb_state(i2cisolator5_t *ctx, uint8_t outb_state)
I2C Isolator 5 set output B state function.
err_t i2cisolator5_write_then_read(i2cisolator5_t *ctx, uint8_t *data_in, uint8_t data_in_len, uint8_t *data_out, uint8_t data_out_len)
I2C Isolator 5 I2C write then read function.
void i2cisolator5_set_outa_state(i2cisolator5_t *ctx, uint8_t outa_state)
I2C Isolator 5 set output A state function.
err_t i2cisolator5_default_cfg(i2cisolator5_t *ctx)
I2C Isolator 5 default configuration function.
err_t i2cisolator5_read(i2cisolator5_t *ctx, uint8_t *data_out, uint8_t len)
I2C Isolator 5 I2C reading function.
err_t i2cisolator5_set_slave_address(i2cisolator5_t *ctx, uint8_t address)
I2C Isolator 5 set I2C Slave address function.
i2cisolator5_return_value_t
I2C Isolator 5 Click return value data.
Definition i2cisolator5.h:153
@ I2CISOLATOR5_ERROR
Definition i2cisolator5.h:155
@ I2CISOLATOR5_OK
Definition i2cisolator5.h:154
I2C Isolator 5 Click configuration object.
Definition i2cisolator5.h:135
uint32_t i2c_speed
Definition i2cisolator5.h:143
pin_name_t otb
Definition i2cisolator5.h:139
pin_name_t ina
Definition i2cisolator5.h:141
pin_name_t ota
Definition i2cisolator5.h:140
pin_name_t scl
Definition i2cisolator5.h:136
pin_name_t sda
Definition i2cisolator5.h:137
uint8_t i2c_address
Definition i2cisolator5.h:144
I2C Isolator 5 Click context object.
Definition i2cisolator5.h:114
digital_out_t otb
Definition i2cisolator5.h:116
digital_out_t ota
Definition i2cisolator5.h:117
i2c_master_t i2c
Definition i2cisolator5.h:123
uint8_t slave_address
Definition i2cisolator5.h:126
digital_in_t ina
Definition i2cisolator5.h:120