c4x4key  2.0.0.0
Functions
Public function

Functions

void c4x4key_cfg_setup (c4x4key_cfg_t *cfg)
 Config Object Initialization function. More...
 
C4X4KEY_RETVAL c4x4key_init (c4x4key_t *ctx, c4x4key_cfg_t *cfg)
 Initialization function. More...
 
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. More...
 
uint16_t c4x4key_get_data (c4x4key_t *ctx)
 Get 16-bit data function. More...
 
uint8_t c4x4key_get_btn_position (c4x4key_t *ctx)
 Get position pressed button function. More...
 

Detailed Description

Function Documentation

◆ c4x4key_cfg_setup()

void c4x4key_cfg_setup ( c4x4key_cfg_t cfg)

Config Object Initialization function.

Parameters
cfgClick configuration structure.

@description This function initializes click configuration structure to init state.

Note
All used pins will be set to unconnected state.

◆ c4x4key_generic_transfer()

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.

Parameters
ctxClick object.
wr_bufWrite data buffer
wr_lenNumber of byte in write data buffer
rd_bufRead data buffer
rd_lenNumber of byte in read data buffer

@description Generic SPI transfer, for sending and receiving packages

◆ c4x4key_get_btn_position()

uint8_t c4x4key_get_btn_position ( c4x4key_t ctx)

Get position pressed button function.

Parameters
ctxClick object.
Returns
8-bit position value.

@description Function get 8-bit position of the pressed button from the 74HC165 chip.

◆ c4x4key_get_data()

uint16_t c4x4key_get_data ( c4x4key_t ctx)

Get 16-bit data function.

Parameters
ctxClick object.
Returns
16-bit data.

@description Function read 16-bit data from the 74HC165 chip.

◆ c4x4key_init()

C4X4KEY_RETVAL c4x4key_init ( c4x4key_t ctx,
c4x4key_cfg_t cfg 
)

Initialization function.

Parameters
ctxClick object.
cfgClick configuration structure.

@description This function initializes all necessary pins and peripherals used for this click.