pot2  2.0.0.0
Functions
Public function

Functions

void pot2_cfg_setup (pot2_cfg_t *cfg)
 Config Object Initialization function. More...
 
err_t pot2_init (pot2_t *ctx, pot2_cfg_t *cfg)
 Initialization function. More...
 
err_t pot2_read_adc (pot2_t *ctx, uint16_t *data_out)
 Generic read function. More...
 
err_t pot2_read_pin_voltage (pot2_t *ctx, float *data_out)
 Generic read function. More...
 

Detailed Description

Function Documentation

◆ pot2_cfg_setup()

void pot2_cfg_setup ( pot2_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.

◆ pot2_init()

err_t pot2_init ( pot2_t ctx,
pot2_cfg_t cfg 
)

Initialization function.

Parameters
ctxClick object.
cfgClick configuration structure.
Returns
See #err_t definition of data type. 0 - Success, (-1) - Error.

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

◆ pot2_read_adc()

err_t pot2_read_adc ( pot2_t ctx,
uint16_t *  data_out 
)

Generic read function.

Parameters
ctxClick object.
data_outADC data value on the pin.
Returns
See #err_t definition of data type.

@description This function reads ADC data value on the pin.

◆ pot2_read_pin_voltage()

err_t pot2_read_pin_voltage ( pot2_t ctx,
float *  data_out 
)

Generic read function.

Parameters
ctxClick object.
data_outVoltage value on the pin.
Returns
See #err_t definition of data type.

@description This function reads voltage value on the pin.