motion2 2.0.0.0
|
API for configuring and manipulating Motion 2 Click driver. More...
Topics | |
Motion 2 MikroBUS Map | |
MikroBUS pin mapping of Motion 2 Click driver. | |
Motion 2 MikroBUS Map | |
MikroBUS pin mapping of Motion 2 Click driver. | |
Enumerations | |
enum | motion2_detect_state_t { MOTION2_NO_DETECT = 0 , MOTION2_DETECTED } |
enum | motion2_pin_state_t { MOTION2_PIN_STATE_LOW = 0 , MOTION2_PIN_STATE_HIGH } |
Functions | |
void | motion2_cfg_setup (motion2_cfg_t *cfg) |
Config Object Initialization function. | |
err_t | motion2_init (motion2_t *ctx, motion2_cfg_t *cfg) |
Initialization function. | |
void | motion2_enable (motion2_t *ctx, uint8_t state) |
Enable motion sensor function. | |
uint8_t | motion2_detect_state (motion2_t *ctx) |
Get detection state function. | |
API for configuring and manipulating Motion 2 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
enum motion2_pin_state_t |
void motion2_cfg_setup | ( | motion2_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
uint8_t motion2_detect_state | ( | motion2_t * | ctx | ) |
Get detection state function.
@description This function returns INT pin state.
void motion2_enable | ( | motion2_t * | ctx, |
uint8_t | state ) |
Enable motion sensor function.
state | Enable/Disable sensor |
@description This function enables/disables motion sensor by setting EN pin state.
err_t motion2_init | ( | motion2_t * | ctx, |
motion2_cfg_t * | cfg ) |
Initialization function.
motion2 | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.