Go to the documentation of this file.
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
76 #define MOTION_OK 0x00
77 #define MOTION_INIT_ERROR 0xFF
Click ctx object definition.
Definition: motion.h:91
@ MOTION_PIN_STATE_HIGH
Definition: motion.h:120
void motion_set_en_pin(motion_t *ctx, motion_pin_state_t en_state)
Set states of the enable pin.
MOTION_RETVAL motion_init(motion_t *ctx, motion_cfg_t *cfg)
Initialization function.
motion_pin_state_t
Pin states.
Definition: motion.h:118
pin_name_t out
Definition: motion.h:110
@ MOTION_NO_DETECT
Definition: motion.h:129
motion_detect_state_t motion_get_detected(motion_t *ctx)
Motion detected function.
@ MOTION_DETECTED
Definition: motion.h:130
Click configuration structure definition.
Definition: motion.h:106
digital_out_t en
Definition: motion.h:94
digital_in_t out
Definition: motion.h:98
motion_detect_state_t
Motion OUT ( INT ) Pin states.
Definition: motion.h:128
void motion_default_cfg(motion_t *ctx)
Click Default Configuration function.
pin_name_t en
Definition: motion.h:109
#define MOTION_RETVAL
Definition: motion.h:74
void motion_cfg_setup(motion_cfg_t *cfg)
Config Object Initialization function.
@ MOTION_PIN_STATE_LOW
Definition: motion.h:119