touchpad2 2.0.0.0
TouchPad 2 Click Driver

API for configuring and manipulating TouchPad 2 Click driver. More...

Topics

 TouchPad 2 Registers List
 List of registers of TouchPad 2 Click driver.
 
 TouchPad 2 Registers Settings
 Settings for registers of TouchPad 2 Click driver.
 
 TouchPad 2 Proximity and Touch Status data.
 TouchPad 2 Gesture Events bit definitions.
 
 TouchPad 2 MikroBUS Map
 MikroBUS pin mapping of TouchPad 2 Click driver.
 
 Id_tag
 
 Product_num
 

Functions

void touchpad2_cfg_setup (touchpad2_cfg_t *cfg)
 TouchPad 2 configuration object setup function.
 
err_t touchpad2_init (touchpad2_t *ctx, touchpad2_cfg_t *cfg)
 TouchPad 2 initialization function.
 
err_t touchpad2_default_cfg (touchpad2_t *ctx)
 TouchPad 2 default configuration function.
 
err_t touchpad2_generic_write (touchpad2_t *ctx, uint8_t reg, uint8_t *tx_buf, uint8_t tx_len)
 TouchPad 2 I2C writing function.
 
err_t touchpad2_generic_read (touchpad2_t *ctx, uint8_t reg, uint8_t *rx_buf, uint8_t rx_len)
 TouchPad 2 I2C reading function.
 
uint8_t touchpad2_check_interrupt (touchpad2_t *ctx)
 TouchPad 2 check interrupt function.
 
void touchpad2_wait_ready (touchpad2_t *ctx)
 TouchPad 2 wait ready function.
 
err_t touchpad2_channel_setup (touchpad2_t *ctx, touchpad2_channel_setup_t ch_setup)
 TouchPad 2 channel setup function.
 
err_t touchpad2_check_version (touchpad2_t *ctx, touchpad2_ver_info_t *ver_info)
 TouchPad 2 check version function.
 
err_t touchpad2_get_touch (touchpad2_t *ctx, touchpad2_touch_t *touch_data)
 TouchPad 2 get touch function.
 
err_t touchpad2_get_all_data (touchpad2_t *ctx, uint8_t *rx_data)
 TouchPad 2 get all data function.
 
err_t touchpad2_get_status (touchpad2_t *ctx, uint8_t sel_status, uint16_t *rx_data)
 TouchPad 2 get status function.
 

Detailed Description

API for configuring and manipulating TouchPad 2 Click driver.

Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.

Function Documentation

◆ touchpad2_cfg_setup()

void touchpad2_cfg_setup ( touchpad2_cfg_t * cfg)

TouchPad 2 configuration object setup function.

This function initializes click configuration structure to initial values.

Parameters
[out]cfg: Click configuration structure. See touchpad2_cfg_t object definition for detailed explanation.
Returns
Nothing.
Note
The all used pins will be set to unconnected state.

◆ touchpad2_channel_setup()

err_t touchpad2_channel_setup ( touchpad2_t * ctx,
touchpad2_channel_setup_t ch_setup )

TouchPad 2 channel setup function.

This function channel setup used for trackpad ( XY information ) purposes, as well as the total Rx and Tx‟s used can be selected of the IQS555 Multiple Channel Projected Capacitive Controller, with Proximity, Touch and Snap on the TouchPad 2 Click board.

Parameters
[in]ctx: Click context object. See touchpad2_t object definition for detailed explanation.
[in]ch_setup: Pointer to the memory location of the structure where data be stored.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ touchpad2_check_interrupt()

uint8_t touchpad2_check_interrupt ( touchpad2_t * ctx)

TouchPad 2 check interrupt function.

This function check the interrupt state, the state of the INT pin of the IQS555 Multiple Channel Projected Capacitive Controller, with Proximity, Touch and Snap on the TouchPad 2 Click board.

Parameters
[in]ctx: Click context object. See touchpad2_t object definition for detailed explanation.
Returns
  • 0 - INT pin state low,
  • 1 - INT pin state high.
Note
None.

◆ touchpad2_check_version()

err_t touchpad2_check_version ( touchpad2_t * ctx,
touchpad2_ver_info_t * ver_info )

TouchPad 2 check version function.

This function check device version information of the IQS555 Multiple Channel Projected Capacitive Controller, with Proximity, Touch and Snap on the TouchPad 2 Click board.

