pot3 2.0.0.0
Public function

Functions

void pot3_cfg_setup (pot3_cfg_t *cfg)
 Config Object Initialization function.
 
POT3_RETVAL pot3_init (pot3_t *ctx, pot3_cfg_t *cfg)
 Initialization function.
 
uint16_t pot3_read_adc (pot3_t *ctx)
 ADC Read function
 
uint16_t pot3_read_avg_adc (pot3_t *ctx, uint16_t n_samples)
 ADC Averaged Read function.
 
uint16_t pot3_get_vout (pot3_t *ctx, uint8_t vref_sel, uint16_t n_samples)
 ADC Averaged Read function.
 

Detailed Description

Function Documentation

◆ pot3_cfg_setup()

void pot3_cfg_setup ( pot3_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.

◆ pot3_get_vout()

uint16_t pot3_get_vout ( pot3_t * ctx,
uint8_t vref_sel,
uint16_t n_samples )

ADC Averaged Read function.

Parameters
ctxClick object.
vref_selVREF selection: 0 - 2V, 1 - 3V3
n_samplesNumber of conversions to be read.
Returns
VOUT value calculated to millivolts.

@description This function returns VOUT value calculated to millivolts, with desired number of AD conversions included in calculations.

◆ pot3_init()

POT3_RETVAL pot3_init ( pot3_t * ctx,
pot3_cfg_t * cfg )

Initialization function.

Parameters
ctxClick object.
cfgClick configuration structure.

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

◆ pot3_read_adc()

uint16_t pot3_read_adc ( pot3_t * ctx)

ADC Read function

Parameters
pot3Click object.
Returns
12-bit ADC value.

@description This function reads the result of AD conversion.

◆ pot3_read_avg_adc()

uint16_t pot3_read_avg_adc ( pot3_t * ctx,
uint16_t n_samples )

ADC Averaged Read function.

Parameters
ctxClick object.
n_samplesNumber of conversions to be read.
Returns
12-bit averaged ADC value.

@description This function reads the averaged result of AD conversions.