adc 2.0.0.0
Public Function

Functions

void adc_cfg_setup (adc_cfg_t *cfg)
 Configuration Object Setup function.
 
ADC_RETVAL adc_init (adc_t *ctx, adc_cfg_t *cfg)
 Click Initialization function.
 
uint16_t adc_get_single_ended_ch (adc_t *ctx, uint8_t channel)
 Get Single-Ended Channel function.
 
uint16_t adc_get_differential_ch (adc_t *ctx, uint8_t channel)
 Get Pseudo-Differential Pair function.
 

Detailed Description

Function Documentation

◆ adc_cfg_setup()

void adc_cfg_setup ( adc_cfg_t * cfg)

Configuration Object Setup function.

Parameters
cfgClick configuration structure.

@description This function initializes click configuration structure to initial state.

Note
All used pins will be set to unconnected state. Reference voltage will be set to 3V3 by default.

◆ adc_get_differential_ch()

uint16_t adc_get_differential_ch ( adc_t * ctx,
uint8_t channel )

Get Pseudo-Differential Pair function.

Parameters
ctxClick object.
channelDifferential channels selector. (CH01 means that CH0 is IN+, and CH1 is IN-).
Returns
Voltage level of selected pseudo-differential pair.

@description This function returns voltage level of selected pseudo-differential pair in millivolts. The voltage value will be placed also in the corresponding field of ctx object.

◆ adc_get_single_ended_ch()

uint16_t adc_get_single_ended_ch ( adc_t * ctx,
uint8_t channel )

Get Single-Ended Channel function.

Parameters
ctxClick object.
channelSingle-Ended channel selector. (From CH0 to CH3).
Returns
Voltage level of selected channel [mV].

@description This function returns voltage level of selected single-ended channel in millivolts. The voltage value will be placed also in the corresponding field of ctx object.

◆ adc_init()

ADC_RETVAL adc_init ( adc_t * ctx,
adc_cfg_t * cfg )

Click Initialization function.

Parameters
ctxClick object.
cfgClick configuration structure.
Returns
0x0 - Ok, 0xFF - Driver init error.

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