42#ifdef PREINIT_SUPPORTED
46#ifdef MikroCCoreVersion
47 #if MikroCCoreVersion >= 1
52#include "drv_digital_in.h"
64#define TILT_MAP_MIKROBUS( cfg, mikrobus ) \
65 cfg.vo1= MIKROBUS( mikrobus, MIKROBUS_PWM ); \
66 cfg.vo2= MIKROBUS( mikrobus, MIKROBUS_INT )
73#define TILT_RETVAL uint8_t
76#define TILT_INIT_ERROR 0xFF
83#define TILT_NO_DETECTION 0
84#define TILT_DETECTION 1
85#define TILT_LEFT_DETECTION 2
86#define TILT_RIGHT_DETECTION 3
87#define TILT_UP_DETECTION 4
88#define TILT_DOWN_DETECTION 5
131 // End constants group
139 // End variable group
#define TILT_RETVAL
Definition tilt.h:73
void tilt_cfg_setup(tilt_cfg_t *cfg)
Config Object Initialization function.
uint8_t tilt_direction(tilt_t *ctx)
Check the tilt movement's direction function.
uint8_t tilt_right(tilt_t *ctx)
Check the tilt right movement's direction function.
uint8_t tilt_up(tilt_t *ctx)
Check the tilt up movement's direction function.
uint8_t tilt_left(tilt_t *ctx)
Check the tilt left movement's direction function.
uint8_t tilt_down(tilt_t *ctx)
Check the tilt down movement's direction function.
TILT_RETVAL tilt_init(tilt_t *ctx, tilt_cfg_t *cfg)
Initialization function.
Click configuration structure definition.
Definition tilt.h:114
pin_name_t vo2
Definition tilt.h:118
pin_name_t vo1
Definition tilt.h:117
Click ctx object definition.
Definition tilt.h:102
digital_in_t vo2
Definition tilt.h:106
digital_in_t vo1
Definition tilt.h:105