capwheel 2.0.0.0
|
Functions | |
void | capwheel_cfg_setup (capwheel_cfg_t *cfg) |
Config Object Initialization function. | |
CAPWHEEL_RETVAL | capwheel_init (capwheel_t *ctx, capwheel_cfg_t *cfg) |
Initialization function. | |
void | capwheel_default_cfg (capwheel_t *ctx) |
Click Default Configuration function. | |
void | capwheel_generic_write (capwheel_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic write function. | |
void | capwheel_generic_read (capwheel_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic read function. | |
uint8_t | capwheel_write_reg (capwheel_t *ctx, uint8_t register_address, uint8_t *data_in, uint8_t n_bytes) |
Generic Write function. | |
uint8_t | capwheel_read_reg (capwheel_t *ctx, uint8_t register_address, uint8_t *data_out, uint8_t n_bytes) |
Generic Read function. | |
uint8_t | capwheel_check_data_ready (capwheel_t *ctx) |
Data Ready Check function. | |
uint8_t | capwheel_enable_chann (capwheel_t *ctx, uint16_t sel_chann) |
Channel Enable function. | |
void | capwheel_get_data (capwheel_t *ctx, uint16_t *wheel_data) |
Data Get function. | |
void | capwheel_set_output (capwheel_t *ctx, uint16_t input_data, uint8_t output_mode) |
Output Set function. | |
void | capwheel_set_threshold (capwheel_t *ctx, uint8_t thresh_value) |
Threshold Set function. | |
void | capwheel_reset (capwheel_t *ctx) |
Reset function. | |
void capwheel_cfg_setup | ( | capwheel_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
uint8_t capwheel_check_data_ready | ( | capwheel_t * | ctx | ) |
Data Ready Check function.
ctx | Click object. |
Function checks is conversion cycle done and is data ready for reading.
void capwheel_default_cfg | ( | capwheel_t * | ctx | ) |
Click Default Configuration function.
ctx | Click object. |
@description This function executes default configuration for CapWheel click.
uint8_t capwheel_enable_chann | ( | capwheel_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 capwheel_generic_read | ( | capwheel_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 capwheel_generic_write | ( | capwheel_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.
void capwheel_get_data | ( | capwheel_t * | ctx, |
uint16_t * | wheel_data ) |
Data Get function.
ctx | Click object. |
wheel_data | Memory where data be stored. |
Function reads data from wheel 1 and stores this value in memory via output parameter.
CAPWHEEL_RETVAL capwheel_init | ( | capwheel_t * | ctx, |
capwheel_cfg_t * | cfg ) |
Initialization function.
capwheel | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.
uint8_t capwheel_read_reg | ( | capwheel_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 capwheel_reset | ( | capwheel_t * | ctx | ) |
Reset function.
ctx | Click object. |
Function performs the device reset and puts the device back to normal operating mode.
void capwheel_set_output | ( | capwheel_t * | ctx, |
uint16_t | input_data, | ||
uint8_t | output_mode ) |
Output Set function.
ctx | Click object. |
inputdata | Input data which be showed on output LEDs. |
outputdode | Determines how input data be showed on output LEDs. |
Function sets output LEDs depending on the input wheel data value in the way which is determined with the ouputMode parameter.
void capwheel_set_threshold | ( | capwheel_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 capwheel_write_reg | ( | capwheel_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.