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"
67#define HALLCURRENT4_MAP_MIKROBUS( cfg, mikrobus ) \
68 cfg.scl = MIKROBUS( mikrobus, MIKROBUS_SCL ); \
69 cfg.sda = MIKROBUS( mikrobus, MIKROBUS_SDA )
76#define HALLCURRENT4_RETVAL uint8_t
78#define HALLCURRENT4_OK 0x00
79#define HALLCURRENT4_INIT_ERROR 0xFF
86#define HALLCURRENT4_DEVICE_SLAVE_ADDRESS 0x4D
#define HALLCURRENT4_RETVAL
Definition hallcurrent4.h:76
float hallcurrent4_get_current_data(hallcurrent4_t *ctx)
Reads current in mA.
uint16_t hallcurrent4_get_raw_data(hallcurrent4_t *ctx)
Reads raw (ADC) current data.
void hallcurrent4_cfg_setup(hallcurrent4_cfg_t *cfg)
Config Object Initialization function.
void hallcurrent4_generic_write(hallcurrent4_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
Generic write function.
void hallcurrent4_generic_read(hallcurrent4_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
Generic read function.
HALLCURRENT4_RETVAL hallcurrent4_init(hallcurrent4_t *ctx, hallcurrent4_cfg_t *cfg)
Initialization function.
Click configuration structure definition.
Definition hallcurrent4.h:115
uint32_t i2c_speed
Definition hallcurrent4.h:123
pin_name_t scl
Definition hallcurrent4.h:118
pin_name_t sda
Definition hallcurrent4.h:119
uint8_t i2c_address
Definition hallcurrent4.h:124
Click ctx object definition.
Definition hallcurrent4.h:100
i2c_master_t i2c
Definition hallcurrent4.h:103
uint8_t slave_address
Definition hallcurrent4.h:107