touchpad3 2.0.0.0
|
API for configuring and manipulating Touchpad 3 Click driver. More...
Topics | |
Touchpad 3 Registers List | |
List of registers of Touchpad 3 Click driver. | |
Touchpad 3 Registers Settings | |
Settings for registers of Touchpad 3 Click driver. | |
Touchpad 3 MikroBUS Map | |
MikroBUS pin mapping of Touchpad 3 Click driver. | |
Functions | |
void | touchpad3_cfg_setup (touchpad3_cfg_t *cfg) |
Touchpad 3 configuration object setup function. | |
err_t | touchpad3_init (touchpad3_t *ctx, touchpad3_cfg_t *cfg) |
Touchpad 3 initialization function. | |
err_t | touchpad3_default_cfg (touchpad3_t *ctx) |
Touchpad 3 default configuration function. | |
uint8_t | touchpad3_get_int (touchpad3_t *ctx) |
Touchpad 3 get interrupt function.. | |
void | touchpad3_hw_reset (touchpad3_t *ctx) |
Touchpad 3 hardware reset function. | |
void | touchpad3_generic_write (touchpad3_t *ctx, uint8_t *tx_buf, uint8_t tx_len) |
Touchpad 3 I2C writing function. | |
err_t | touchpad3_generic_read (touchpad3_t *ctx, uint8_t reg, uint8_t *rx_buf, uint8_t rx_len) |
Touchpad 3 I2C reading function. | |
void | touchpad3_general_configuration (touchpad3_t *ctx) |
Touchpad 3 general configuration function. | |
void | touchpad3_decoding_configuration (touchpad3_t *ctx) |
Touchpad 3 decoding configuration function. | |
void | touchpad3_sensor_mapping_configuration (touchpad3_t *ctx) |
Touchpad 3 sensor mapping configuration function. | |
uint8_t | touchpad3_get_touch (touchpad3_t *ctx, touch_data_t *tch_data, uint16_t *x_axis, uint16_t *y_axis) |
Touchpad 3 get touch data function. | |
uint8_t | touchpad3_get_gesture (touchpad3_t *ctx, touch_data_t *gst_data, uint8_t *gesture) |
Touchpad 3 get gesture data function. | |
uint8_t | touchpad3_cmd_protocol (touchpad3_t *ctx, cmd_protocol_t cmd_data, uint8_t *p_tx_data, uint8_t *p_rx_data) |
Touchpad 3 command protocol function. | |
uint8_t | touchpad3_write_reg (touchpad3_t *ctx, uint8_t index_loc, uint8_t offset_loc, uint8_t tx_data, uint8_t *p_response) |
Touchpad 3 write register data function. | |
uint8_t | touchpad3_read_reg (touchpad3_t *ctx, uint8_t index_loc, uint8_t offset_loc, uint8_t *read_data, uint8_t *p_response) |
Touchpad 3 read register data function. | |
uint8_t | touchpad3_manufacturing_test (touchpad3_t *ctx) |
Touchpad 3 manufacturing test function. | |
uint32_t | touchpad3_get_device_id (touchpad3_t *ctx) |
Touchpad 3 get device id function. | |
uint8_t | touchpad3_config_touch (touchpad3_t *ctx, uint8_t en_touch) |
Touchpad 3 configure touch function. | |
uint8_t | touchpad3_config_gesture (touchpad3_t *ctx, uint8_t en_gesture) |
Touchpad 3 configure gesture function. | |
API for configuring and manipulating Touchpad 3 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void touchpad3_cfg_setup | ( | touchpad3_cfg_t * | cfg | ) |
Touchpad 3 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See touchpad3_cfg_t object definition for detailed explanation. |
uint8_t touchpad3_cmd_protocol | ( | touchpad3_t * | ctx, |
cmd_protocol_t | cmd_data, | ||
uint8_t * | p_tx_data, | ||
uint8_t * | p_rx_data ) |
Touchpad 3 command protocol function.
The function set the desired command to the MTCH6301 Projected Capacitive Touch Controller on the TouchPad 3 click board.
[in] | ctx | : Click context object. See touchpad3_t object definition for detailed explanation. |
[in] | cmd_data | Pointer to the memory location where data be stored. |
[in] | p_tx_data | Pointer to the data to be written. |
[in] | p_rx_data | Pointer to the memory location where respond data be stored. |
0x00
- Success, 0x80
- Parameter out of range. 0xFE
- Timeout (not enough bytes received). 0xFF
- Unrecognized command. 0xFD
- Invalid parameter. 0xFC
- Missing or extra parameter.uint8_t touchpad3_config_gesture | ( | touchpad3_t * | ctx, |
uint8_t | en_gesture ) |
Touchpad 3 configure gesture function.
The function configures gesture of the MTCH6301 Projected Capacitive Touch Controller on the TouchPad 3 click board.
[in] | ctx | : Click context object. See touchpad3_t object definition for detailed explanation. |
[in] | en_gesture | : Gesture enable settings. |
uint8_t touchpad3_config_touch | ( | touchpad3_t * | ctx, |
uint8_t | en_touch ) |
Touchpad 3 configure touch function.
The function configures touch of the MTCH6301 Projected Capacitive Touch Controller on the TouchPad 3 click board.
[in] | ctx | : Click context object. See touchpad3_t object definition for detailed explanation. |
[in] | en_touch | : Touch enable settings. |
void touchpad3_decoding_configuration | ( | touchpad3_t * | ctx | ) |
Touchpad 3 decoding configuration function.
The function performs the decoding configuration of the MTCH6301 Projected Capacitive Touch Controller on the TouchPad 3 click board.
[in] | ctx | : Click context object. See touchpad3_t object definition for detailed explanation. |
See #err_t definition for detailed explanation.
err_t touchpad3_default_cfg | ( | touchpad3_t * | ctx | ) |
Touchpad 3 default configuration function.
This function executes a default configuration of Touchpad 3 click board.
[in] | ctx | : Click context object. See touchpad3_t object definition for detailed explanation. |
0
- Success, -1
- Error.void touchpad3_general_configuration | ( | touchpad3_t * | ctx | ) |
Touchpad 3 general configuration function.
The function performs the general configuration of the MTCH6301 Projected Capacitive Touch Controller on the TouchPad 3 click board.
[in] | ctx | : Click context object. See touchpad3_t object definition for detailed explanation. |
See #err_t definition for detailed explanation.
err_t touchpad3_generic_read | ( | touchpad3_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | rx_buf, | ||
uint8_t | rx_len ) |
Touchpad 3 I2C reading function.
This function reads a desired number of data bytes starting from the selected register by using I2C serial interface.
[in] | ctx | : Click context object. See touchpad3_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. |
0
- Success, -1
- Error.void touchpad3_generic_write | ( | touchpad3_t * | ctx, |
uint8_t * | tx_buf, | ||
uint8_t | tx_len ) |
Touchpad 3 I2C writing function.
This function writes a desired number of data bytes starting from the selected register by using I2C serial interface.
[in] | ctx | : Click context object. See touchpad3_t object definition for detailed explanation. |
[in] | tx_buf | : Data to be written. |
[in] | tx_len | : Number of bytes to be written. |
0
- Success, -1
- Error.uint32_t touchpad3_get_device_id | ( | touchpad3_t * | ctx | ) |
Touchpad 3 get device id function.
The function reads device id of the MTCH6301 Projected Capacitive Touch Controller on the TouchPad 3 click board.
[in] | ctx | : Click context object. See touchpad3_t object definition for detailed explanation. |
uint8_t touchpad3_get_gesture | ( | touchpad3_t * | ctx, |
touch_data_t * | gst_data, | ||
uint8_t * | gesture ) |
Touchpad 3 get gesture data function.
The function get gesture data of the MTCH6301 Projected Capacitive Touch Controller on the TouchPad 3 click board.
[in] | ctx | : Click context object. See touchpad3_t object definition for detailed explanation. |
[in] | gst_data | Structure where gesture data be stored. |
[out] | gesture | Pointer to the memory location where data be stored. |
0x00
- Success, 0x01
- Error.uint8_t touchpad3_get_int | ( | touchpad3_t * | ctx | ) |
Touchpad 3 get interrupt function..
The function get INT pin state of the TouchPad 3 click board.
[in] | ctx | : Click context object. See touchpad3_t object definition for detailed explanation. |
See #err_t definition for detailed explanation.
uint8_t touchpad3_get_touch | ( | touchpad3_t * | ctx, |
touch_data_t * | tch_data, | ||
uint16_t * | x_axis, | ||
uint16_t * | y_axis ) |
Touchpad 3 get touch data function.
The function get touch data of the MTCH6301 Projected Capacitive Touch Controller on the TouchPad 3 click board.
[in] | ctx | : Click context object. See touchpad3_t object definition for detailed explanation. |
[in] | tch_data | structure where touch data be stored. |
[out] | x_axis | Pointer to the memory location where data be stored. |
[out] | y_axis | Pointer to the memory location where data be stored. |
0x00
- Success, 0x01
- Error.void touchpad3_hw_reset | ( | touchpad3_t * | ctx | ) |
Touchpad 3 hardware reset function.
The function hardware reset the MTCH6301 Projected Capacitive Touch Controller on the TouchPad 3 click board.
[in] | ctx | : Click context object. See touchpad3_t object definition for detailed explanation. |
See #err_t definition for detailed explanation.
err_t touchpad3_init | ( | touchpad3_t * | ctx, |
touchpad3_cfg_t * | cfg ) |
Touchpad 3 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See touchpad3_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See touchpad3_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error.uint8_t touchpad3_manufacturing_test | ( | touchpad3_t * | ctx | ) |
Touchpad 3 manufacturing test function.
The function set manufacturing test of the MTCH6301 Projected Capacitive Touch Controller on the TouchPad 3 click board.
[in] | ctx | : Click context object. See touchpad3_t object definition for detailed explanation. |
0x00
- Success, 0x01
- I/O error.uint8_t touchpad3_read_reg | ( | touchpad3_t * | ctx, |
uint8_t | index_loc, | ||
uint8_t | offset_loc, | ||
uint8_t * | read_data, | ||
uint8_t * | p_response ) |
Touchpad 3 read register data function.
The function read a the byte of data from the targeted index and offset location of the MTCH6301 Projected Capacitive Touch Controller on the TouchPad 3 click board.
[in] | ctx | : Click context object. See touchpad3_t object definition for detailed explanation. |
[in] | index_loc | : Index location. |
[in] | offset_loc | : Offset location. |
[in] | tx_data | : the data to be written. |
[in] | p_response | : pointer to the memory location where respond data be stored. |
0x00
- Success, 0x80
- Parameter out of range. 0xFE
- Timeout (not enough bytes received). 0xFF
- Unrecognized command. 0xFD
- Invalid parameter. 0xFC
- Missing or extra parameter.void touchpad3_sensor_mapping_configuration | ( | touchpad3_t * | ctx | ) |
Touchpad 3 sensor mapping configuration function.
The function configures the sensor mapping of the MTCH6301 Projected Capacitive Touch Controller on the TouchPad 3 click board.
[in] | ctx | : Click context object. See touchpad3_t object definition for detailed explanation. |
See #err_t definition for detailed explanation.
uint8_t touchpad3_write_reg | ( | touchpad3_t * | ctx, |
uint8_t | index_loc, | ||
uint8_t | offset_loc, | ||
uint8_t | tx_data, | ||
uint8_t * | p_response ) |
Touchpad 3 write register data function.
The function writes a the byte of data to the targeted index and offset locationof the MTCH6301 Projected Capacitive Touch Controller on the TouchPad 3 click board.
[in] | ctx | : Click context object. See touchpad3_t object definition for detailed explanation. |
[in] | index_loc | : Index location. |
[in] | offset_loc | : Offset location. |
[in] | tx_data | : the data to be written. |
[in] | p_response | : pointer to the memory location where respond data be stored. |
0x00
- Success, 0x80
- Parameter out of range. 0xFE
- Timeout (not enough bytes received). 0xFF
- Unrecognized command. 0xFD
- Invalid parameter. 0xFC
- Missing or extra parameter.