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.
 

Detailed Description

Function Documentation

◆ touchkey3_cfg_setup()

void touchkey3_cfg_setup ( touchkey3_cfg_t * cfg)

Config Object Initialization function.

Parameters
cfgClick configuration structure.

@description This function initializes click configuration structure to init state.

Note
All used pins will be set to unconnected state.

◆ touchkey3_generic_transfer()

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.

Parameters
ctxClick object.
wr_bufWrite data buffer
wr_lenNumber of byte in write data buffer
rd_bufRead data buffer
rd_lenNumber of byte in read data buffer

@description Generic SPI transfer, for sending and receiving packages

◆ touchkey3_get_data()

void touchkey3_get_data ( touchkey3_t * ctx,
uint8_t data_address,
uint8_t * read_data )

Read configuration data.

Parameters
ctxClick object.
data_addressAddress of the register to read from.
read_dataValue in register.

@description Function reads from a selected configuration register.

◆ touchkey3_init()

TOUCHKEY3_RETVAL touchkey3_init ( touchkey3_t * ctx,
touchkey3_cfg_t * cfg )

Initialization function.

Parameters
touchkey3Click object.
cfgClick configuration structure.

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

◆ touchkey3_reset()

void touchkey3_reset ( touchkey3_t * ctx)

Reset function.

Parameters
ctxClick object.

@description This function sets RST pin first to low and then to high.

◆ touchkey3_send_command()

void touchkey3_send_command ( touchkey3_t * ctx,
uint8_t command )

Send command.

Parameters
ctxClick object.
commandCommand to execute.

@description Function executes one of the possible commands.

◆ touchkey3_send_request()

void touchkey3_send_request ( touchkey3_t * ctx,
uint8_t request,
uint8_t * p_response )

Send request.

Parameters
ctxClick object.
requestType of request to send.
p_responsePointer to the responce data (1, 2 or 42 bytes).

@description Function sends a request command, and returns the response.

◆ touchkey3_send_setup()

void touchkey3_send_setup ( touchkey3_t * ctx,
uint8_t * p_setup_data )

Send setup data.

Parameters
ctxClick object.
p_setup_dataPointer to 42 bytes of setup data.

@description Function executes send setup command, which enters 42 bytes of configuration data.

◆ touchkey3_set_data()

void touchkey3_set_data ( touchkey3_t * ctx,
uint8_t data_address,
uint8_t write_data )

Set configuration data.

Parameters
ctxClick object.
data_addressAddress of the configuration byte.
write_dataNew value of the configuration data byte.

@description Function sets a selected configuration byte to a desired value.