proximity14 2.0.0.0
proximity14.h File Reference

This file contains API for Proximity 14 Click Driver. More...

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

Go to the source code of this file.

Data Structures

struct  proximity14_t
 Proximity 14 Click context object. More...
 
struct  proximity14_cfg_t
 Proximity 14 Click configuration object. More...
 

Macros

#define PROXIMITY14_REG_CFG1   0x00
 Proximity 14 description register.
 
#define PROXIMITY14_REG_CFG2   0x03
 
#define PROXIMITY14_REG_CFG3   0x04
 
#define PROXIMITY14_REG_CFG4   0x08
 
#define PROXIMITY14_REG_THRESHOLD_LOW   0x05
 
#define PROXIMITY14_REG_THRESHOLD_HIGH   0x06
 
#define PROXIMITY14_REG_CANCELLATION   0x07
 
#define PROXIMITY14_REG_DATA   0xF8
 
#define PROXIMITY14_REG_INT_FLAG   0xF9
 
#define PROXIMITY14_REG_ID   0xFA
 
#define PROXIMITY14_REG_AC_DATA   0xFB
 
#define PROXIMITY14_SET_DEV_ADDR   0x60
 Proximity 14 device address setting.
 
#define PROXIMITY14_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.
 

Enumerations

enum  proximity14_return_value_t { PROXIMITY14_OK = 0 , PROXIMITY14_ERROR = -1 }
 Proximity 14 Click return value data. More...
 

Functions

void proximity14_cfg_setup (proximity14_cfg_t *cfg)
 Proximity 14 configuration object setup function.
 
err_t proximity14_init (proximity14_t *ctx, proximity14_cfg_t *cfg)
 Proximity 14 initialization function.
 
err_t proximity14_default_cfg (proximity14_t *ctx)
 Proximity 14 default configuration function.
 
err_t proximity14_generic_write (proximity14_t *ctx, uint8_t reg, uint16_t tx_data)
 Writing function.
 
err_t proximity14_generic_read (proximity14_t *ctx, uint8_t reg, uint16_t *rx_data)
 Reading function.
 
uint8_t proximity14_get_int (proximity14_t *ctx)
 Get INT pin state.
 

Detailed Description

This file contains API for Proximity 14 Click Driver.

Enumeration Type Documentation

◆ proximity14_return_value_t

Proximity 14 Click return value data.

Predefined enum values for driver return values.

Enumerator
PROXIMITY14_OK 
PROXIMITY14_ERROR