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"
84#define HALLCURRENT9_SET_DEV_ADDR 0x4D
102#define HALLCURRENT9_MAP_MIKROBUS( cfg, mikrobus ) \
103 cfg.scl = MIKROBUS( mikrobus, MIKROBUS_SCL ); \
104 cfg.sda = MIKROBUS( mikrobus, MIKROBUS_SDA ); \
105 cfg.an = MIKROBUS( mikrobus, MIKROBUS_AN )
err_t hallcurrent9_init(hallcurrent9_t *ctx, hallcurrent9_cfg_t *cfg)
Hall Current 9 initialization function.
float hallcurrent9_get_current(hallcurrent9_t *ctx, hallcurrent9_calibration_data_t *adc_val)
Hall Current 9 get current function.
err_t hallcurrent9_read_adc(hallcurrent9_t *ctx, uint16_t *read_adc)
Hall Current 9 I2C ADC reading function.
err_t hallcurrent9_set_calibration(hallcurrent9_t *ctx, hallcurrent9_calibration_data_t *adc_val)
Hall Current 9 set calibration function.
void hallcurrent9_cfg_setup(hallcurrent9_cfg_t *cfg)
Hall Current 9 configuration object setup function.
hallcurrent9_return_value_t
Hall Current 9 Click return value data.
Definition hallcurrent9.h:161
@ HALLCURRENT9_OK
Definition hallcurrent9.h:162
@ HALLCURRENT9_ERROR
Definition hallcurrent9.h:163
Hall Current 9 Click calibration object.
Definition hallcurrent9.h:151
uint16_t zero_adc_val
Definition hallcurrent9.h:152
Hall Current 9 Click configuration object.
Definition hallcurrent9.h:135
uint32_t i2c_speed
Definition hallcurrent9.h:141
pin_name_t scl
Definition hallcurrent9.h:136
pin_name_t sda
Definition hallcurrent9.h:137
pin_name_t an
Definition hallcurrent9.h:139
uint8_t i2c_address
Definition hallcurrent9.h:142
Hall Current 9 Click context object.
Definition hallcurrent9.h:115
i2c_master_t i2c
Definition hallcurrent9.h:122
digital_in_t an
Definition hallcurrent9.h:118
uint8_t slave_address
Definition hallcurrent9.h:126