c2x2key 2.0.0.0
Public function

Functions

void c2x2key_cfg_setup (c2x2key_cfg_t *cfg)
 Config Object Initialization function.
 
C2X2KEY_RETVAL c2x2key_init (c2x2key_t *ctx, c2x2key_cfg_t *cfg)
 Initialization function.
 
void c2x2key_default_cfg (c2x2key_t *ctx)
 Click Default Configuration function.
 
uint8_t c2x2key_t1_state (c2x2key_t *ctx)
 Taster 1 state function.
 
uint8_t c2x2key_t2_state (c2x2key_t *ctx)
 Taster 2 state function.
 
uint8_t c2x2key_t3_state (c2x2key_t *ctx)
 Taster 3 state function.
 
uint8_t c2x2key_t4_state (c2x2key_t *ctx)
 Taster 4 state function.
 
uint8_t c2x2key_taster_pressed (c2x2key_t *ctx)
 Taster Pressed function.
 

Detailed Description

Function Documentation

◆ c2x2key_cfg_setup()

void c2x2key_cfg_setup ( c2x2key_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.

◆ c2x2key_default_cfg()

void c2x2key_default_cfg ( c2x2key_t * ctx)

Click Default Configuration function.

Parameters
ctxClick object.

@description This function executes default configuration for 2x2 key click.

◆ c2x2key_init()

C2X2KEY_RETVAL c2x2key_init ( c2x2key_t * ctx,
c2x2key_cfg_t * cfg )

Initialization function.

Parameters
c2x2keyClick object.
cfgClick configuration structure.

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

◆ c2x2key_t1_state()

uint8_t c2x2key_t1_state ( c2x2key_t * ctx)

Taster 1 state function.

Parameters
ctxClick object.
Returns

  • 1 : Key 1 pressed
  • 0 : Key 1 is not pressed

@description This function gets state of T1O pin on 2X2_Key Click board.

◆ c2x2key_t2_state()

uint8_t c2x2key_t2_state ( c2x2key_t * ctx)

Taster 2 state function.

Parameters
ctxClick object.
Returns

  • 1 : Key 2 pressed
  • 0 : Key 2 is not pressed

@description This function gets state of T2O pin on 2X2_Key Click board.

◆ c2x2key_t3_state()

uint8_t c2x2key_t3_state ( c2x2key_t * ctx)

Taster 3 state function.

Parameters
ctxClick object.
Returns

  • 1 : Key 3 pressed
  • 0 : Key 3 is not pressed

@description This function gets state of T3O pin on 2X2_Key Click board.

◆ c2x2key_t4_state()

uint8_t c2x2key_t4_state ( c2x2key_t * ctx)

Taster 4 state function.

Parameters
ctxClick object.
Returns

  • 1 : Key 4 pressed
  • 0 : Key 4 is not pressed

@description This function gets state of T4O pin on 2X2_Key Click board.

◆ c2x2key_taster_pressed()

uint8_t c2x2key_taster_pressed ( c2x2key_t * ctx)

Taster Pressed function.

Parameters
ctxClick object.
Returns

  • 1 : Any key pressed
  • 0 : Any key is not pressed

@description This function gets state of TINT pin on 2X2_Key Click board.