rmstodc 2.0.0.0
Public function

Functions

void rmstodc_cfg_setup (rmstodc_cfg_t *cfg)
 Config Object Initialization function.
 
RMSTODC_RETVAL rmstodc_init (rmstodc_t *ctx, rmstodc_cfg_t *cfg)
 Initialization function.
 
uint16_t rms2dc_read_adc (rmstodc_t *ctx)
 ADC Read function.
 
uint16_t rms2dc_vout_adc (rmstodc_t *ctx, uint16_t vcc_sel)
 Get Output Voltage function.
 
void rms2dc_enable (rmstodc_t *ctx, uint8_t state)
 Enable function.
 

Detailed Description

Function Documentation

◆ rms2dc_enable()

void rms2dc_enable ( rmstodc_t * ctx,
uint8_t state )

Enable function.

Parameters
state0 - ON, 1 - OFF

Function turns ON/OFF the device.

◆ rms2dc_read_adc()

uint16_t rms2dc_read_adc ( rmstodc_t * ctx)

ADC Read function.

Returns
Result of AD conversion

Function returns a 12bit result of AD conversion.

◆ rms2dc_vout_adc()

uint16_t rms2dc_vout_adc ( rmstodc_t * ctx,
uint16_t vcc_sel )

Get Output Voltage function.

Parameters
vcc_selVCC value selection [mV]
Returns
Output voltage value

Function returns the output voltage value calculated to mV, depending on the power voltage selection.

◆ rmstodc_cfg_setup()

void rmstodc_cfg_setup ( rmstodc_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.

◆ rmstodc_init()

RMSTODC_RETVAL rmstodc_init ( rmstodc_t * ctx,
rmstodc_cfg_t * cfg )

Initialization function.

Parameters
ctxClick object.
cfgClick configuration structure.

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