captouch5 2.0.0.0
|
Functions | |
void | captouch5_cfg_setup (captouch5_cfg_t *cfg) |
Config Object Initialization function. | |
CAPTOUCH5_RETVAL | captouch5_init (captouch5_t *ctx, captouch5_cfg_t *cfg) |
Initialization function. | |
void | captouch5_default_cfg (captouch5_t *ctx, T_CAPTOUCH5_DEVICE_CONFIG *device_cfg) |
Click Default Configuration function. | |
void | captouch5_generic_write (captouch5_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic write function. | |
void | captouch5_generic_read (captouch5_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic read function. | |
void | captouch5_device_config (captouch5_t *ctx, T_CAPTOUCH5_DEVICE_CONFIG *device_cfg) |
Function for configuring device. | |
uint16_t | captouch5_read_two_bytes (captouch5_t *ctx, uint8_t reg_addr) |
Generic read 16bit data function. | |
void | captouch5_write_two_bytes (captouch5_t *ctx, uint8_t reg_addr, uint16_t data_buf) |
Generic write 16bit data function. | |
uint8_t | captouch5_read_byte (captouch5_t *ctx, uint8_t reg_addr) |
Generic read 8bit data function. | |
void | captouch5_write_byte (captouch5_t *ctx, uint8_t reg_addr, uint8_t data_buf) |
Generic write 8bit data function. | |
uint8_t | captouch5_process (captouch5_t *ctx) |
Function for checking error. | |
uint16_t | captouch5_get_device_id (captouch5_t *ctx) |
Function for geting device id. | |
uint8_t | captouch5_get_family_id (captouch5_t *ctx) |
Function for geting family id. | |
void | captouch5_read_button_status (captouch5_t *ctx, T_CAPTOUCH5_BUTTONS *buttons) |
Function read button status. | |
uint16_t | captouch5_read_slider_position (captouch5_t *ctx) |
Function for reading slider position. | |
void | captouch5_software_reset (captouch5_t *ctx) |
Function to reset device. | |
void | captouch5_config_sensors (captouch5_t *ctx, uint16_t sens_data) |
Function for configuring sensor. | |
void | captouch5_config_slider (captouch5_t *ctx, uint8_t slider_data) |
Function for configuring slider. | |
void captouch5_cfg_setup | ( | captouch5_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
void captouch5_config_sensors | ( | captouch5_t * | ctx, |
uint16_t | sens_data ) |
Function for configuring sensor.
ctx | Click object. |
sens_data | Data for configuring. |
@description This function performs sensor configuration.
void captouch5_config_slider | ( | captouch5_t * | ctx, |
uint8_t | slider_data ) |
Function for configuring slider.
ctx | Click object. |
slider_data | Data for configuring. |
@description This function performs slider configuration.
void captouch5_default_cfg | ( | captouch5_t * | ctx, |
T_CAPTOUCH5_DEVICE_CONFIG * | device_cfg ) |
Click Default Configuration function.
ctx | Click object. |
device_cfg | Click configuration structure |
@description This function executes default configuration for CapTouch5 click.
void captouch5_device_config | ( | captouch5_t * | ctx, |
T_CAPTOUCH5_DEVICE_CONFIG * | device_cfg ) |
Function for configuring device.
ctx | Click object. |
device_cfg | Pointer to structure data which will be written. |
@description This function performs basic device configuration.
void captouch5_generic_read | ( | captouch5_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_buf, | ||
uint8_t | len ) |
Generic read function.
ctx | Click object. |
reg | Register address. |
data_buf | Output data buf |
len | Number of the bytes to be read |
@description This function reads data from the desired register.
void captouch5_generic_write | ( | captouch5_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_buf, | ||
uint8_t | len ) |
Generic write function.
ctx | Click object. |
reg | Register address. |
data_buf | Data buf to be written. |
len | Number of the bytes in data buf. |
@description This function writes data to the desired register.
uint16_t captouch5_get_device_id | ( | captouch5_t * | ctx | ) |
Function for geting device id.
ctx | Click object. |
@description This function gets device id.
uint8_t captouch5_get_family_id | ( | captouch5_t * | ctx | ) |
Function for geting family id.
ctx | Click object. |
@description This function gets family id of click object ctx.
CAPTOUCH5_RETVAL captouch5_init | ( | captouch5_t * | ctx, |
captouch5_cfg_t * | cfg ) |
Initialization function.
captouch5 | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.
uint8_t captouch5_process | ( | captouch5_t * | ctx | ) |
Function for checking error.
ctx | Click object. |
@description This function checks error occurence.
void captouch5_read_button_status | ( | captouch5_t * | ctx, |
T_CAPTOUCH5_BUTTONS * | buttons ) |
Function read button status.
ctx | Click object. |
buttons | Pointer to struct wich will accept data read from device. |
@description This function reads button status.
uint8_t captouch5_read_byte | ( | captouch5_t * | ctx, |
uint8_t | reg_addr ) |
Generic read 8bit data function.
ctx | Click object. |
reg_addr | Register address from which data should be read. |
@description This function reads 8bit data from address reg_addr.
uint16_t captouch5_read_slider_position | ( | captouch5_t * | ctx | ) |
Function for reading slider position.
ctx | Click object. |
@description This function reads slider position.
uint16_t captouch5_read_two_bytes | ( | captouch5_t * | ctx, |
uint8_t | reg_addr ) |
Generic read 16bit data function.
ctx | Click object. |
reg_addr | Register from which data should be read. |
@description This function reads 16bit data from reg_addr address.
void captouch5_software_reset | ( | captouch5_t * | ctx | ) |
Function to reset device.
ctx | Click object. |
@description This function resets device.
void captouch5_write_byte | ( | captouch5_t * | ctx, |
uint8_t | reg_addr, | ||
uint8_t | data_buf ) |
Generic write 8bit data function.
ctx | Click object. |
reg_addr | Register where data should be written. |
data_buf | OUTPUT data. |
@description This function writes 8bit data from data_buf to address reg_addr.
void captouch5_write_two_bytes | ( | captouch5_t * | ctx, |
uint8_t | reg_addr, | ||
uint16_t | data_buf ) |
Generic write 16bit data function.
ctx | Click object. |
reg_addr | Register where data should be written. |
data_buf | OUTPUT data. |
@description This function writes 16bit data data_buf to address reg_addr.