analogkey 2.0.0.0

Functions

void analogkey_cfg_setup (analogkey_cfg_t *cfg)
 Config Object Initialization function.
 
err_t analogkey_init (analogkey_t *ctx, analogkey_cfg_t *cfg)
 Initialization function.
 
uint16_t analogkey_generic_read (analogkey_t *ctx)
 Generic read function.
 
float analogkey_read_voltage (analogkey_t *ctx)
 Generic read function.
 
analogkey_key_id_t analogkey_get_key (analogkey_t *ctx, float an_value)
 Detects which button is pressed.
 

Detailed Description

Function Documentation

◆ analogkey_cfg_setup()

void analogkey_cfg_setup ( analogkey_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.

◆ analogkey_generic_read()

uint16_t analogkey_generic_read ( analogkey_t * ctx)

Generic read function.

Parameters
ctxClick object.
Returns
ADC data result.

@description This function read ADC data.

◆ analogkey_get_key()

analogkey_key_id_t analogkey_get_key ( analogkey_t * ctx,
float an_value )

Detects which button is pressed.

Parameters
ctxClick object.
adc_valueADC value.
Returns
Which button is pressed.

@description This function returns which button is pressed.

◆ analogkey_init()

err_t analogkey_init ( analogkey_t * ctx,
analogkey_cfg_t * cfg )

Initialization function.

Parameters
ctxClick object.
cfgClick configuration structure.
Returns
0 - Ok, (-1) - Error. @description This function initializes all necessary pins and peripherals used for this click.

◆ analogkey_read_voltage()

float analogkey_read_voltage ( analogkey_t * ctx)

Generic read function.

Parameters
ctxClick object.
Returns
ADC data result.

@description This function read ADC data.