ldctouch 2.0.0.0
|
API for configuring and manipulating LDC Touch Click driver. More...
Topics | |
LDC Touch Registers List | |
List of registers of LDC Touch Click driver. | |
LDC Touch Registers Settings | |
Settings for registers of LDC Touch Click driver. | |
LDC Touch MikroBUS Map | |
MikroBUS pin mapping of LDC Touch Click driver. | |
Functions | |
void | ldctouch_cfg_setup (ldctouch_cfg_t *cfg) |
LDC Touch configuration object setup function. | |
err_t | ldctouch_init (ldctouch_t *ctx, ldctouch_cfg_t *cfg) |
LDC Touch initialization function. | |
err_t | ldctouch_default_cfg (ldctouch_t *ctx) |
LDC Touch default configuration function. | |
err_t | ldctouch_generic_write (ldctouch_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len) |
LDC Touch I2C writing function. | |
err_t | ldctouch_generic_read (ldctouch_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len) |
LDC Touch I2C reading function. | |
err_t | ldctouch_write_register (ldctouch_t *ctx, uint8_t reg, uint8_t data_in) |
LDC Touch write register function. | |
err_t | ldctouch_read_register (ldctouch_t *ctx, uint8_t reg, uint8_t *data_out) |
LDC Touch read register function. | |
uint8_t | ldctouch_get_s0_pin (ldctouch_t *ctx) |
LDC Touch get s0 pin function. | |
uint8_t | ldctouch_get_s1_pin (ldctouch_t *ctx) |
LDC Touch get s1 pin function. | |
uint8_t | ldctouch_get_s2_pin (ldctouch_t *ctx) |
LDC Touch get s2 pin function. | |
uint8_t | ldctouch_get_s3_pin (ldctouch_t *ctx) |
LDC Touch get s3 pin function. | |
uint8_t | ldctouch_get_int_pin (ldctouch_t *ctx) |
LDC Touch get int pin function. | |
err_t | ldctouch_check_communication (ldctouch_t *ctx) |
LDC Touch check communication function. | |
err_t | ldctouch_set_operation_mode (ldctouch_t *ctx, uint8_t mode) |
LDC Touch set operation mode function. | |
err_t | ldctouch_get_data (ldctouch_t *ctx, ldctouch_data_t *button_data) |
LDC Touch get data function. | |
API for configuring and manipulating LDC Touch Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void ldctouch_cfg_setup | ( | ldctouch_cfg_t * | cfg | ) |
LDC Touch configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See ldctouch_cfg_t object definition for detailed explanation. |
err_t ldctouch_check_communication | ( | ldctouch_t * | ctx | ) |
LDC Touch check communication function.
This function checks the communication by reading and verifying the defice and manufacturer IDs.
[in] | ctx | : Click context object. See ldctouch_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t ldctouch_default_cfg | ( | ldctouch_t * | ctx | ) |
LDC Touch default configuration function.
This function executes a default configuration of LDC Touch click board.
[in] | ctx | : Click context object. See ldctouch_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t ldctouch_generic_read | ( | ldctouch_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out, | ||
uint8_t | len ) |
LDC Touch 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 ldctouch_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[out] | data_out | : Output read data. |
[in] | len | : Number of bytes to be read. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t ldctouch_generic_write | ( | ldctouch_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_in, | ||
uint8_t | len ) |
LDC Touch 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 ldctouch_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[in] | data_in | : Data to be written. |
[in] | len | : Number of bytes to be written. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t ldctouch_get_data | ( | ldctouch_t * | ctx, |
ldctouch_data_t * | button_data ) |
LDC Touch get data function.
This function reads status, out_state, and all buttons raw data.
[in] | ctx | : Click context object. See ldctouch_t object definition for detailed explanation. |
[out] | button_data | : Button data object. See ldctouch_data_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. uint8_t ldctouch_get_int_pin | ( | ldctouch_t * | ctx | ) |
LDC Touch get int pin function.
This function returns the INT pin logic state.
[in] | ctx | : Click context object. See ldctouch_t object definition for detailed explanation. |
uint8_t ldctouch_get_s0_pin | ( | ldctouch_t * | ctx | ) |
LDC Touch get s0 pin function.
This function returns the S0 pin logic state.
[in] | ctx | : Click context object. See ldctouch_t object definition for detailed explanation. |
uint8_t ldctouch_get_s1_pin | ( | ldctouch_t * | ctx | ) |
LDC Touch get s1 pin function.
This function returns the S1 pin logic state.
[in] | ctx | : Click context object. See ldctouch_t object definition for detailed explanation. |
uint8_t ldctouch_get_s2_pin | ( | ldctouch_t * | ctx | ) |
LDC Touch get s2 pin function.
This function returns the S2 pin logic state.
[in] | ctx | : Click context object. See ldctouch_t object definition for detailed explanation. |
uint8_t ldctouch_get_s3_pin | ( | ldctouch_t * | ctx | ) |
LDC Touch get s3 pin function.
This function returns the S3 pin logic state.
[in] | ctx | : Click context object. See ldctouch_t object definition for detailed explanation. |
err_t ldctouch_init | ( | ldctouch_t * | ctx, |
ldctouch_cfg_t * | cfg ) |
LDC Touch initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See ldctouch_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See ldctouch_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t ldctouch_read_register | ( | ldctouch_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out ) |
LDC Touch read register function.
This function reads data from the selected register.
[in] | ctx | : Click context object. See ldctouch_t object definition for detailed explanation. |
[in] | reg | : Register address. |
[out] | data_out | : Output read data. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t ldctouch_set_operation_mode | ( | ldctouch_t * | ctx, |
uint8_t | mode ) |
LDC Touch set operation mode function.
This function sets the operation mode.
[in] | ctx | : Click context object. See ldctouch_t object definition for detailed explanation. |
[in] | mode | :
|
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t ldctouch_write_register | ( | ldctouch_t * | ctx, |
uint8_t | reg, | ||
uint8_t | data_in ) |
LDC Touch write register function.
This function writes a desired data to the selected register.
[in] | ctx | : Click context object. See ldctouch_t object definition for detailed explanation. |
[in] | reg | : Register address. |
[in] | data_in | : Data to be written. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.