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 C8PINI2C_MAP_MIKROBUS( cfg, mikrobus ) \
67 cfg.scl = MIKROBUS( mikrobus, MIKROBUS_SCL ); \
68 cfg.sda = MIKROBUS( mikrobus, MIKROBUS_SDA )
75#define C8PINI2C_RETVAL uint8_t
77#define C8PINI2C_OK 0x00
78#define C8PINI2C_INIT_ERROR 0xFF
#define C8PINI2C_RETVAL
Definition c8pini2c.h:75
void c8pini2c_cfg_setup(c8pini2c_cfg_t *cfg)
Config Object Initialization function.
void c8pini2c_generic_read(c8pini2c_t *ctx, uint8_t slave_addr, uint8_t reg, uint8_t *data_buf, uint8_t len)
Generic read function.
C8PINI2C_RETVAL c8pini2c_init(c8pini2c_t *ctx, c8pini2c_cfg_t *cfg)
Initialization function.
void c8pini2c_generic_write(c8pini2c_t *ctx, uint8_t slave_addr, uint8_t reg, uint8_t *data_buf, uint8_t len)
Generic write function.
Click configuration structure definition.
Definition c8pini2c.h:103
uint32_t i2c_speed
Definition c8pini2c.h:111
pin_name_t scl
Definition c8pini2c.h:106
pin_name_t sda
Definition c8pini2c.h:107
Click ctx object definition.
Definition c8pini2c.h:92
i2c_master_t i2c
Definition c8pini2c.h:95