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 FORCE4_MAP_MIKROBUS( cfg, mikrobus ) \
67 cfg.scl = MIKROBUS( mikrobus, MIKROBUS_SCL ); \
68 cfg.sda = MIKROBUS( mikrobus, MIKROBUS_SDA ); \
69 cfg.an = MIKROBUS( mikrobus, MIKROBUS_AN )
76#define FORCE4_RETVAL uint8_t
79#define FORCE4_INIT_ERROR 0xFF
86#define FORCE4_SLAVE_ADDRES 0x4D
#define FORCE4_RETVAL
Definition force4.h:76
FORCE4_RETVAL force4_init(force4_t *ctx, force4_cfg_t *cfg)
Initialization function.
void force4_generic_write(force4_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
Generic write function.
void force4_generic_read(force4_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
Generic read function.
void force4_cfg_setup(force4_cfg_t *cfg)
Config Object Initialization function.
uint16_t force4_read_adc(force4_t *ctx)
Function for reading 12bit ADC data from device.
Click configuration structure definition.
Definition force4.h:119
uint32_t i2c_speed
Definition force4.h:131
pin_name_t scl
Definition force4.h:122
pin_name_t sda
Definition force4.h:123
pin_name_t an
Definition force4.h:127
uint8_t i2c_address
Definition force4.h:132
Click ctx object definition.
Definition force4.h:100
i2c_master_t i2c
Definition force4.h:107
uint8_t slave_address
Definition force4.h:111
digital_out_t an
Definition force4.h:103