pot3 2.0.0.0
|
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. | |
void pot3_cfg_setup | ( | pot3_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
uint16_t pot3_get_vout | ( | pot3_t * | ctx, |
uint8_t | vref_sel, | ||
uint16_t | n_samples ) |
ADC Averaged Read function.
ctx | Click object. |
vref_sel | VREF selection: 0 - 2V, 1 - 3V3 |
n_samples | Number of conversions to be read. |
@description This function returns VOUT value calculated to millivolts, with desired number of AD conversions included in calculations.
POT3_RETVAL pot3_init | ( | pot3_t * | ctx, |
pot3_cfg_t * | cfg ) |
Initialization function.
ctx | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.
uint16_t pot3_read_adc | ( | pot3_t * | ctx | ) |
ADC Read function
pot3 | Click object. |
@description This function reads the result of AD conversion.
uint16_t pot3_read_avg_adc | ( | pot3_t * | ctx, |
uint16_t | n_samples ) |
ADC Averaged Read function.
ctx | Click object. |
n_samples | Number of conversions to be read. |
@description This function reads the averaged result of AD conversions.