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_analog_in.h"
67#define TMRMIXSENS_MAP_MIKROBUS( cfg, mikrobus ) \
68 cfg.an_pin = MIKROBUS( mikrobus, MIKROBUS_AN ); \
69 cfg.omn = MIKROBUS( mikrobus, MIKROBUS_RST ); \
70 cfg.bi = MIKROBUS( mikrobus, MIKROBUS_CS )
78#define TMRMIXSENS_RETVAL uint8_t
80#define TMRMIXSENS_OK 0x00
81#define TMRMIXSENS_INIT_ERROR 0xFF
88#define TMRMIXSENS_SOUTH_POLE 0
89#define TMRMIXSENS_NORTH_POLE 1
#define TMRMIXSENS_RETVAL
Definition tmrmixsens.h:78
uint8_t tmrmixsens_get_omnipolar(tmrmixsens_t *ctx)
Get state of the omnipolar ( OMN ) pin function.
tmrmixsens_data_t tmrmixsens_generic_read(tmrmixsens_t *ctx)
Generic read function.
void tmrmixsens_cfg_setup(tmrmixsens_cfg_t *cfg)
Config Object Initialization function.
uint8_t tmrmixsens_get_bipolar(tmrmixsens_t *ctx)
Get state of the bipolar ( BI ) pin function.
TMRMIXSENS_RETVAL tmrmixsens_init(tmrmixsens_t *ctx, tmrmixsens_cfg_t *cfg)
Initialization function.
uint16_t tmrmixsens_data_t
Analog data type.
Definition tmrmixsens.h:102
Click configuration structure definition.
Definition tmrmixsens.h:124
analog_in_resolution_t resolution
Definition tmrmixsens.h:136
pin_name_t bi
Definition tmrmixsens.h:132
float vref
Definition tmrmixsens.h:137
pin_name_t an_pin
Definition tmrmixsens.h:127
pin_name_t omn
Definition tmrmixsens.h:131
Click ctx object definition.
Definition tmrmixsens.h:108
digital_in_t bi
Definition tmrmixsens.h:112
digital_in_t omn
Definition tmrmixsens.h:111
analog_in_t adc
Definition tmrmixsens.h:116