capwheel2 2.0.0.0
capwheel2.h File Reference

This file contains API for Cap Wheel 2 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  capwheel2_t
 Click ctx object definition. More...
 
struct  capwheel2_cfg_t
 Click configuration structure definition. More...
 

Macros

#define CAPWHEEL2_MAP_MIKROBUS(cfg, mikrobus)
 
#define CAPWHEEL2_RETVAL   uint8_t
 
#define CAPWHEEL2_OK   0x00
 
#define CAPWHEEL2_INIT_ERROR   0xFF
 
#define CAPWHEEL2_DEVICE_ADDRESS   0x44
 
#define CAPWHEEL2_DEVICE_INFO   0x00
 
#define CAPWHEEL2_SYS_FLAGS   0x01
 
#define CAPWHEEL2_COORDINATES   0x02
 
#define CAPWHEEL2_TOUCH_BYTES   0x03
 
#define CAPWHEEL2_COUNTS   0x04
 
#define CAPWHEEL2_LTA   0x05
 
#define CAPWHEEL2_DELTAS   0x06
 
#define CAPWHEEL2_MULTIPLIERS   0x07
 
#define CAPWHEEL2_COMPENSATION   0x08
 
#define CAPWHEEL2_PROX_SETTINGS   0x09
 
#define CAPWHEEL2_THRESHOLDS   0x0A
 
#define CAPWHEEL2_TIMINGS_AND_TARGETS   0x0B
 
#define CAPWHEEL2_GESTURE_TIMERS   0x0C
 
#define CAPWHEEL2_ACTIVE_CHANNELS   0x0D
 
#define CAPWHEEL2_TAP_MASK   0x20
 
#define CAPWHEEL2_TOUCH_MASK   0x02
 
#define CAPWHEEL2_PROX_MASK   0x01
 

Functions

void capwheel2_cfg_setup (capwheel2_cfg_t *cfg)
 Config Object Initialization function.
 
CAPWHEEL2_RETVAL capwheel2_init (capwheel2_t *ctx, capwheel2_cfg_t *cfg)
 Initialization function.
 
uint8_t capwheel2_default_cfg (capwheel2_t *ctx)
 Click Default Configuration function.
 
void capwheel2_i2c_write_no_wait (capwheel2_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Write function.
 
void capwheel2_i2c_read_no_wait (capwheel2_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Read function.
 
uint8_t capwheel2_int_get (capwheel2_t *ctx)
 Getingg state of INT pin.
 
uint8_t capwheel2_wait_for_rdy (capwheel2_t *ctx)
 Waiting for RDY (INT) pin.
 
uint8_t capwheel2_i2c_read_wait (capwheel2_t *ctx, uint8_t register_address, uint8_t *read_buffer, uint8_t n_bytes)
 Read wait function.
 
uint8_t capwheel2_i2c_write_wait (capwheel2_t *ctx, uint8_t register_address, uint8_t *register_values, uint8_t n_bytes)
 Write wait function.
 

Detailed Description

This file contains API for Cap Wheel 2 Click driver.