39#ifdef PREINIT_SUPPORTED
43#ifdef MikroCCoreVersion
44 #if MikroCCoreVersion >= 1
49#include "drv_digital_out.h"
50#include "drv_digital_in.h"
73#define MOTION4_MODULE_ENABLE 0x00
74#define MOTION4_MODULE_DISABLE 0x01
75#define MOTION4_NO_DETECT_OBJECT 0x00
76#define MOTION4_DETECT_OBJECT 0x01
95#define MOTION4_MAP_MIKROBUS( cfg, mikrobus ) \
96 cfg.en = MIKROBUS( mikrobus, MIKROBUS_RST ); \
97 cfg.int_pin = MIKROBUS( mikrobus, MIKROBUS_INT )
motion4_detect_state_t
Definition motion4.h:150
motion4_pin_state_t
Definition motion4.h:157
void motion4_enable(motion4_t *ctx, uint8_t state)
Enable motion sensor function.
void motion4_cfg_setup(motion4_cfg_t *cfg)
Motion 4 configuration object setup function.
err_t motion4_init(motion4_t *ctx, motion4_cfg_t *cfg)
Motion 4 initialization function.
uint8_t motion4_detect_state(motion4_t *ctx)
Get detection state function.
@ MOTION4_DETECTED
Definition motion4.h:152
@ MOTION4_NO_DETECT
Definition motion4.h:151
@ MOTION4_PIN_STATE_LOW
Definition motion4.h:158
@ MOTION4_PIN_STATE_HIGH
Definition motion4.h:159
motion4_return_value_t
Motion 4 Click return value data.
Definition motion4.h:137
@ MOTION4_ERROR
Definition motion4.h:139
@ MOTION4_OK
Definition motion4.h:138
Motion 4 Click configuration object.
Definition motion4.h:124
pin_name_t en
Definition motion4.h:127
pin_name_t int_pin
Definition motion4.h:128
Motion 4 Click context object.
Definition motion4.h:107
digital_in_t int_pin
Definition motion4.h:114
digital_out_t en
Definition motion4.h:110