touchkey3 2.0.0.0
|
Functions | |
void | touchkey3_cfg_setup (touchkey3_cfg_t *cfg) |
Config Object Initialization function. | |
TOUCHKEY3_RETVAL | touchkey3_init (touchkey3_t *ctx, touchkey3_cfg_t *cfg) |
Initialization function. | |
void | touchkey3_reset (touchkey3_t *ctx) |
Reset function. | |
void | touchkey3_generic_transfer (touchkey3_t *ctx, uint8_t *wr_buf, uint16_t wr_len, uint8_t *rd_buf, uint16_t rd_len) |
Generic transfer function. | |
void | touchkey3_send_command (touchkey3_t *ctx, uint8_t command) |
Send command. | |
void | touchkey3_send_setup (touchkey3_t *ctx, uint8_t *p_setup_data) |
Send setup data. | |
void | touchkey3_send_request (touchkey3_t *ctx, uint8_t request, uint8_t *p_response) |
Send request. | |
void | touchkey3_set_data (touchkey3_t *ctx, uint8_t data_address, uint8_t write_data) |
Set configuration data. | |
void | touchkey3_get_data (touchkey3_t *ctx, uint8_t data_address, uint8_t *read_data) |
Read configuration data. | |
void touchkey3_cfg_setup | ( | touchkey3_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
void touchkey3_generic_transfer | ( | touchkey3_t * | ctx, |
uint8_t * | wr_buf, | ||
uint16_t | wr_len, | ||
uint8_t * | rd_buf, | ||
uint16_t | rd_len ) |
Generic transfer function.
ctx | Click object. |
wr_buf | Write data buffer |
wr_len | Number of byte in write data buffer |
rd_buf | Read data buffer |
rd_len | Number of byte in read data buffer |
@description Generic SPI transfer, for sending and receiving packages
void touchkey3_get_data | ( | touchkey3_t * | ctx, |
uint8_t | data_address, | ||
uint8_t * | read_data ) |
Read configuration data.
ctx | Click object. |
data_address | Address of the register to read from. |
read_data | Value in register. |
@description Function reads from a selected configuration register.
TOUCHKEY3_RETVAL touchkey3_init | ( | touchkey3_t * | ctx, |
touchkey3_cfg_t * | cfg ) |
Initialization function.
touchkey3 | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.
void touchkey3_reset | ( | touchkey3_t * | ctx | ) |
Reset function.
ctx | Click object. |
@description This function sets RST pin first to low and then to high.
void touchkey3_send_command | ( | touchkey3_t * | ctx, |
uint8_t | command ) |
Send command.
ctx | Click object. |
command | Command to execute. |
@description Function executes one of the possible commands.
void touchkey3_send_request | ( | touchkey3_t * | ctx, |
uint8_t | request, | ||
uint8_t * | p_response ) |
Send request.
ctx | Click object. |
request | Type of request to send. |
p_response | Pointer to the responce data (1, 2 or 42 bytes). |
@description Function sends a request command, and returns the response.
void touchkey3_send_setup | ( | touchkey3_t * | ctx, |
uint8_t * | p_setup_data ) |
Send setup data.
ctx | Click object. |
p_setup_data | Pointer to 42 bytes of setup data. |
@description Function executes send setup command, which enters 42 bytes of configuration data.
void touchkey3_set_data | ( | touchkey3_t * | ctx, |
uint8_t | data_address, | ||
uint8_t | write_data ) |
Set configuration data.
ctx | Click object. |
data_address | Address of the configuration byte. |
write_data | New value of the configuration data byte. |
@description Function sets a selected configuration byte to a desired value.