airquality7 2.0.0.0

Functions

void airquality7_cfg_setup (airquality7_cfg_t *cfg)
 Config Object Initialization function.
 
AIRQUALITY7_RETVAL airquality7_init (airquality7_t *ctx, airquality7_cfg_t *cfg)
 Initialization function.
 
void airquality7_generic_write (airquality7_t *ctx, uint8_t *data_buf)
 Generic write function.
 
void airquality7_generic_read (airquality7_t *ctx, uint8_t *data_buf)
 Generic read function.
 
void airquality7_set_ppmco2 (airquality7_t *ctx, uint8_t *ppmco2_value)
 Set CO2 [ppm] function.
 
airquality7_err_t airquality7_get_status (airquality7_t *ctx, uint16_t *tvoc_ppb, uint16_t *co2_ppm, uint32_t *res_val_ohm, uint8_t *err_byte)
 Get Status function.
 
airquality7_err_t airquality7_get_revision (airquality7_t *ctx, uint8_t *year, uint8_t *month, uint8_t *day, uint8_t *ascii_code)
 Get Revision function.
 
airquality7_err_t airquality7_get_r0_calib (airquality7_t *ctx, uint16_t *r0_kohm)
 Get R0 Calibration function.
 

Detailed Description

Function Documentation

◆ airquality7_cfg_setup()

void airquality7_cfg_setup ( airquality7_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.

◆ airquality7_generic_read()

void airquality7_generic_read ( airquality7_t * ctx,
uint8_t * data_buf )

Generic read function.

Parameters
ctxClick object.
data_bufOutput data buf

@description This function reads data from the desired register.

◆ airquality7_generic_write()

void airquality7_generic_write ( airquality7_t * ctx,
uint8_t * data_buf )

Generic write function.

Parameters
ctxClick object.
data_bufData buf to be written.

@description This function writes data to the desired register.

◆ airquality7_get_r0_calib()

airquality7_err_t airquality7_get_r0_calib ( airquality7_t * ctx,
uint16_t * r0_kohm )

Get R0 Calibration function.

Parameters
ctxClick object.
r0_kohmR0 calibration output data in kOhms.
Returns
0 - Ok, 1 - CRC error.

@description This function is used to read the R0 (calibration) value in [kOhms] coded on 2 data bytes and CRC byte.

◆ airquality7_get_revision()

airquality7_err_t airquality7_get_revision ( airquality7_t * ctx,
uint8_t * year,
uint8_t * month,
uint8_t * day,
uint8_t * ascii_code )

Get Revision function.

Parameters
ctxClick object.
yearRevision year output data.
monthRevision month output data.
dayRevision day output data.
ascii_codeRevision ASCII code output data.
Returns
0 - Ok, 1 - CRC error.

@description This function will return the revision code of the module coded on year data byte, month data byte, day data byte, ASCII code data byte for a charter and CRC byte.

◆ airquality7_get_status()

airquality7_err_t airquality7_get_status ( airquality7_t * ctx,
uint16_t * tvoc_ppb,
uint16_t * co2_ppm,
uint32_t * res_val_ohm,
uint8_t * err_byte )

Get Status function.

Parameters
ctxClick object.
tvoc_ppbtVOC output data in ppb.
co2_ppmCO2 output data in ppm.
res_val_ohmResistor value output data in Ohms.
err_byteError status output data.
Returns
0 - Ok, 1 - CRC error.

@description This function is used to read the Air quality 7 click status coded on tVOC data byte [0 - 1000 ppb], CO2 data byte [400 - 2000 ppm], resistor value data 3 bytes [Ohm], error status byte and CRC byte.

◆ airquality7_init()

AIRQUALITY7_RETVAL airquality7_init ( airquality7_t * ctx,
airquality7_cfg_t * cfg )

Initialization function.

Parameters
airquality7Click object.
cfgClick configuration structure.

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

◆ airquality7_set_ppmco2()

void airquality7_set_ppmco2 ( airquality7_t * ctx,
uint8_t * ppmco2_value )

Set CO2 [ppm] function.

Parameters
ctxClick object.
ppmco2_value4 bytes of CO2 data to be written in ppm.

@description This function is used to send the ppmCO2 value given by an external analyzer to the Air quality 7 click in order to recalibrate its outputs.