qireceiver 2.0.0.0
qireceiver.h File Reference

This file contains API for Qi Receiver 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  qireceiver_t
 Click ctx object definition. More...
 
struct  qireceiver_cfg_t
 Click configuration structure definition. More...
 

Macros

#define QIRECEIVER_MAP_MIKROBUS(cfg, mikrobus)
 
#define QIRECEIVER_RETVAL   uint8_t
 
#define QIRECEIVER_OK   0x00
 
#define QIRECEIVER_INIT_ERROR   0xFF
 
#define QIRECEIVER_I2C_ADDR   0x25
 
#define QIRECEIVER_VRECT_REG0   0x40
 
#define QIRECEIVER_VRECT_REG1   0x41
 
#define QIRECEIVER_IOUT_REG2   0x42
 
#define QIRECEIVER_IOUT_REG3   0x43
 
#define QIRECEIVER_FREQ_REG4   0x44
 
#define QIRECEIVER_FREQ_REG5   0x45
 
#define QIRECEIVER_REG7   0x47
 
#define QIRECEIVER_REG8   0x48
 
#define QIRECEIVER_WPC_ID_B0   0x54
 
#define QIRECEIVER_WPC_ID_B1   0x55
 
#define QIRECEIVER_WPC_ID_B2   0x56
 
#define QIRECEIVER_WPC_ID_B3   0x57
 
#define QIRECEIVER_WPC_ID_B4   0x58
 
#define QIRECEIVER_WPC_ID_B5   0x59
 
#define QIRECEIVER_WPC_ID_B6   0x5A
 
#define QIRECEIVER_FOD9   0x49
 
#define QIRECEIVER_FOD10   0x4A
 
#define QIRECEIVER_FOD11   0x4B
 
#define QIRECEIVER_FOD12   0x4C
 
#define QIRECEIVER_FOD13   0x4D
 
#define QIRECEIVER_FOD14   0x4E
 
#define QIRECEIVER_FOD15   0x4F
 
#define QIRECEIVER_FOD16   0x50
 
#define QIRECEIVER_FOD17   0x51
 
#define QIRECEIVER_FOD18   0x52
 
#define QIRECEIVER_FOD19   0x53
 

Functions

void qireceiver_cfg_setup (qireceiver_cfg_t *cfg)
 Config Object Initialization function.
 
QIRECEIVER_RETVAL qireceiver_init (qireceiver_t *ctx, qireceiver_cfg_t *cfg)
 Initialization function.
 
void qireceiver_generic_write (qireceiver_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic write function.
 
void qireceiver_generic_read (qireceiver_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic read function.
 
float qireceiver_read_voltage (qireceiver_t *ctx)
 Read Voltage function.
 
float qireceiver_read_current (qireceiver_t *ctx)
 Read Current function.
 
float qireceiver_read_freq (qireceiver_t *ctx)
 Read Frequency function.
 
void qireceiver_dev_enable (qireceiver_t *ctx)
 Device enable function.
 

Detailed Description

This file contains API for Qi Receiver Click driver.