Go to the documentation of this file.
38 #include "drv_digital_out.h"
39 #include "drv_digital_in.h"
51 #define MOTION_MAP_MIKROBUS( cfg, mikrobus ) \
52 cfg.en = MIKROBUS( mikrobus, MIKROBUS_RST ); \
53 cfg.out = MIKROBUS( mikrobus, MIKROBUS_INT );
60 #define MOTION_RETVAL uint8_t
62 #define MOTION_OK 0x00
63 #define MOTION_INIT_ERROR 0xFF
Click ctx object definition.
Definition: motion.h:76
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:103
pin_name_t out
Definition: motion.h:96
motion_pin_state_t motion_get_detected(motion_t *ctx)
Motion detected function.
Click configuration structure definition.
Definition: motion.h:91
digital_out_t en
Definition: motion.h:80
digital_in_t out
Definition: motion.h:84
motion_detect_state_t
Motion OUT ( INT ) Pin states.
Definition: motion.h:113
void motion_default_cfg(motion_t *ctx)
Click Default Configuration function.
pin_name_t en
Definition: motion.h:95
#define MOTION_RETVAL
Definition: motion.h:60
void motion_cfg_setup(motion_cfg_t *cfg)
Config Object Initialization function.