touchpad5 2.0.0.0
touchpad5.h File Reference

This file contains API for Touchpad 5 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  touchpad5_t
 Touchpad 5 Click context object. More...
 
struct  touchpad5_cfg_t
 Touchpad 5 Click configuration object. More...
 
struct  touchpad5_ver_info_t
 TouchPad 5 device version information object. More...
 
struct  touchpad5_touch_t
 TouchPad 5 XY data object. More...
 
struct  touchpad5_channel_setup_t
 TouchPad 5 Channel Setup object. More...
 
struct  touchpad5_threshold_settings_t
 TouchPad 5 Threshold Settings object. More...
 
struct  touchpad5_control_settings_t
 TouchPad 5 Control Settings object. More...
 

Macros

#define TOUCHPAD5_CMD_VERSION_INFO   0x00
 TouchPad 5 description register.
 
#define TOUCHPAD5_CMD_XY_DATA   0x01
 
#define TOUCHPAD5_CMD_PROXIMITY_STATUS   0x02
 
#define TOUCHPAD5_CMD_TOUCH_STATUS   0x03
 
#define TOUCHPAD5_CMD_COUNT_VALUES   0x04
 
#define TOUCHPAD5_CMD_LONG_TERM_AVERAGES   0x05
 
#define TOUCHPAD5_CMD_ATI_COMPENSATION   0x06
 
#define TOUCHPAD5_CMD_PORT_CONTROL   0x07
 
#define TOUCHPAD5_CMD_SNAP_STATUS   0x08
 
#define TOUCHPAD5_CMD_CONTROL_SETTINGS   0x10
 
#define TOUCHPAD5_CMD_THRESHOLD_SETTINGS   0x11
 
#define TOUCHPAD5_CMD_ATI_SETTINGS   0x12
 
#define TOUCHPAD5_CMD_FILTER_SETTINGS   0x13
 
#define TOUCHPAD5_CMD_TIMING_SETTINGS   0x14
 
#define TOUCHPAD5_CMD_CHANNEL_SETUP   0x15
 
#define TOUCHPAD5_CMD_HARDWARE_CONFIG_SETTINGS   0x16
 
#define TOUCHPAD5_CMD_ACTIVE_CHANNELS   0x17
 
#define TOUCHPAD5_CMD_DEBOUNCE_SETTINGS   0x18
 
#define TOUCHPAD5_CMD_PM_PROXIMITY_STATUS   0x20
 
#define TOUCHPAD5_CMD_PM_COUNT_VALUES   0x21
 
#define TOUCHPAD5_CMD_PM_LONG_TERM_AVERAGES   0x22
 
#define TOUCHPAD5_CMD_PM_ATI_COMPENSATION   0x23
 
#define TOUCHPAD5_CMD_PM_ATI_SETTINGS   0x24
 
#define TOUCHPAD5_CMD_BOOTLOADER   0xFF
 
#define TOUCHPAD5_SET_DEV_ADDR   0x74
 TouchPad 5 device address setting.
 
#define TOUCHPAD5_SHOW_RESET   0x80
 TouchPad 5 description setting.
 
#define TOUCHPAD5_MODE_INDICATOR   0x40
 
#define TOUCHPAD5_NOISE_STATUS   0x20
 
#define TOUCHPAD5_LP_STATUS   0x10
 
#define TOUCHPAD5_SNAP_OUTPUT   0x08
 
#define TOUCHPAD5_NO_OF_FINGERS   0x07
 
#define TOUCHPAD5_ACK_RESET   0x80
 TouchPad 5 Control Settings 0 and 1 definitions.
 
#define TOUCHPAD5_AUTO_MODES   0x40
 
#define TOUCHPAD5_SINGLE_XY   0x20
 
#define TOUCHPAD5_PM_RESEED   0x10
 
#define TOUCHPAD5_MODE_SELECT   0x08
 
#define TOUCHPAD5_AUTO_ATI   0x04
 
#define TOUCHPAD5_TRACKPAD_RESEED   0x02
 
#define TOUCHPAD5_EVENT_MODE   0x01
 
#define TOUCHPAD5_DIS_PROX_EVENT   0x80
 
#define TOUCHPAD5_DIS_TOUCH_EVENT   0x40
 
#define TOUCHPAD5_DIS_SNAP_EVENT   0x20
 
#define TOUCHPAD5_DIS_PMPROX_EVENT   0x10
 
#define TOUCHPAD5_REVERSE_EN   0x08
 
#define TOUCHPAD5_SLEEP_EN   0x04
 
#define TOUCHPAD5_LOW_POWER   0x02
 