Parameters
[in]ctx: Click context object. See touchpad2_t object definition for detailed explanation.
[out]ver_info: Pointer to the memory location of the structure where data be stored.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ touchpad2_default_cfg()

err_t touchpad2_default_cfg ( touchpad2_t * ctx)

TouchPad 2 default configuration function.

This function executes a default configuration of TouchPad 2 click board.

Parameters
[in]ctx: Click context object. See touchpad2_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
This function can consist any necessary configuration or setting to put device into operating mode.

◆ touchpad2_generic_read()

err_t touchpad2_generic_read ( touchpad2_t * ctx,
uint8_t reg,
uint8_t * rx_buf,
uint8_t rx_len )

TouchPad 2 I2C reading function.

This function reads a desired number of data bytes starting from the selected register by using I2C serial interface.

Parameters
[in]ctx: Click context object. See touchpad2_t object definition for detailed explanation.
[in]reg: Start register address.
[out]rx_buf: Output read data.
[in]rx_len: Number of bytes to be read.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ touchpad2_generic_write()

err_t touchpad2_generic_write ( touchpad2_t * ctx,
uint8_t reg,
uint8_t * tx_buf,
uint8_t tx_len )

TouchPad 2 I2C writing function.

This function writes a desired number of data bytes starting from the selected register by using I2C serial interface.

Parameters
[in]ctx: Click context object. See touchpad2_t object definition for detailed explanation.
[in]reg: Start register address.
[in]tx_buf: Data to be written.
[in]tx_len: Number of bytes to be written.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ touchpad2_get_all_data()

err_t touchpad2_get_all_data ( touchpad2_t * ctx,
uint8_t * rx_data )

TouchPad 2 get all data function.

This function get all data, XY data consists of the status byte and the following repeated sets of data bytes, relative to the number of multi-touch points used of the IQS555 Multiple Channel Projected Capacitive Controller, with Proximity, Touch and Snap on the TouchPad 2 Click board.

Parameters
[in]ctx: Click context object. See touchpad2_t object definition for detailed explanation.
[out]rx_data: Output read data.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
The XY data consists of the status byte and the following repeated sets of data bytes, relative to the number of multi-touch points used. Currently 5 points are implemented, and thus a total of (7x5 + 1) 36 bytes are available to be read in XY Data Read mode.

◆ touchpad2_get_status()

err_t touchpad2_get_status ( touchpad2_t * ctx,
uint8_t sel_status,
uint16_t * rx_data )

TouchPad 2 get status function.

This function get status proximity, touch or snap data of the IQS555 Multiple Channel Projected Capacitive Controller, with Proximity, Touch and Snap on the TouchPad 2 Click board.

Parameters
[in]ctx: Click context object. See touchpad2_t object definition for detailed explanation.
[in]sel_status:
  • 0x00 ( TOUCHPAD2_PROXIMITY_STATUS ) - Proximity Status,
  • 0x01 ( TOUCHPAD2_TOUCH_STATUS ) - Touch Status,
  • 0x02 ( TOUCHPAD2_SNAP_STATUS ) - Snap Status.
[out]rx_data: Output read data.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ touchpad2_get_touch()

err_t touchpad2_get_touch ( touchpad2_t * ctx,
touchpad2_touch_t * touch_data )

TouchPad 2 get touch function.

This function get touch data, XY data consists of the status byte and the following repeated sets of data bytes, relative to the number of multi-touch points used of the IQS555 Multiple Channel Projected Capacitive Controller, with Proximity, Touch and Snap on the TouchPad 2 Click board.

Parameters
[in]ctx: Click context object. See touchpad2_t object definition for detailed explanation.
[out]touch_data: Pointer to the memory location of the structure where data be stored.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ touchpad2_init()

err_t touchpad2_init ( touchpad2_t * ctx,
touchpad2_cfg_t * cfg )

TouchPad 2 initialization function.

This function initializes all necessary pins and peripherals used for this click board.

Parameters
[out]ctx: Click context object. See touchpad2_t object definition for detailed explanation.
[in]cfg: Click configuration structure. See touchpad2_cfg_t object definition for detailed explanation.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ touchpad2_wait_ready()

void touchpad2_wait_ready ( touchpad2_t * ctx)

TouchPad 2 wait ready function.

This function waits for the communication window to be available of the IQS555 Multiple Channel Projected Capacitive Controller, with Proximity, Touch and Snap on the TouchPad 2 Click board.

Parameters
[in]ctx: Click context object. See touchpad2_t object definition for detailed explanation.
Returns
Nothing.
Note
None.