c4x4key 2.0.0.0
|
Functions | |
void | c4x4key_cfg_setup (c4x4key_cfg_t *cfg) |
Config Object Initialization function. | |
C4X4KEY_RETVAL | c4x4key_init (c4x4key_t *ctx, c4x4key_cfg_t *cfg) |
Initialization function. | |
void | c4x4key_generic_transfer (c4x4key_t *ctx, uint8_t *wr_buf, uint16_t wr_len, uint8_t *rd_buf, uint16_t rd_len) |
Generic transfer function. | |
uint16_t | c4x4key_get_data (c4x4key_t *ctx) |
Get 16-bit data function. | |
uint8_t | c4x4key_get_btn_position (c4x4key_t *ctx) |
Get position pressed button function. | |
void c4x4key_cfg_setup | ( | c4x4key_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
void c4x4key_generic_transfer | ( | c4x4key_t * | ctx, |
uint8_t * | wr_buf, | ||
uint16_t | wr_len, | ||
uint8_t * | rd_buf, | ||
uint16_t | rd_len ) |
Generic transfer function.
ctx | Click object. |
wr_buf | Write data buffer |
wr_len | Number of byte in write data buffer |
rd_buf | Read data buffer |
rd_len | Number of byte in read data buffer |
@description Generic SPI transfer, for sending and receiving packages
uint8_t c4x4key_get_btn_position | ( | c4x4key_t * | ctx | ) |
Get position pressed button function.
ctx | Click object. |
@description Function get 8-bit position of the pressed button from the 74HC165 chip.
uint16_t c4x4key_get_data | ( | c4x4key_t * | ctx | ) |
Get 16-bit data function.
ctx | Click object. |
@description Function read 16-bit data from the 74HC165 chip.
C4X4KEY_RETVAL c4x4key_init | ( | c4x4key_t * | ctx, |
c4x4key_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.