motion4 2.0.0.0
motion4.h File Reference

This file contains API for Motion 4 Click Driver. More...

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

Go to the source code of this file.

Data Structures

struct  motion4_t
 Motion 4 Click context object. More...
 
struct  motion4_cfg_t
 Motion 4 Click configuration object. More...
 

Macros

#define MOTION4_MODULE_ENABLE   0x00
 MikroBUS pin set.
 
#define MOTION4_MODULE_DISABLE   0x01
 
#define MOTION4_NO_DETECT_OBJECT   0x00
 
#define MOTION4_DETECT_OBJECT   0x01
 
#define MOTION4_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.
 

Enumerations

enum  motion4_return_value_t { MOTION4_OK = 0 , MOTION4_ERROR = -1 }
 Motion 4 Click return value data. More...
 
enum  motion4_detect_state_t { MOTION4_NO_DETECT = 0 , MOTION4_DETECTED }
 
enum  motion4_pin_state_t { MOTION4_PIN_STATE_LOW = 0 , MOTION4_PIN_STATE_HIGH }
 

Functions

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.
 
void motion4_enable (motion4_t *ctx, uint8_t state)
 Enable motion sensor function.
 
uint8_t motion4_detect_state (motion4_t *ctx)
 Get detection state function.
 

Detailed Description

This file contains API for Motion 4 Click Driver.

Enumeration Type Documentation

◆ motion4_return_value_t

Motion 4 Click return value data.

Predefined enum values for driver return values.

Enumerator
MOTION4_OK 
MOTION4_ERROR