capwheel2 2.0.0.0
|
Functions | |
void | capwheel2_cfg_setup (capwheel2_cfg_t *cfg) |
Config Object Initialization function. | |
CAPWHEEL2_RETVAL | capwheel2_init (capwheel2_t *ctx, capwheel2_cfg_t *cfg) |
Initialization function. | |
uint8_t | capwheel2_default_cfg (capwheel2_t *ctx) |
Click Default Configuration function. | |
void | capwheel2_i2c_write_no_wait (capwheel2_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Write function. | |
void | capwheel2_i2c_read_no_wait (capwheel2_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Read function. | |
uint8_t | capwheel2_int_get (capwheel2_t *ctx) |
Getingg state of INT pin. | |
uint8_t | capwheel2_wait_for_rdy (capwheel2_t *ctx) |
Waiting for RDY (INT) pin. | |
uint8_t | capwheel2_i2c_read_wait (capwheel2_t *ctx, uint8_t register_address, uint8_t *read_buffer, uint8_t n_bytes) |
Read wait function. | |
uint8_t | capwheel2_i2c_write_wait (capwheel2_t *ctx, uint8_t register_address, uint8_t *register_values, uint8_t n_bytes) |
Write wait function. | |
void capwheel2_cfg_setup | ( | capwheel2_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
uint8_t capwheel2_default_cfg | ( | capwheel2_t * | ctx | ) |
Click Default Configuration function.
ctx | Click object. |
@description This function executes default configuration for CapWheel2 click.
void capwheel2_i2c_read_no_wait | ( | capwheel2_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_buf, | ||
uint8_t | len ) |
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.
uint8_t capwheel2_i2c_read_wait | ( | capwheel2_t * | ctx, |
uint8_t | register_address, | ||
uint8_t * | read_buffer, | ||
uint8_t | n_bytes ) |
Read wait function.
ctx | Click object. |
register_address | Register address. |
read_buffer | Buffer to store register byte(s). |
len | Number of the bytes to be read. |
@description This function reads data from the desired register.
void capwheel2_i2c_write_no_wait | ( | capwheel2_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_buf, | ||
uint8_t | len ) |
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 capwheel2_i2c_write_wait | ( | capwheel2_t * | ctx, |
uint8_t | register_address, | ||
uint8_t * | register_values, | ||
uint8_t | n_bytes ) |
Write wait function.
ctx | Click object. |
register_address | Register address. |
register_values | Buffer to store register value(s). |
len | Number of the bytes in data buf. |
@description This function sets register content.
CAPWHEEL2_RETVAL capwheel2_init | ( | capwheel2_t * | ctx, |
capwheel2_cfg_t * | cfg ) |
Initialization function.
capwheel2 | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.
uint8_t capwheel2_int_get | ( | capwheel2_t * | ctx | ) |
Getingg state of INT pin.
ctx | Click object. |
@description This function gets state of INT pin.
uint8_t capwheel2_wait_for_rdy | ( | capwheel2_t * | ctx | ) |
Waiting for RDY (INT) pin.
ctx | Click object. |
@description This function waits for RDY pin to transition from HIGH to LOW state.