touchpad5 2.0.0.0
Touchpad 5 Click Driver

API for configuring and manipulating Touchpad 5 Click driver. More...

Topics

 TouchPad 5 Registers List
 List of registers of TouchPad 5 Click driver.
 
 TouchPad 5 Registers Settings
 Settings for registers of TouchPad 5 Click driver.
 
 TouchPad 5 Proximity and Touch Status data.
 Settings for Proximity and Touch Status of TouchPad 5 Click driver.
 
 Touchpad 5 MikroBUS Map
 MikroBUS pin mapping of Touchpad 5 Click driver.
 
 Id_tag
 
 Product_num
 

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

API for configuring and manipulating Touchpad 5 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

◆ touchpad5_cfg_setup()

void touchpad5_cfg_setup ( touchpad5_cfg_t * cfg)

Touchpad 5 configuration object setup function.

This function initializes click configuration structure to initial values.

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

◆ touchpad5_channel_setup()

err_t touchpad5_channel_setup ( touchpad5_t * ctx,
touchpad5_channel_setup_t ch_setup )

TouchPad 5 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 IQS550 Multiple Channel Projected Capacitive Controller, with Proximity, Touch and Snap on the TouchPad 5 Click board.

Parameters
[in]ctx: Click context object. See touchpad5_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.

◆ touchpad5_check_bl_status()

err_t touchpad5_check_bl_status ( touchpad5_t * ctx,
uint8_t * rx_buf )

TouchPad 5 Check Bootloader Status.

This function check the bootloader status

Parameters
[in]ctx: Click context object. See touchpad5_t object definition for detailed explanation.
[out]rx_buf: Output read data.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
Output read data returns 0xA5 if the bootloader is present, 0xEE otherwise.

◆ touchpad5_check_interrupt()

uint8_t touchpad5_check_interrupt ( touchpad5_t * ctx)

TouchPad 5 check interrupt function.

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

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

◆ touchpad5_check_version()

err_t touchpad5_check_version ( touchpad5_t * ctx,
touchpad5_ver_info_t * ver_info )

TouchPad 5 Check Version function.

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

Parameters
[in]ctx: Click context object. See touchpad5_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.

◆ touchpad5_control_setup()

err_t touchpad5_control_setup ( touchpad5_t * ctx,
touchpad5_control_settings_t ctrl_setup )

TouchPad 5 control setup function.

This function sets the control commands of the IQS550 Multiple Channel Projected Capacitive Controller, with Proximity, Touch and Snap on the TouchPad 5 Click board.

Parameters
[in]ctx: Click context object. See touchpad5_t object definition for detailed explanation.
[in]ctrl_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.

◆ touchpad5_default_cfg()

err_t touchpad5_default_cfg ( touchpad5_t * ctx)

Touchpad 5 default configuration function.

This function executes a default configuration of Touchpad 5 click board.

Parameters
[in]ctx: Click context object. See touchpad5_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.

◆ touchpad5_generic_read()

err_t touchpad5_generic_read ( touchpad5_t * ctx,
uint8_t reg,
uint8_t * rx_buf,
uint8_t rx_len )

Touchpad 5 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 touchpad5_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.

◆ touchpad5_generic_write()

err_t touchpad5_generic_write ( touchpad5_t * ctx,
uint8_t reg,
uint8_t * tx_buf,
uint8_t tx_len )

Touchpad 5 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 touchpad5_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.

◆ touchpad5_get_all_data()

err_t touchpad5_get_all_data ( touchpad5_t * ctx,
uint8_t * rx_data )

TouchPad 5 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 IQS550 Multiple Channel Projected Capacitive Controller, with Proximity, Touch and Snap on the TouchPad 5 Click board.

Parameters
[in]ctx: Click context object. See touchpad5_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.

◆ touchpad5_get_status()

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.

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

Parameters
[in]ctx: Click context object. See touchpad5_t object definition for detailed explanation.
[in]sel_status:
  • 0x02 ( TOUCHPAD5_PROXIMITY_STATUS ) - Proximity Status,
  • 0x01 ( TOUCHPAD5_TOUCH_STATUS ) - Touch Status,
  • 0x08 ( TOUCHPAD5_SNAP_STATUS ) - Snap Status.
[in]num_of_samples: Number of samples needed.
[out]rx_data: Output read data.
Returns
  • 0 - Success,
  • -1 - Error.
See #err_t definition for detailed explanation.
Note
None.

◆ touchpad5_get_touch()

err_t touchpad5_get_touch ( touchpad5_t * ctx,
touchpad5_touch_t * touch_data )

TouchPad 5 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 IQS550 Multiple Channel Projected Capacitive Controller, with Proximity, Touch and Snap on the TouchPad 5 Click board.

Parameters
[in]ctx: Click context object. See touchpad5_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.

◆ touchpad5_init()

err_t touchpad5_init ( touchpad5_t * ctx,
touchpad5_cfg_t * cfg )

Touchpad 5 initialization function.

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

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

◆ touchpad5_reset()

void touchpad5_reset ( touchpad5_t * ctx)

Touchpad 5 reset function.

This function toggles the NRST pin thus resetting the IQS550 device.

Parameters
[out]ctx: Click context object. See touchpad5_t object definition for detailed explanation.

See #err_t definition for detailed explanation.

Note
None.

◆ touchpad5_threshold_setup()

err_t touchpad5_threshold_setup ( touchpad5_t * ctx,
touchpad5_threshold_settings_t thresh_setup )

TouchPad 5 threshold setup function.

This function sets the threshold levels used for touch panel channels and ProxMode channels of the IQS550 Multiple Channel Projected Capacitive Controller, with Proximity, Touch and Snap on the TouchPad 5 Click board.

Parameters
[in]ctx: Click context object. See touchpad5_t object definition for detailed explanation.
[in]thresh_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.

◆ touchpad5_wait_ready()

void touchpad5_wait_ready ( touchpad5_t * ctx)

TouchPad 5 wait ready function.

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

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