keylock2 2.0.0.0

Functions

void keylock2_cfg_setup (keylock2_cfg_t *cfg)
 Config Object Initialization function.
 
KEYLOCK2_RETVAL keylock2_init (keylock2_t *ctx, keylock2_cfg_t *cfg)
 Initialization function.
 
uint8_t keylock2_get_pin_state (keylock2_t *ctx, uint8_t pin)
 Get Pin State.
 
uint8_t keylock2_get_position (keylock2_t *ctx)
 Get Pin State.
 

Detailed Description

Function Documentation

◆ keylock2_cfg_setup()

void keylock2_cfg_setup ( keylock2_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.

◆ keylock2_get_pin_state()

uint8_t keylock2_get_pin_state ( keylock2_t * ctx,
uint8_t pin )

Get Pin State.

Parameters
ctxClick object.

@description This function gets states of pins in1, in2 and in3 on Key Lock 2 click.

◆ keylock2_get_position()

uint8_t keylock2_get_position ( keylock2_t * ctx)

Get Pin State.

Parameters
ctxClick object.

@description This function gets Position (First, Second, Third) of pins in1, in2 and in3 on Key Lock 2 click.

◆ keylock2_init()

KEYLOCK2_RETVAL keylock2_init ( keylock2_t * ctx,
keylock2_cfg_t * cfg )

Initialization function.

Parameters
keylock2Click object.
cfgClick configuration structure.

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