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 QIRX_RESOLUTION 4096
74#define QIRX_12_BIT_DATA 0x0FFF
80#define QIRX_SET_DEV_ADDR 0x4D
98#define QIRX_MAP_MIKROBUS( cfg, mikrobus ) \
99 cfg.scl = MIKROBUS( mikrobus, MIKROBUS_SCL ); \
100 cfg.sda = MIKROBUS( mikrobus, MIKROBUS_SDA )
uint16_t qirx_read_data(qirx_t *ctx)
Read data function.
void qirx_cfg_setup(qirx_cfg_t *cfg)
Qi RX configuration object setup function.
uint16_t qirx_read_voltage(qirx_t *ctx, uint16_t v_ref)
Read voltage function.
err_t qirx_init(qirx_t *ctx, qirx_cfg_t *cfg)
Qi RX initialization function.
uint16_t v_ref
Definition main.c:29
qirx_return_value_t
Qi RX Click return value data.
Definition qirx.h:138
@ QIRX_OK
Definition qirx.h:139
@ QIRX_ERROR
Definition qirx.h:140
Qi RX Click configuration object.
Definition qirx.h:124
uint32_t i2c_speed
Definition qirx.h:128
pin_name_t scl
Definition qirx.h:125
pin_name_t sda
Definition qirx.h:126
uint8_t i2c_address
Definition qirx.h:129
Qi RX Click context object.
Definition qirx.h:110
i2c_master_t i2c
Definition qirx.h:112
uint8_t slave_address
Definition qirx.h:115