touchkey4 2.0.0.0
|
Functions | |
void | touchkey4_cfg_setup (touchkey4_cfg_t *cfg) |
Config Object Initialization function. | |
TOUCHKEY4_RETVAL | touchkey4_init (touchkey4_t *ctx, touchkey4_cfg_t *cfg) |
Initialization function. | |
void | touchkey4_default_cfg (touchkey4_t *ctx) |
Click Default Configuration function. | |
void | touchkey4_write_reg (touchkey4_t *ctx, const uint8_t register_address, const uint8_t transfer_data) |
Generic Write function. | |
void | touchkey4_read_reg (touchkey4_t *ctx, const uint8_t register_address, uint8_t *data_out, const uint8_t n_bytes) |
Generic Read function. | |
uint8_t | touchkey4_receive_byte (touchkey4_t *ctx, const uint8_t register_address) |
Read byte function. | |
void | touchkey4_detect_touch (touchkey4_t *ctx, uint8_t *input_sens) |
Touch Detect function. | |
void | touchkey4_set_active_mode (touchkey4_t *ctx, const uint8_t analog_gain, const uint8_t en_input1, const uint8_t en_input2, const uint8_t en_input3) |
Active Mode Set function. | |
void | touchkey4_set_standby_mode (touchkey4_t *ctx, const uint8_t analog_gain, const uint8_t en_input1, const uint8_t en_input2, const uint8_t en_input3) |
Standby Mode Set function. | |
void | touchkey4_set_combo_mode (touchkey4_t *ctx, const uint8_t analog_gain, const uint8_t en_input1, const uint8_t en_input2, const uint8_t en_input3) |
Combo Mode Set function. | |
void | touchkey4_set_deep_sleep_mode (touchkey4_t *ctx) |
DeepSleep Mode Set function. | |
uint8_t | touchkey4_check_interrupt (touchkey4_t *ctx) |
Interrupt Check function. | |
void touchkey4_cfg_setup | ( | touchkey4_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
uint8_t touchkey4_check_interrupt | ( | touchkey4_t * | ctx | ) |
Interrupt Check function.
ctx | Click object. |
@description This function checks interrupt state (ALERT pin).
void touchkey4_default_cfg | ( | touchkey4_t * | ctx | ) |
Click Default Configuration function.
ctx | Click object. |
@description This function sets some registers to certain values in order to initialize device.
void touchkey4_detect_touch | ( | touchkey4_t * | ctx, |
uint8_t * | input_sens ) |
Touch Detect function.
ctx | Click object. |
input_sens | Results of detecting touch on sensor inputs. |
@description This function detects touch on sensor inputs and checks is touch detected or released. If noise occured on determined input, the touch will not be detected.
TOUCHKEY4_RETVAL touchkey4_init | ( | touchkey4_t * | ctx, |
touchkey4_cfg_t * | cfg ) |
Initialization function.
ctx | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.
void touchkey4_read_reg | ( | touchkey4_t * | ctx, |
const uint8_t | register_address, | ||
uint8_t * | data_out, | ||
const uint8_t | n_bytes ) |
Generic Read function.
ctx | Click object. |
register_address | Address which from data be read. |
data_out | Buffer where data be stored. |
n_bytes | Number of bytes which be read. |
@description This function reads data from register.
uint8_t touchkey4_receive_byte | ( | touchkey4_t * | ctx, |
const uint8_t | register_address ) |
Read byte function.
ctx | Click object. |
register_address | Address which from data be read. |
Read | byte |
@description This function reads data from register.
void touchkey4_set_active_mode | ( | touchkey4_t * | ctx, |
const uint8_t | analog_gain, | ||
const uint8_t | en_input1, | ||
const uint8_t | en_input2, | ||
const uint8_t | en_input3 ) |
Active Mode Set function.
ctx | Click object. |
analog_gain | Possible gain value is 1, 2, 4 or 8. |
en_input1 | Enable or disable sensor input 1. |
en_input2 | Enable or disable sensor input 2. |
en_input3 | Enable or disable sensor input 3. |
@description This function puts device in Active mode and enables desired inputs in Active mode.
1 - enable sensor input, 0 - disable sensor input
void touchkey4_set_combo_mode | ( | touchkey4_t * | ctx, |
const uint8_t | analog_gain, | ||
const uint8_t | en_input1, | ||
const uint8_t | en_input2, | ||
const uint8_t | en_input3 ) |
Combo Mode Set function.
ctx | Click object. |
analog_gain | Possible gain value is 1, 2, 4 or 8. |
en_input1 | Enable or disable sensor input 1. |
en_input2 | Enable or disable sensor input 2. |
en_input3 | Enable or disable sensor input 3. |
@description Function puts device in Combo mode (Active and Standby) and enables desired inputs in Active mode, Standby mode or both modes.
0 - disable input, 1 - enable input in Standby mode, 3 - enable input in Active mode, 5 - enable input in both modes
void touchkey4_set_deep_sleep_mode | ( | touchkey4_t * | ctx | ) |
DeepSleep Mode Set function.
ctx | Click object. |
@description This function puts device in DeepSleep mode.
In this mode the I2C communication will not work and the sensor inputs will not detect touch.
void touchkey4_set_standby_mode | ( | touchkey4_t * | ctx, |
const uint8_t | analog_gain, | ||
const uint8_t | en_input1, | ||
const uint8_t | en_input2, | ||
const uint8_t | en_input3 ) |
Standby Mode Set function.
ctx | Click object. |
analog_gain | Possible gain value is 1, 2, 4 or 8. |
en_input1 | Enable or disable sensor input 1. |
en_input2 | Enable or disable sensor input 2. |
en_input3 | Enable or disable sensor input 3. |
@description This function puts device in Standby mode and enables desired inputs in Standby mode.
1 - enable sensor input, 0 - disable sensor input
void touchkey4_write_reg | ( | touchkey4_t * | ctx, |
const uint8_t | register_address, | ||
const uint8_t | transfer_data ) |
Generic Write function.
ctx | Click object. |
register_address | Address where data be written. |
transfer_data | Data which be written. |
@description This function writes one byte to register.