28#ifndef HALLCURRENT11_H
29#define HALLCURRENT11_H
39#ifdef PREINIT_SUPPORTED
43#ifdef MikroCCoreVersion
44 #if MikroCCoreVersion >= 1
49#include "drv_i2c_master.h"
50#include "drv_analog_in.h"
73#define HALLCURRENT11_SET_DEV_ADDR 0x4D
91#define HALLCURRENT11_MAP_MIKROBUS( cfg, mikrobus ) \
92 cfg.scl = MIKROBUS( mikrobus, MIKROBUS_SCL ); \
93 cfg.sda = MIKROBUS( mikrobus, MIKROBUS_SDA ); \
94 cfg.an = MIKROBUS( mikrobus, MIKROBUS_AN )
err_t hallcurrent11_read_an_pin_voltage(hallcurrent11_t *ctx, float *data_out)
Hall Current 11 read AN pin voltage level function.
err_t hallcurrent11_default_cfg(hallcurrent11_t *ctx)
Hall Current 11 default configuration function.
void hallcurrent11_cfg_setup(hallcurrent11_cfg_t *cfg)
Hall Current 11 configuration object setup function.
err_t hallcurrent11_get_adc_voltage(hallcurrent11_t *ctx, float *adc_vtg)
Hall Current 11 get ADC voltage function.
err_t hallcurrent11_get_adc(hallcurrent11_t *ctx, uint16_t *data_out)
Hall Current 11 ADC reading function.
err_t hallcurrent11_get_current(hallcurrent11_t *ctx, float *current)
Hall Current 11 get current function.
err_t hallcurrent11_init(hallcurrent11_t *ctx, hallcurrent11_cfg_t *cfg)
Hall Current 11 initialization function.
err_t(* hallcurrent11_master_io_t)(struct hallcurrent11_s *, uint16_t *)
Hall Current 11 Click driver interface.
Definition hallcurrent11.h:115
hallcurrent11_drv_t
Hall Current 11 Click driver selector.
Definition hallcurrent11.h:105
@ HALLCURRENT11_DRV_SEL_AN
Definition hallcurrent11.h:106
@ HALLCURRENT11_DRV_SEL_I2C
Definition hallcurrent11.h:107
struct hallcurrent11_s hallcurrent11_t
Hall Current 11 Click context object.
hallcurrent11_return_value_t
Hall Current 11 Click return value data.
Definition hallcurrent11.h:161
@ HALLCURRENT11_ERROR
Definition hallcurrent11.h:163
@ HALLCURRENT11_OK
Definition hallcurrent11.h:162
Hall Current 11 Click configuration object.
Definition hallcurrent11.h:140
analog_in_resolution_t resolution
Definition hallcurrent11.h:143
hallcurrent11_drv_t drv_sel
Definition hallcurrent11.h:152
float vref
Definition hallcurrent11.h:144
uint32_t i2c_speed
Definition hallcurrent11.h:149
pin_name_t scl
Definition hallcurrent11.h:146
pin_name_t sda
Definition hallcurrent11.h:147
pin_name_t an
Definition hallcurrent11.h:141
uint8_t i2c_address
Definition hallcurrent11.h:150
Hall Current 11 Click context object.
Definition hallcurrent11.h:122
hallcurrent11_drv_t drv_sel
Definition hallcurrent11.h:129
i2c_master_t i2c
Definition hallcurrent11.h:125
hallcurrent11_master_io_t read_adc_f
Definition hallcurrent11.h:131
uint8_t slave_address
Definition hallcurrent11.h:127
analog_in_t adc
Definition hallcurrent11.h:123