39#ifdef PREINIT_SUPPORTED
43#ifdef MikroCCoreVersion
44 #if MikroCCoreVersion >= 1
49#include "drv_digital_out.h"
50#include "drv_digital_in.h"
72#define HALLSWITCH2_NO_MAGNET_DETECTED 0
73#define HALLSWITCH2_S_POLE_DETECTED 1
74#define HALLSWITCH2_N_POLE_DETECTED 2
92#define HALLSWITCH2_MAP_MIKROBUS( cfg, mikrobus ) \
93 cfg.n = MIKROBUS( mikrobus, MIKROBUS_CS ); \
94 cfg.s = MIKROBUS( mikrobus, MIKROBUS_INT )
void hallswitch2_cfg_setup(hallswitch2_cfg_t *cfg)
Hall Switch 2 configuration object setup function.
uint8_t hallswitch2_check_state(hallswitch2_t *ctx)
Hall Switch 2 check state function.
err_t hallswitch2_init(hallswitch2_t *ctx, hallswitch2_cfg_t *cfg)
Hall Switch 2 initialization function.
hallswitch2_return_value_t
Hall Switch 2 Click return value data.
Definition hallswitch2.h:126
@ HALLSWITCH2_ERROR
Definition hallswitch2.h:128
@ HALLSWITCH2_OK
Definition hallswitch2.h:127
Hall Switch 2 Click configuration object.
Definition hallswitch2.h:115
pin_name_t n
Definition hallswitch2.h:116
pin_name_t s
Definition hallswitch2.h:117
Hall Switch 2 Click context object.
Definition hallswitch2.h:104
digital_in_t s
Definition hallswitch2.h:106
digital_in_t n
Definition hallswitch2.h:105