42#ifdef PREINIT_SUPPORTED
46#ifdef MikroCCoreVersion
47 #if MikroCCoreVersion >= 1
52#include "drv_digital_out.h"
64#define HALLSWITCH_MAP_MIKROBUS( cfg, mikrobus ) \
65 cfg.np= MIKROBUS( mikrobus, MIKROBUS_CS ); \
66 cfg.sp= MIKROBUS( mikrobus, MIKROBUS_INT );
73#define HALLSWITCH_RETVAL uint8_t
75#define HALLSWITCH_OK 0x00
76#define HALLSWITCH_INIT_ERROR 0xFF
83#define HALLSWITCH_POLE_ACTIVE 0x00
84#define HALLSWITCH_POLE_NO_ACTIVE 0x01
#define HALLSWITCH_RETVAL
Definition hallswitch.h:73
void hallswitch_set_spole(hallswitch_t *ctx, uint8_t state)
Function for turn on and turn off S Pole.
void hallswitch_set_npole(hallswitch_t *ctx, uint8_t state)
Function for turn on and turn off N Pole.
HALLSWITCH_RETVAL hallswitch_init(hallswitch_t *ctx, hallswitch_cfg_t *cfg)
Initialization function.
void hallswitch_cfg_setup(hallswitch_cfg_t *cfg)
Config Object Initialization function.
Click configuration structure definition.
Definition hallswitch.h:110
pin_name_t sp
Definition hallswitch.h:114
pin_name_t np
Definition hallswitch.h:113
Click ctx object definition.
Definition hallswitch.h:98
digital_out_t np
Definition hallswitch.h:101
digital_out_t sp
Definition hallswitch.h:102