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. | |
void airquality7_cfg_setup | ( | airquality7_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
void airquality7_generic_read | ( | airquality7_t * | ctx, |
uint8_t * | data_buf ) |
Generic read function.
ctx | Click object. |
data_buf | Output data buf |
@description This function reads data from the desired register.
void airquality7_generic_write | ( | airquality7_t * | ctx, |
uint8_t * | data_buf ) |
Generic write function.
ctx | Click object. |
data_buf | Data buf to be written. |
@description This function writes data to the desired register.
airquality7_err_t airquality7_get_r0_calib | ( | airquality7_t * | ctx, |
uint16_t * | r0_kohm ) |
Get R0 Calibration function.
ctx | Click object. |
r0_kohm | R0 calibration output data in kOhms. |
@description This function is used to read the R0 (calibration) value in [kOhms] coded on 2 data bytes and CRC byte.
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.
ctx | Click object. |
year | Revision year output data. |
month | Revision month output data. |
day | Revision day output data. |
ascii_code | Revision ASCII code output data. |
@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_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.
ctx | Click object. |
tvoc_ppb | tVOC output data in ppb. |
co2_ppm | CO2 output data in ppm. |
res_val_ohm | Resistor value output data in Ohms. |
err_byte | Error status output data. |
@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_RETVAL airquality7_init | ( | airquality7_t * | ctx, |
airquality7_cfg_t * | cfg ) |
Initialization function.
airquality7 | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.
void airquality7_set_ppmco2 | ( | airquality7_t * | ctx, |
uint8_t * | ppmco2_value ) |
Set CO2 [ppm] function.
ctx | Click object. |
ppmco2_value | 4 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.