pot  2.0.0.0
Functions
Public function

Functions

void pot_cfg_setup (pot_cfg_t *cfg)
 Config Object Initialization function. More...
 
err_t pot_init (pot_t *ctx, pot_cfg_t *cfg)
 Initialization function. More...
 
uint16_t pot_generic_read (pot_t *ctx)
 Generic read function. More...
 
float pot_read_voltage (pot_t *ctx)
 Generic read voltage function. More...
 

Detailed Description

Function Documentation

◆ pot_cfg_setup()

void pot_cfg_setup ( pot_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.

◆ pot_generic_read()

uint16_t pot_generic_read ( pot_t ctx)

Generic read function.

Parameters
ctxClick object.
Returns
ADC data.

@description This function read ADC data.

◆ pot_init()

err_t pot_init ( pot_t ctx,
pot_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.

◆ pot_read_voltage()

float pot_read_voltage ( pot_t ctx)

Generic read voltage function.

Parameters
ctxClick object.
Returns
Voltage value.

@description This function read voltage level of AN pin.