#define TOUCHPAD5_SNAP_EN   0x01
 
#define TOUCHPAD5_DIS_NM_FILTER   0x10
 TouchPad 5 Control Filter Settings definitions.
 
#define TOUCHPAD5_DIS_PM_FILTER   0x08
 
#define TOUCHPAD5_SELECT_TOUCH_FILTER   0x04
 
#define TOUCHPAD5_DIS_HOVER_FILTER   0x02
 
#define TOUCHPAD5_DIS_TOUCH_FILTER   0x01
 
#define TOUCHPAD5_CHARGE_TYPE_SELF_CHARG   0x80
 TouchPad 5 PM Setup definitions.
 
#define TOUCHPAD5_CHARGE_MUTUAL_SELF_CHARG   0x00
 
#define TOUCHPAD5_RX_GROUP_RXB   0x40
 
#define TOUCHPAD5_RX_GROUP_RXA   0x00
 
#define TOUCHPAD5_SUM_OF_TP_RX   0x10
 
#define TOUCHPAD5_SUM_OF_TP_TX   0x00
 
#define TOUCHPAD5_RX_SELECT   0x0F
 
#define TOUCHPAD5_TX_HIGH_DFLT   0x1F
 
#define TOUCHPAD5_TX_LOW_DFLT   0xFF
 
#define TOUCHPAD5_ND_ENABLE   0x20
 TouchPad 5 Hardware Settings definitions.
 
#define TOUCHPAD5_RX_FLOAT   0x04
 
#define TOUCHPAD5_CK_FREQ_2   0x40
 
#define TOUCHPAD5_CK_FREQ_1   0x20
 
#define TOUCHPAD5_CK_FREQ_0   0x10
 
#define TOUCHPAD5_ANA_DEAD_TIME   0x02
 
#define TOUCHPAD5_INCR_PHASE   0x01
 
#define TOUCHPAD5_STAB_TIME_1   0x80
 
#define TOUCHPAD5_STAB_TIME_0   0x40
 
#define TOUCHPAD5_OPAMP_BIAS_1   0x20
 
#define TOUCHPAD5_OPAMP_BIAS_0   0x10
 
#define TOUCHPAD5_VTRIP_3   0x08
 
#define TOUCHPAD5_VTRIP_2   0x04
 
#define TOUCHPAD5_VTRIP_1   0x02
 
#define TOUCHPAD5_VTRIP_0   0x01
 
#define TOUCHPAD5_UPLEN_2   0x40
 
#define TOUCHPAD5_UPLEN_1   0x20
 
#define TOUCHPAD5_UPLEN_0   0x10
 
#define TOUCHPAD5_PASSLEN_2   0x04
 
#define TOUCHPAD5_PASSLEN_1   0x02
 
#define TOUCHPAD5_PASSLEN_0   0x01
 
#define TOUCHPAD5_PALM_REJECT   0x08
 TouchPad 5 XY Config definitions.
 
#define TOUCHPAD5_SWITCH_XY_AXIS   0x04
 
#define TOUCHPAD5_FLIP_Y   0x02
 
#define TOUCHPAD5_FLIP_X   0x01
 
#define TOUCHPAD5_PROX_EVENT   0x80
 TouchPad 5 System Config definitions.
 
#define TOUCHPAD5_TOUCH_EVENT   0x40
 
#define TOUCHPAD5_SNAP_EVENT   0x20
 
#define TOUCHPAD5_ALP_PROX_EVENT   0x10
 
#define TOUCHPAD5_REATI_EVENT   0x08
 
#define TOUCHPAD5_TP_EVENT   0x04
 
#define TOUCHPAD5_GESTURE_EVENT   0x02
 
#define TOUCHPAD5_EVENT_MODE   0x01
 
#define TOUCHPAD5_ALP_COUNT_FILTER   0x08
 
#define TOUCHPAD5_IIR_SELECT   0x04
 
#define TOUCHPAD5_MAV_FILTER   0x02
 
#define TOUCHPAD5_IIR_FILTER   0x01
 
#define TOUCHPAD5_CHARGE_TYPE   0x80
 TouchPad 5 ALP Channel Setup definitions.
 
#define TOUCHPAD5_RX_GROUP   0x40
 
#define TOUCHPAD5_PROX_REV   0x20
 
#define TOUCHPAD5_ALP_ENABLE   0x10
 
#define TOUCHPAD5_RX7_TX2   0x80
 TouchPad 5 Rx To Tx definitions.
 
#define TOUCHPAD5_RX6_TX3   0x40
 
