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 HALLCURRENT6_MAP_MIKROBUS( cfg, mikrobus ) \
67 cfg.scl = MIKROBUS( mikrobus, MIKROBUS_SCL ); \
68 cfg.sda = MIKROBUS( mikrobus, MIKROBUS_SDA )
75#define HALLCURRENT6_RETVAL uint8_t
77#define HALLCURRENT6_OK 0x00
78#define HALLCURRENT6_INIT_ERROR 0xFF
#define HALLCURRENT6_RETVAL
Definition hallcurrent6.h:75
void hallcurrent6_generic_write(hallcurrent6_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
Generic write function.
void hallcurrent6_cfg_setup(hallcurrent6_cfg_t *cfg)
Config Object Initialization function.
float hallcurrent6_get_current(hallcurrent6_t *ctx)
Reads current data.
void hallcurrent6_generic_read(hallcurrent6_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
Generic read function.
HALLCURRENT6_RETVAL hallcurrent6_init(hallcurrent6_t *ctx, hallcurrent6_cfg_t *cfg)
Initialization function.
uint16_t hallcurrent6_read_data(hallcurrent6_t *ctx)
Reads ADC current data.
Click configuration structure definition.
Definition hallcurrent6.h:105
uint32_t i2c_speed
Definition hallcurrent6.h:114
pin_name_t scl
Definition hallcurrent6.h:108
pin_name_t sda
Definition hallcurrent6.h:109
uint8_t i2c_address
Definition hallcurrent6.h:115
Click ctx object definition.
Definition hallcurrent6.h:89
i2c_master_t i2c
Definition hallcurrent6.h:93
uint8_t slave_address
Definition hallcurrent6.h:97