motion 2.0.0.0
|
Functions | |
void | motion_cfg_setup (motion_cfg_t *cfg) |
Config Object Initialization function. | |
MOTION_RETVAL | motion_init (motion_t *ctx, motion_cfg_t *cfg) |
Initialization function. | |
void | motion_default_cfg (motion_t *ctx) |
Click Default Configuration function. | |
void | motion_set_en_pin (motion_t *ctx, motion_pin_state_t en_state) |
Set states of the enable pin. | |
motion_detect_state_t | motion_get_detected (motion_t *ctx) |
Motion detected function. | |
void motion_cfg_setup | ( | motion_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
void motion_default_cfg | ( | motion_t * | ctx | ) |
Click Default Configuration function.
ctx | Click object. |
@description This function executes default configuration for Motion click.
motion_detect_state_t motion_get_detected | ( | motion_t * | ctx | ) |
Motion detected function.
ctx | Click object. |
out_pin_state | - MOTION_NO_DETECT : motion is not detected. - MOTION_DETECTED : motion is detected. |
@description Function detect motion and return MOTION_DETECTED ( 1 ) if a motion is detected or MOTION_NO_DETECT ( 0 ) if a motion is not detected.
MOTION_RETVAL motion_init | ( | motion_t * | ctx, |
motion_cfg_t * | cfg ) |
Initialization function.
motion | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.
void motion_set_en_pin | ( | motion_t * | ctx, |
motion_pin_state_t | en_state ) |
Set states of the enable pin.
ctx | Click object. |
en_state | - MOTION_PIN_STATE_LOW : disables the sensor. - MOTION_PIN_STATE_HIGH : enable, places the sensor in detection mode. |
@description This function sets states of the EN ( RST ) pin for Motion click.