42#ifdef PREINIT_SUPPORTED
46#ifdef MikroCCoreVersion
47 #if MikroCCoreVersion >= 1
52#include "drv_digital_out.h"
53#include "drv_digital_in.h"
65#define MOTION_MAP_MIKROBUS( cfg, mikrobus ) \
66 cfg.en = MIKROBUS( mikrobus, MIKROBUS_RST ); \
67 cfg.out = MIKROBUS( mikrobus, MIKROBUS_INT );
74#define MOTION_RETVAL uint8_t
77#define MOTION_INIT_ERROR 0xFF
#define MOTION_RETVAL
Definition motion.h:74
motion_detect_state_t motion_get_detected(motion_t *ctx)
Motion detected function.
void motion_default_cfg(motion_t *ctx)
Click Default Configuration function.
void motion_set_en_pin(motion_t *ctx, motion_pin_state_t en_state)
Set states of the enable pin.
void motion_cfg_setup(motion_cfg_t *cfg)
Config Object Initialization function.
MOTION_RETVAL motion_init(motion_t *ctx, motion_cfg_t *cfg)
Initialization function.
motion_pin_state_t
Pin states.
Definition motion.h:118
motion_detect_state_t
Motion OUT ( INT ) Pin states.
Definition motion.h:128
@ MOTION_PIN_STATE_HIGH
Definition motion.h:120
@ MOTION_PIN_STATE_LOW
Definition motion.h:119
@ MOTION_NO_DETECT
Definition motion.h:129
@ MOTION_DETECTED
Definition motion.h:130
Click configuration structure definition.
Definition motion.h:106
pin_name_t out
Definition motion.h:110
pin_name_t en
Definition motion.h:109
Click ctx object definition.
Definition motion.h:91
digital_in_t out
Definition motion.h:98
digital_out_t en
Definition motion.h:94