ammonia 2.0.0.0
Public function

Functions

void ammonia_cfg_setup (ammonia_cfg_t *cfg)
 Config Object Initialization function.
 
err_t ammonia_init (ammonia_t *ctx, ammonia_cfg_t *cfg)
 Initialization function.
 
err_t ammonia_read_signal_voltage (ammonia_t *ctx, float *data_out)
 Measurement Voltage Read function.
 
err_t ammonia_read_measurement (ammonia_t *ctx, uint16_t *data_out)
 Measurement Read function.
 

Detailed Description

Function Documentation

◆ ammonia_cfg_setup()

void ammonia_cfg_setup ( ammonia_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. Be sure that the ADC selection is properly selected.

◆ ammonia_init()

err_t ammonia_init ( ammonia_t * ctx,
ammonia_cfg_t * cfg )

Initialization function.

Parameters
ctxClick object.
cfgClick configuration structure.
Returns
0 - Ok, (-1) - Error.

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

Note
The ADC selection should be set before call this function.

◆ ammonia_read_measurement()

err_t ammonia_read_measurement ( ammonia_t * ctx,
uint16_t * data_out )

Measurement Read function.

Parameters
ctxClick object.
data_outOutput measurement level [ppm].
Returns
0 - Ok, (-1) - Error.

@description This function reads the level of the measurement signal voltage and calculates this value to ppm in the range from 5 to 200 ppm.

◆ ammonia_read_signal_voltage()

err_t ammonia_read_signal_voltage ( ammonia_t * ctx,
float * data_out )

Measurement Voltage Read function.

Parameters
ctxClick object.
data_outOutput voltage value [V].
Returns
0 - Ok, (-1) - Error.

@description This function reads the level of the output measurement voltage.