39#ifdef PREINIT_SUPPORTED
43#ifdef MikroCCoreVersion
44 #if MikroCCoreVersion >= 1
49#include "drv_digital_out.h"
50#include "drv_digital_in.h"
67#define SPEEDSENSE_CNV_MIN_TO_MS 60000.0f
73#define SPEEDSENSE_DIR_STATE_FWD 0
74#define SPEEDSENSE_DIR_STATE_RVS 1
75#define SPEEDSENSE_SPEED_STATE_LOW 0
76#define SPEEDSENSE_SPEED_STATE_HIGH 1
82#define SPEEDSENSE_STOP_MEASURE 0
83#define SPEEDSENSE_START_NEW_MEASURE 1
101#define SPEEDSENSE_MAP_MIKROBUS( cfg, mikrobus ) \
102 cfg.chb = MIKROBUS( mikrobus, MIKROBUS_AN ); \
103 cfg.cha = MIKROBUS( mikrobus, MIKROBUS_INT )
uint8_t speedsense_get_speed(speedsense_t *ctx)
Speed Sense CHA pin reading function.
err_t speedsense_init(speedsense_t *ctx, speedsense_cfg_t *cfg)
Speed Sense initialization function.
void speedsense_cfg_setup(speedsense_cfg_t *cfg)
Speed Sense configuration object setup function.
uint8_t speedsense_get_direction(speedsense_t *ctx)
Speed Sense CHB pin reading function.
speedsense_return_value_t
Speed Sense Click return value data.
Definition speedsense.h:135
@ SPEEDSENSE_OK
Definition speedsense.h:136
@ SPEEDSENSE_ERROR
Definition speedsense.h:137
Speed Sense Click configuration object.
Definition speedsense.h:124
pin_name_t chb
Definition speedsense.h:125
pin_name_t cha
Definition speedsense.h:126
Speed Sense Click context object.
Definition speedsense.h:113
digital_in_t chb
Definition speedsense.h:114
digital_in_t cha
Definition speedsense.h:115