Go to the documentation of this file.
35 #include "mikrosdk_version.h"
38 #if mikroSDK_GET_VERSION < 20800ul
39 #include "rcu_delays.h"
45 #include "drv_digital_out.h"
46 #include "drv_digital_in.h"
69 #define MOTION4_MODULE_ENABLE 0x00
70 #define MOTION4_MODULE_DISABLE 0x01
71 #define MOTION4_NO_DETECT_OBJECT 0x00
72 #define MOTION4_DETECT_OBJECT 0x01
91 #define MOTION4_MAP_MIKROBUS( cfg, mikrobus ) \
92 cfg.en = MIKROBUS( mikrobus, MIKROBUS_RST ); \
93 cfg.int_pin = MIKROBUS( mikrobus, MIKROBUS_INT )
void motion4_cfg_setup(motion4_cfg_t *cfg)
Motion 4 configuration object setup function.
pin_name_t int_pin
Definition: motion4.h:124
uint8_t motion4_detect_state(motion4_t *ctx)
Get detection state function.
pin_name_t en
Definition: motion4.h:123
digital_in_t int_pin
Definition: motion4.h:110
motion4_detect_state_t
Definition: motion4.h:146
@ MOTION4_ERROR
Definition: motion4.h:135
@ MOTION4_PIN_STATE_HIGH
Definition: motion4.h:155
@ MOTION4_DETECTED
Definition: motion4.h:148
@ MOTION4_PIN_STATE_LOW
Definition: motion4.h:154
err_t motion4_init(motion4_t *ctx, motion4_cfg_t *cfg)
Motion 4 initialization function.
@ MOTION4_NO_DETECT
Definition: motion4.h:147
digital_out_t en
Definition: motion4.h:106
@ MOTION4_OK
Definition: motion4.h:134
motion4_return_value_t
Motion 4 Click return value data.
Definition: motion4.h:133
Motion 4 Click context object.
Definition: motion4.h:103
motion4_pin_state_t
Definition: motion4.h:153
Motion 4 Click configuration object.
Definition: motion4.h:120
void motion4_enable(motion4_t *ctx, uint8_t state)
Enable motion sensor function.