28#ifndef HALLCURRENT8120A_H
29#define HALLCURRENT8120A_H
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_analog_in.h"
73#define HALLCURRENT8120A_MAP_MIKROBUS( cfg, mikrobus ) \
74 cfg.an = MIKROBUS( mikrobus, MIKROBUS_AN ); \
75 cfg.oc1 = MIKROBUS( mikrobus, MIKROBUS_PWM ); \
76 cfg.oc2 = MIKROBUS( mikrobus, MIKROBUS_INT )
void hallcurrent8120a_cfg_setup(hallcurrent8120a_cfg_t *cfg)
Hall Current 8 120A configuration object setup function.
err_t hallcurrent8120a_get_current(hallcurrent8120a_t *ctx, float *current)
Hall Current 8 120A get current level function.
uint8_t hallcurrent8120a_get_odc2(hallcurrent8120a_t *ctx)
Hall Current 8 120A get state of OC2 function.
err_t hallcurrent8120a_get_voltage(hallcurrent8120a_t *ctx, float *avr_voltage)
Hall Current 8 120A read voltage level function.
err_t hallcurrent8120a_read_pin_volt(hallcurrent8120a_t *ctx, float *data_out)
Hall Current 8 120A read AN pin voltage level function.
err_t hallcurrent8120a_read_pin_value(hallcurrent8120a_t *ctx, uint16_t *data_out)
Hall Current 8 120A read AN pin value function.
err_t hallcurrent8120a_init(hallcurrent8120a_t *ctx, hallcurrent8120a_cfg_t *cfg)
Hall Current 8 120A initialization function.
err_t hallcurrent8120a_calibration(hallcurrent8120a_t *ctx)
Hall Current 8 120A calibration function.
uint8_t hallcurrent8120a_get_odc1(hallcurrent8120a_t *ctx)
Hall Current 8 120A get state of OC1 function.
hallcurrent8120a_return_value_t
Hall Current 8 120A Click return value data.
Definition hallcurrent8120a.h:116
@ HALLCURRENT8120A_OK
Definition hallcurrent8120a.h:117
@ HALLCURRENT8120A_ERROR
Definition hallcurrent8120a.h:118
Hall Current 8 120A Click configuration object.
Definition hallcurrent8120a.h:101
analog_in_resolution_t resolution
Definition hallcurrent8120a.h:106
float vref
Definition hallcurrent8120a.h:107
pin_name_t oc2
Definition hallcurrent8120a.h:104
pin_name_t oc1
Definition hallcurrent8120a.h:103
pin_name_t an
Definition hallcurrent8120a.h:102
Hall Current 8 120A Click context object.
Definition hallcurrent8120a.h:86
float offset
Definition hallcurrent8120a.h:92
digital_in_t oc1
Definition hallcurrent8120a.h:87
digital_in_t oc2
Definition hallcurrent8120a.h:88
analog_in_t adc
Definition hallcurrent8120a.h:90