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"
68 #define MOTION2_MODULE_ENABLE 0x00
69 #define MOTION2_MODULE_DISABLE 0x01
70 #define MOTION2_NO_DETECT_OBJECT 0x00
71 #define MOTION2_DETECT_OBJECT 0x01
89 #define MOTION2_MAP_MIKROBUS( cfg, mikrobus ) \
90 cfg.en = MIKROBUS( mikrobus, MIKROBUS_RST ); \
91 cfg.int_pin = MIKROBUS( mikrobus, MIKROBUS_INT );
@ MOTION2_ERROR
Definition: motion2.h:132
@ MOTION2_DETECTED
Definition: motion2.h:144
digital_out_t en
Definition: motion2.h:104
void motion2_enable(motion2_t *ctx, uint8_t state)
Enable motion sensor function.
@ MOTION2_PIN_STATE_HIGH
Definition: motion2.h:151
motion2_detect_state_t
Definition: motion2.h:142
uint8_t motion2_detect_state(motion2_t *ctx)
Get detection state function.
pin_name_t en
Definition: motion2.h:120
motion2_return_value_t
Motion 2 Click return value data.
Definition: motion2.h:130
@ MOTION2_NO_DETECT
Definition: motion2.h:143
Motion 2 Click context object.
Definition: motion2.h:101
motion2_pin_state_t
Definition: motion2.h:149
digital_in_t int_pin
Definition: motion2.h:108
@ MOTION2_PIN_STATE_LOW
Definition: motion2.h:150
void motion2_cfg_setup(motion2_cfg_t *cfg)
Config Object Initialization function.
@ MOTION2_OK
Definition: motion2.h:131
pin_name_t int_pin
Definition: motion2.h:121
Motion 2 Click configuration object.
Definition: motion2.h:117
err_t motion2_init(motion2_t *ctx, motion2_cfg_t *cfg)
Initialization function.