motion 2.0.0.0
motion.h File Reference

This file contains API for MOTION Click driver. More...

#include "drv_digital_out.h"
#include "drv_digital_in.h"

Go to the source code of this file.

Data Structures

struct  motion_t
 Click ctx object definition. More...
 
struct  motion_cfg_t
 Click configuration structure definition. More...
 

Macros

#define MOTION_MAP_MIKROBUS(cfg, mikrobus)
 
#define MOTION_RETVAL   uint8_t
 
#define MOTION_OK   0x00
 
#define MOTION_INIT_ERROR   0xFF
 

Enumerations

enum  motion_pin_state_t { MOTION_PIN_STATE_LOW = 0 , MOTION_PIN_STATE_HIGH }
 Pin states. More...
 
enum  motion_detect_state_t { MOTION_NO_DETECT = 0 , MOTION_DETECTED }
 Motion OUT ( INT ) Pin states. More...
 

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.
 

Detailed Description

This file contains API for MOTION Click driver.