touchpad4 2.0.0.0
|
API for configuring and manipulating Touchpad 4 Click driver. More...
Topics | |
Touchpad 4 Registers List | |
List of registers of Touchpad 4 Click driver. | |
Touchpad 4 Registers Settings | |
Settings for registers of Touchpad 4 Click driver. | |
Touchpad 4 MikroBUS Map | |
MikroBUS pin mapping of Touchpad 4 Click driver. | |
Functions | |
void | touchpad4_cfg_setup (touchpad4_cfg_t *cfg) |
Touchpad 4 configuration object setup function. | |
err_t | touchpad4_init (touchpad4_t *ctx, touchpad4_cfg_t *cfg) |
Touchpad 4 initialization function. | |
err_t | touchpad4_default_cfg (touchpad4_t *ctx) |
Touchpad 4 default configuration function. | |
err_t | touchpad4_generic_write (touchpad4_t *ctx, uint8_t reg, uint16_t tx_data) |
Touchpad 4 I2C writing function. | |
err_t | touchpad4_generic_read (touchpad4_t *ctx, uint8_t reg, uint16_t *rx_data) |
Touchpad 4 I2C reading function. | |
uint8_t | touchpad4_get_ready (touchpad4_t *ctx) |
Get ready pin state. | |
void | touchpad4_set_rst (touchpad4_t *ctx, uint8_t state) |
Set reset pin state. | |
void | touchpad4_reset (touchpad4_t *ctx) |
Reset function. | |
err_t | touchpad4_get_touch (touchpad4_t *ctx, touchpad4_info_t *touch_info) |
Read touch informations. | |
err_t | touchpad_get_channels (touchpad4_t *ctx, uint32_t *channels) |
Read channel information. | |
API for configuring and manipulating Touchpad 4 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void touchpad4_cfg_setup | ( | touchpad4_cfg_t * | cfg | ) |
Touchpad 4 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See touchpad4_cfg_t object definition for detailed explanation. |
err_t touchpad4_default_cfg | ( | touchpad4_t * | ctx | ) |
Touchpad 4 default configuration function.
This function executes a default configuration of Touchpad 4 click board.
[in] | ctx | : Click context object. See touchpad4_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t touchpad4_generic_read | ( | touchpad4_t * | ctx, |
uint8_t | reg, | ||
uint16_t * | rx_data ) |
Touchpad 4 I2C reading function.
This function reads a data from the selected register.
[in] | ctx | : Click context object. See touchpad4_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[out] | rx_data | : Output read data. |
0
- Success, -1
- Error.err_t touchpad4_generic_write | ( | touchpad4_t * | ctx, |
uint8_t | reg, | ||
uint16_t | tx_data ) |
Touchpad 4 I2C writing function.
This function writes a data to the selected register.
[in] | ctx | : Click context object. See touchpad4_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[in] | tx_data | : Data to be written. |
0
- Success, -1
- Error.uint8_t touchpad4_get_ready | ( | touchpad4_t * | ctx | ) |
Get ready pin state.
This function reads logic state of the rdy pin.
[in] | ctx | : Click context object. See touchpad4_t object definition for detailed explanation. |
err_t touchpad4_get_touch | ( | touchpad4_t * | ctx, |
touchpad4_info_t * | touch_info ) |
Read touch informations.
This function reads number of touches, touch informations and gesture.
[in] | ctx | : Click context object. See touchpad4_t object definition for detailed explanation. |
[out] | touch_info | : Touch information object. See touchpad4_info_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t touchpad4_init | ( | touchpad4_t * | ctx, |
touchpad4_cfg_t * | cfg ) |
Touchpad 4 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See touchpad4_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See touchpad4_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error.void touchpad4_reset | ( | touchpad4_t * | ctx | ) |
Reset function.
This function resets device.
[in] | ctx | : Click context object. See touchpad4_t object definition for detailed explanation. |
void touchpad4_set_rst | ( | touchpad4_t * | ctx, |
uint8_t | state ) |
Set reset pin state.
This function sets mclr/rst pin state.
[in] | ctx | : Click context object. See touchpad4_t object definition for detailed explanation. |
[in] | state | : Logic state. |
err_t touchpad_get_channels | ( | touchpad4_t * | ctx, |
uint32_t * | channels ) |
Read channel information.
This function reads state of the channels.
[in] | ctx | : Click context object. See touchpad4_t object definition for detailed explanation. |
[out] | channels | : Channel data. |
0
- Success, -1
- Error.