touchclamp 2.0.0.0
|
Functions | |
void | touchclamp_cfg_setup (touchclamp_cfg_t *cfg) |
Config Object Initialization function. | |
TOUCHCLAMP_RETVAL | touchclamp_init (touchclamp_t *ctx, touchclamp_cfg_t *cfg) |
Initialization function. | |
void | touchclamp_default_cfg (touchclamp_t *ctx) |
Click Default Configuration function. | |
void | touchclamp_generic_write (touchclamp_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic write function. | |
void | touchclamp_generic_read (touchclamp_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic read function. | |
void | touchclamp_soft_reset (touchclamp_t *ctx) |
Soft reset function. | |
void | touchclamp_set_touch_threshold (touchclamp_t *ctx, uint8_t th_data) |
Setting touch threshold for a specified electrode function. | |
uint8_t | touchclamp_get_touch_threshold (touchclamp_t *ctx, uint8_t electrode) |
Get the current touch threshold for a specified electrode function. | |
void | touchclamp_set_release_threshold (touchclamp_t *ctx, uint8_t rth_data) |
Setting release threshold for a specified electrode function. | |
uint8_t | touchclamp_get_release_threshold (touchclamp_t *ctx, uint8_t electrode) |
Get the current release threshold for a specified electrode function. | |
uint16_t | touchclamp_get_touch_data (touchclamp_t *ctx) |
Get touch data function. | |
void | touchclamp_set_sample_period (touchclamp_t *ctx, uint8_t sample_per) |
Sets the sample period function. | |
void | touchclamp_digital_toggle (touchclamp_t *ctx, uint8_t electrode) |
Toggles electrode set as GPIO output function. | |
void | touchclamp_stop (touchclamp_t *ctx) |
Stop touch clamp function. | |
uint8_t | touchclamp_get_interrupt (touchclamp_t *ctx) |
Get state of interrupt pin function. | |
void touchclamp_cfg_setup | ( | touchclamp_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
void touchclamp_default_cfg | ( | touchclamp_t * | ctx | ) |
Click Default Configuration function.
ctx | Click object. |
@description This function executes default configuration for TouchClamp click.
TOUCHCLAMP_REG_ECR ------------------------------------------------- TOUCHCLAMP_ECR_INIT_VAL
TOUCHCLAMP_REG_MHDR
TOUCHCLAMP_MHDR_MAX_VAL
TOUCHCLAMP_REG_NHDR ------------------------------------------------- TOUCHCLAMP_NHDR_MIN_VAL
TOUCHCLAMP_REG_NCLR ------------------------------------------------- TOUCHCLAMP_NCLR_DEF_VAL
TOUCHCLAMP_REG_FDLR ------------------------------------------------- TOUCHCLAMP_FDLR_DEF_VAL
TOUCHCLAMP_REG_MHDF
TOUCHCLAMP_MHDF_DEF_VAL
TOUCHCLAMP_REG_NHDF ------------------------------------------------- TOUCHCLAMP_NHDF_DEF_VAL
TOUCHCLAMP_REG_NCLF
TOUCHCLAMP_NCLF_DEF_VAL
TOUCHCLAMP_REG_FDLF ------------------------------------------------- TOUCHCLAMP_FDLF_DEF_VAL
TOUCHCLAMP_REG_NHDT
TOUCHCLAMP_NHDT_DEF_VAL
TOUCHCLAMP_REG_NCLT ------------------------------------------------- TOUCHCLAMP_NCLT_DEF_VAL
TOUCHCLAMP_REG_FDLT
TOUCHCLAMP_FDLT_DEF_VAL
TOUCHCLAMP_REG_MHDPROXR ------------------------------------------------- TOUCHCLAMP_MHDPROXR_DEF_VAL
TOUCHCLAMP_REG_NHDPROXR
TOUCHCLAMP_NHDPROXR_DEF_VAL
TOUCHCLAMP_REG_NCLPROXR ------------------------------------------------- TOUCHCLAMP_NCLPROXR_DEF_VAL
TOUCHCLAMP_REG_FDLPROXR
TOUCHCLAMP_FDLPROXR_DEF_VAL
TOUCHCLAMP_REG_MHDPROXF ------------------------------------------------- TOUCHCLAMP_MHDPROXF_DEF_VAL
TOUCHCLAMP_REG_NHDPROXF
TOUCHCLAMP_NHDPROXF_DEF_VAL
TOUCHCLAMP_REG_NCLPROXF ------------------------------------------------- TOUCHCLAMP_NCLPROXF_DEF_VAL
TOUCHCLAMP_REG_FDLPROXF
TOUCHCLAMP_NCLPROXF_DEF_VAL
TOUCHCLAMP_REG_NHDPROXT ------------------------------------------------- TOUCHCLAMP_NHDPROXT_DEF_VAL
TOUCHCLAMP_REG_NCLPROXT
TOUCHCLAMP_NHDPROXT_DEF_VAL
TOUCHCLAMP_REG_FDLPROXT ------------------------------------------------- TOUCHCLAMP_NHDPROXT_DEF_VAL
TOUCHCLAMP_REG_DTR
TOUCHCLAMP_DTR_DEF_VAL
TOUCHCLAMP_REG_AFE1 ------------------------------------------------- TOUCHCLAMP_AFE1_DEF_VAL
TOUCHCLAMP_REG_AFE2
TOUCHCLAMP_AFE2_DEF_VAL
Set touch threshold ------------------------------------------------- 0x28 ( 40 )
Set release threshold
0x14 ( 20 )
LDC1101_REG_CFG_ADDITIONAL_DEVICE ------------------------------------------------- TOUCHCLAMP_ECR_DEF_VAL
void touchclamp_digital_toggle | ( | touchclamp_t * | ctx, |
uint8_t | electrode ) |
Toggles electrode set as GPIO output function.
ctx | Click object. |
electrode | Digital toggle electrode position value. |
@description This function set the sample period of the MPR121, the time between capacitive readings. Higher values consume less power, but are less responsive.
void touchclamp_generic_read | ( | touchclamp_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 touchclamp_generic_write | ( | touchclamp_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.
uint8_t touchclamp_get_interrupt | ( | touchclamp_t * | ctx | ) |
Get state of interrupt pin function.
ctx | Click object. |
0 : Not active.
1 : Active.
@description This function gets states of the interrupt ( INT ) pin of the MPR121 chip.
uint8_t touchclamp_get_release_threshold | ( | touchclamp_t * | ctx, |
uint8_t | electrode ) |
Get the current release threshold for a specified electrode function.
ctx | Click object. |
electrode | Release threshold electrode position value. |
@description This function current release threshold for a specified electrode of MPR121 chip.
uint16_t touchclamp_get_touch_data | ( | touchclamp_t * | ctx | ) |
Get touch data function.
ctx | Click object. |
@description This function 16-bit touch data from the two register address of MPR121 chip.
uint8_t touchclamp_get_touch_threshold | ( | touchclamp_t * | ctx, |
uint8_t | electrode ) |
Get the current touch threshold for a specified electrode function.
ctx | Click object. |
electrode | Touch threshold electrode position value. |
@description This function get the current touch threshold for a specified electrode of MPR121 chip.
TOUCHCLAMP_RETVAL touchclamp_init | ( | touchclamp_t * | ctx, |
touchclamp_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 touchclamp_set_release_threshold | ( | touchclamp_t * | ctx, |
uint8_t | rth_data ) |
Setting release threshold for a specified electrode function.
ctx | Click object. |
th_data | Release threshold value. |
@description This function set release threshold value for a specified electrode of MPR121 chip.
void touchclamp_set_sample_period | ( | touchclamp_t * | ctx, |
uint8_t | sample_per ) |
Sets the sample period function.
ctx | Click object. |
sample_per | 8-bit sample period value. |
@description This function set the sample period of the MPR121, the time between capacitive readings. Higher values consume less power, but are less responsive.
void touchclamp_set_touch_threshold | ( | touchclamp_t * | ctx, |
uint8_t | th_data ) |
Setting touch threshold for a specified electrode function.
ctx | Click object. |
th_data | Touch threshold value. |
@description This function set touch threshold value for a specified electrode of MPR121 chip.
void touchclamp_soft_reset | ( | touchclamp_t * | ctx | ) |
Soft reset function.
ctx | Click object. |
@description This function performs a software reset.
void touchclamp_stop | ( | touchclamp_t * | ctx | ) |
Stop touch clamp function.
ctx | Click object. |
@description The stop function switch the MPR121 chip to stop mode which reduces power consumption to 3uA.