#define TOUCHPAD5_RX5_TX4   0x20
 
#define TOUCHPAD5_RX4_TX5   0x10
 
#define TOUCHPAD5_RX3_TX6   0x08
 
#define TOUCHPAD5_RX2_TX7   0x04
 
#define TOUCHPAD5_RX1_TX8   0x02
 
#define TOUCHPAD5_RX0_TX9   0x01
 
#define TOUCHPAD5_PROXIMITY_STATUS   0x02
 TouchPad 5 status selection.
 
#define TOUCHPAD5_TOUCH_STATUS   0x01
 
#define TOUCHPAD5_SNAP_STATUS   0x05
 
#define TOUCHPAD5_ID_TAG_TOUCH_1   0x01
 TouchPad 5 ID tag selection.
 
#define TOUCHPAD5_ID_TAG_TOUCH_2   0x02
 
#define TOUCHPAD5_ID_TAG_TOUCH_3   0x03
 
#define TOUCHPAD5_ID_TAG_TOUCH_4   0x04
 
#define TOUCHPAD5_ID_TAG_TOUCH_5   0x05
 
#define TOUCHPAD5_ID_TAG_HOVER_1   0x81
 
#define TOUCHPAD5_ID_TAG_HOVER_2   0x82
 
#define TOUCHPAD5_ID_TAG_HOVER_3   0x83
 
#define TOUCHPAD5_ID_TAG_HOVER_4   0x84
 
#define TOUCHPAD5_ID_TAG_HOVER_5   0x85
 
#define TOUCHPAD5_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.
 
#define TOUCHPAD5_IQS550_PRODUCT_NUMBER   40
 TouchPad 2 Product Number selection.
 

Enumerations

enum  touchpad5_return_value_t { TOUCHPAD5_OK = 0 , TOUCHPAD5_ERROR = -1 }
 Touchpad 5 Click return value data. More...
 

Functions

void touchpad5_cfg_setup (touchpad5_cfg_t *cfg)
 Touchpad 5 configuration object setup function.
 
void touchpad5_reset (touchpad5_t *ctx)
 Touchpad 5 reset function.
 
err_t touchpad5_init (touchpad5_t *ctx, touchpad5_cfg_t *cfg)
 Touchpad 5 initialization function.
 
err_t touchpad5_default_cfg (touchpad5_t *ctx)
 Touchpad 5 default configuration function.
 
err_t touchpad5_generic_write (touchpad5_t *ctx, uint8_t reg, uint8_t *tx_buf, uint8_t tx_len)
 Touchpad 5 I2C writing function.
 
err_t touchpad5_generic_read (touchpad5_t *ctx, uint8_t reg, uint8_t *rx_buf, uint8_t rx_len)
 Touchpad 5 I2C reading function.
 
err_t touchpad5_check_version (touchpad5_t *ctx, touchpad5_ver_info_t *ver_info)
 TouchPad 5 Check Version function.
 
err_t touchpad5_check_bl_status (touchpad5_t *ctx, uint8_t *rx_buf)
 TouchPad 5 Check Bootloader Status.
 
uint8_t touchpad5_check_interrupt (touchpad5_t *ctx)
 TouchPad 5 check interrupt function.
 
void touchpad5_wait_ready (touchpad5_t *ctx)
 TouchPad 5 wait ready function.
 
err_t touchpad5_channel_setup (touchpad5_t *ctx, touchpad5_channel_setup_t ch_setup)
 TouchPad 5 channel setup function.
 
err_t touchpad5_threshold_setup (touchpad5_t *ctx, touchpad5_threshold_settings_t thresh_setup)
 TouchPad 5 threshold setup function.
 
err_t touchpad5_control_setup (touchpad5_t *ctx, touchpad5_control_settings_t ctrl_setup)
 TouchPad 5 control setup function.
 
err_t touchpad5_get_touch (touchpad5_t *ctx, touchpad5_touch_t *touch_data)
 TouchPad 5 get touch function.
 
err_t touchpad5_get_all_data (touchpad5_t *ctx, uint8_t *rx_data)
 TouchPad 5 get all data function.
 
err_t touchpad5_get_status (touchpad5_t *ctx, uint8_t sel_status, uint16_t *rx_data, uint8_t num_of_samples)
 TouchPad 5 get status function.
 

Detailed Description

This file contains API for Touchpad 5 Click Driver.

Enumeration Type Documentation

◆ touchpad5_return_value_t

Touchpad 5 Click return value data.

Predefined enum values for driver return values.

Enumerator
TOUCHPAD5_OK 
TOUCHPAD5_ERROR