39#ifdef PREINIT_SUPPORTED
43#ifdef MikroCCoreVersion
44 #if MikroCCoreVersion >= 1
49#include "drv_digital_out.h"
50#include "drv_digital_in.h"
51#include "drv_i2c_master.h"
73#define PROXIMITY14_REG_CFG1 0x00
74#define PROXIMITY14_REG_CFG2 0x03
75#define PROXIMITY14_REG_CFG3 0x04
76#define PROXIMITY14_REG_CFG4 0x08
77#define PROXIMITY14_REG_THRESHOLD_LOW 0x05
78#define PROXIMITY14_REG_THRESHOLD_HIGH 0x06
79#define PROXIMITY14_REG_CANCELLATION 0x07
80#define PROXIMITY14_REG_DATA 0xF8
81#define PROXIMITY14_REG_INT_FLAG 0xF9
82#define PROXIMITY14_REG_ID 0xFA
83#define PROXIMITY14_REG_AC_DATA 0xFB
102#define PROXIMITY14_SET_DEV_ADDR 0x60
120#define PROXIMITY14_MAP_MIKROBUS( cfg, mikrobus ) \
121 cfg.scl = MIKROBUS( mikrobus, MIKROBUS_SCL ); \
122 cfg.sda = MIKROBUS( mikrobus, MIKROBUS_SDA ); \
123 cfg.int_pin = MIKROBUS( mikrobus, MIKROBUS_INT )
err_t proximity14_generic_write(proximity14_t *ctx, uint8_t reg, uint16_t tx_data)
Writing function.
err_t proximity14_init(proximity14_t *ctx, proximity14_cfg_t *cfg)
Proximity 14 initialization function.
uint8_t proximity14_get_int(proximity14_t *ctx)
Get INT pin state.
err_t proximity14_generic_read(proximity14_t *ctx, uint8_t reg, uint16_t *rx_data)
Reading function.
void proximity14_cfg_setup(proximity14_cfg_t *cfg)
Proximity 14 configuration object setup function.
err_t proximity14_default_cfg(proximity14_t *ctx)
Proximity 14 default configuration function.
proximity14_return_value_t
Proximity 14 Click return value data.
Definition proximity14.h:166
@ PROXIMITY14_ERROR
Definition proximity14.h:168
@ PROXIMITY14_OK
Definition proximity14.h:167
Proximity 14 Click configuration object.
Definition proximity14.h:150
uint32_t i2c_speed
Definition proximity14.h:156
pin_name_t scl
Definition proximity14.h:151
pin_name_t int_pin
Definition proximity14.h:154
pin_name_t sda
Definition proximity14.h:152
uint8_t i2c_address
Definition proximity14.h:157
Proximity 14 Click context object.
Definition proximity14.h:133
digital_in_t int_pin
Definition proximity14.h:135
i2c_master_t i2c
Definition proximity14.h:138
uint8_t slave_address
Definition proximity14.h:141