capslider2 2.0.0.0
|
Functions | |
void | capslider2_cfg_setup (capslider2_cfg_t *cfg) |
Config Object Initialization function. | |
CAPSLIDER2_RETVAL | capslider2_init (capslider2_t *ctx, capslider2_cfg_t *cfg) |
Initialization function. | |
void | capslider2_generic_write (capslider2_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic write function. | |
void | capslider2_generic_read (capslider2_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic read function. | |
uint8_t | capsldr2_write_reg (capslider2_t *ctx, uint8_t register_address, uint8_t *data_in, uint8_t n_bytes) |
Generic Write function. | |
uint8_t | capsldr2_read_reg (capslider2_t *ctx, uint8_t register_address, uint8_t *data_out, uint8_t n_bytes) |
Generic Read function. | |
uint8_t | capsldr2_check_data_ready (capslider2_t *ctx) |
Data Ready Check function. | |
uint8_t | capsldr2_enable_chann (capslider2_t *ctx, uint16_t sel_chann) |
Channel Enable function. | |
void | capsldr2_get_data (capslider2_t *ctx, uint16_t *wheel_data1, uint16_t *wheel_data2) |
Data Get function. | |
void | capsldr2_set_output (capslider2_t *ctx, uint8_t input_data, uint8_t output_mode) |
Output Set function. | |
void | capsldr2_set_threshold (capslider2_t *ctx, uint8_t thresh_value) |
Threshold Set function. | |
void | capsldr2_reset (capslider2_t *ctx) |
Reset function. | |
void | capsldr2_config (capslider2_t *ctx) |
Config function. | |
uint8_t capsldr2_check_data_ready | ( | capslider2_t * | ctx | ) |
Data Ready Check function.
ctx | Click object. |
Function checks is conversion cycle done and is data ready for reading.
void capsldr2_config | ( | capslider2_t * | ctx | ) |
Config function.
ctx | Click object. |
Function performs the CAP Slider 2 configuration.
uint8_t capsldr2_enable_chann | ( | capslider2_t * | ctx, |
uint16_t | sel_chann ) |
Channel Enable function.
ctx | Click object. |
sel_chann | Selects which channel be activated. |
Function puts the desired channel/channels to active state.
void capsldr2_get_data | ( | capslider2_t * | ctx, |
uint16_t * | wheel_data1, | ||
uint16_t * | wheel_data2 ) |
Data Get function.
ctx | Click object. |
wheel_data1 | Memory where data from wheel 0 register be stored. |
wheel_data2 | Memory where data from wheel 1 register be stored. |
Function reads data from both wheel registers and stores these values to memory via output parameters.
uint8_t capsldr2_read_reg | ( | capslider2_t * | ctx, |
uint8_t | register_address, | ||
uint8_t * | data_out, | ||
uint8_t | n_bytes ) |
Generic Read function.
ctx | Click object. |
register_address | Address which from data be read |
data_out | Memory where data be stored |
n_bytes | Number of bytes to be read |
Function reads the determined number of bytes from the register.
void capsldr2_reset | ( | capslider2_t * | ctx | ) |
Reset function.
ctx | Click object. |
Function performs the device reset and puts the device back to normal operating mode.
void capsldr2_set_output | ( | capslider2_t * | ctx, |
uint8_t | input_data, | ||
uint8_t | output_mode ) |
Output Set function.
ctx | Click object. |
input_data | Input data which be showed on LEDs. |
output_mode | Determines how input data be showed on LEDs. |
Function sets output LEDs depending on the input wheel data value on the way which is determined with the ouputMode parameter.
void capsldr2_set_threshold | ( | capslider2_t * | ctx, |
uint8_t | thresh_value ) |
Threshold Set function.
ctx | Click object. |
thresh_value | Determines touch and proximity sensitivity for all channels. |
Function determines touch and proximity sensitivity (threshold) for all channels.
uint8_t capsldr2_write_reg | ( | capslider2_t * | ctx, |
uint8_t | register_address, | ||
uint8_t * | data_in, | ||
uint8_t | n_bytes ) |
Generic Write function.
ctx | Click object. |
register_address | Address where data be written. |
data_in | Data to be written. |
n_bytes | Number of bytes to be written. |
Function writes the determined number of bytes to the register.
void capslider2_cfg_setup | ( | capslider2_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
void capslider2_generic_read | ( | capslider2_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 capslider2_generic_write | ( | capslider2_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.
CAPSLIDER2_RETVAL capslider2_init | ( | capslider2_t * | ctx, |
capslider2_cfg_t * | cfg ) |
Initialization function.
capslider2 | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.