airquality8 2.0.0.0
|
API for configuring and manipulating Air Quality 8 Click driver. More...
Functions | |
void | airquality8_cfg_setup (airquality8_cfg_t *cfg) |
Air Quality 8 configuration object setup function. | |
err_t | airquality8_init (airquality8_t *ctx, airquality8_cfg_t *cfg) |
Air Quality 8 initialization function. | |
err_t | airquality8_default_cfg (airquality8_t *ctx) |
Air Quality 8 default configuration function. | |
err_t | airquality8_generic_write (airquality8_t *ctx, uint8_t reg, uint8_t *tx_buf, uint8_t tx_len) |
Air Quality 8 I2C writing function. | |
err_t | airquality8_generic_read (airquality8_t *ctx, uint8_t reg, uint8_t *rx_buf, uint8_t rx_len) |
Air Quality 8 I2C reading function. | |
void | airquality8_hw_reset (airquality8_t *ctx) |
Air Quality 8 reset function. | |
err_t | airquality8_get_status (airquality8_t *ctx, uint8_t *status) |
Air Quality 8 get status function. | |
err_t | airquality8_get_sensor_info (airquality8_t *ctx, uint8_t *cfg_data, uint8_t *prod_data, uint16_t *pid) |
Air Quality 8 get sensor info function. | |
err_t | airquality8_init_sensor (airquality8_t *ctx, uint16_t *mox_lr, uint16_t *mox_er) |
Air Quality 8 init sensor function. | |
err_t | airquality8_init_measurement (airquality8_t *ctx) |
Air Quality 8 init measurement function. | |
err_t | airquality8_start_measurement (airquality8_t *ctx) |
Air Quality 8 start measurement function. | |
err_t | airquality8_read_rmox (airquality8_t *ctx, float *rmox, uint16_t mox_lr, uint16_t mox_er) |
Air Quality 8 calculate rmox resistance function. | |
float | airquality8_calc_oaq (float *rmox, uint8_t rcda_strategy, uint8_t gas_detection_strategy) |
Air Quality 8 calculates AQI function. | |
uint8_t | raq_check_interrupt (airquality8_t *ctx) |
Air Quality 8 check interrupt function. | |
API for configuring and manipulating Air Quality 8 Click driver.
float airquality8_calc_oaq | ( | float * | rmox, |
uint8_t | rcda_strategy, | ||
uint8_t | gas_detection_strategy ) |
Air Quality 8 calculates AQI function.
This function calculates AQI from present sample of the ZMOD4510 Gas Sensor Module for OAQ targeting NO2 & O3 on the Air Quality 8 Click board™.
[in] | rmox | : Pointer to array of the 15 sequencer rmox measurements. |
[in] | rcda_strategy | : Strategy how to handle Rcda data
|
[in] | gas_detection_strategy | : Gas detection strategy handle
|
void airquality8_cfg_setup | ( | airquality8_cfg_t * | cfg | ) |
Air Quality 8 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See airquality8_cfg_t object definition for detailed explanation. |
err_t airquality8_default_cfg | ( | airquality8_t * | ctx | ) |
Air Quality 8 default configuration function.
This function executes a default configuration of Air Quality 8 click board.
[in] | ctx | : Click context object. See airquality8_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t airquality8_generic_read | ( | airquality8_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | rx_buf, | ||
uint8_t | rx_len ) |
Air Quality 8 I2C reading function.
This function reads a desired number of data bytes starting from the selected register by using I2C serial interface.
[in] | ctx | : Click context object. See airquality8_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[out] | rx_buf | : Output read data. |
[in] | rx_len | : Number of bytes to be read. |
0
- Success, -1
- Error.err_t airquality8_generic_write | ( | airquality8_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | tx_buf, | ||
uint8_t | tx_len ) |
Air Quality 8 I2C writing function.
This function writes a desired number of data bytes starting from the selected register by using I2C serial interface.
[in] | ctx | : Click context object. See airquality8_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[in] | tx_buf | : Data to be written. |
[in] | tx_len | : Number of bytes to be written. |
0
- Success, -1
- Error.err_t airquality8_get_sensor_info | ( | airquality8_t * | ctx, |
uint8_t * | cfg_data, | ||
uint8_t * | prod_data, | ||
uint16_t * | pid ) |
Air Quality 8 get sensor info function.
This function read product ID and configuration parameters of the ZMOD4510 Gas Sensor Module for OAQ targeting NO2 & O3 on the Air Quality 8 Click board™.
[in] | ctx | : Click context object. See airquality8_t object definition for detailed explanation. |
[out] | cfg_data | : Output configuration data. |
[out] | prod_data | : Output product data. |
[out] | pid | : Output product ID data. |
0
- Success, -1
- Error, 1
- Error initialization out of range, 2
- Error Gas timeout, 3
- Error I2C, 4
- Error sensor unsupported, 5
- Error config missing, 6
- Error sensor, 7
- Error access conflict, 8
- Error por event.err_t airquality8_get_status | ( | airquality8_t * | ctx, |
uint8_t * | status ) |
Air Quality 8 get status function.
This function read status data of the ZMOD4510 Gas Sensor Module for OAQ targeting NO2 & O3 on the Air Quality 8 Click board™.
[in] | ctx | : Click context object. See airquality8_t object definition for detailed explanation. |
[out] | status | : Output status data. |
0
- Success, -1
- Error.void airquality8_hw_reset | ( | airquality8_t * | ctx | ) |
Air Quality 8 reset function.
This function executes a hardware reset of the ZMOD4510 Gas Sensor Module for OAQ targeting NO2 & O3 on the Air Quality 8 Click board™.
[in] | ctx | : Click context object. See airquality8_t object definition for detailed explanation. |
err_t airquality8_init | ( | airquality8_t * | ctx, |
airquality8_cfg_t * | cfg ) |
Air Quality 8 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See airquality8_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See airquality8_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t airquality8_init_measurement | ( | airquality8_t * | ctx | ) |
Air Quality 8 init measurement function.
This function sensor measurement initialization of the ZMOD4510 Gas Sensor Module for OAQ targeting NO2 & O3 on the Air Quality 8 Click board™.
[in] | ctx | : Click context object. See airquality8_t object definition for detailed explanation. |
0
- Success, -1
- Error, 1
- Error initialization out of range, 2
- Error Gas timeout, 3
- Error I2C, 4
- Error sensor unsupported, 5
- Error config missing, 6
- Error sensor, 7
- Error access conflict, 8
- Error por event.err_t airquality8_init_sensor | ( | airquality8_t * | ctx, |
uint16_t * | mox_lr, | ||
uint16_t * | mox_er ) |
Air Quality 8 init sensor function.
This function sensor initialization after power on of the ZMOD4510 Gas Sensor Module for OAQ targeting NO2 & O3 on the Air Quality 8 Click board™.
[in] | ctx | : Click context object. See airquality8_t object definition for detailed explanation. |
[out] | mox_lr | : Output sensor specific parameter data. |
[out] | mox_er | : Output sensor specific parameter data. |
0
- Success, -1
- Error, 1
- Error initialization out of range, 2
- Error Gas timeout, 3
- Error I2C, 4
- Error sensor unsupported, 5
- Error config missing, 6
- Error sensor, 7
- Error access conflict, 8
- Error por event.err_t airquality8_read_rmox | ( | airquality8_t * | ctx, |
float * | rmox, | ||
uint16_t | mox_lr, | ||
uint16_t | mox_er ) |
Air Quality 8 calculate rmox resistance function.
This function calculate rmox resistance data of the ZMOD4510 Gas Sensor Module for OAQ targeting NO2 & O3 on the Air Quality 8 Click board™.
[in] | ctx | : Click context object. See airquality8_t object definition for detailed explanation. |
[out] | rmox | : Output srmox data. |
[in] | mox_lr | : Output sensor specific parameter data. |
[in] | mox_er | : Output sensor specific parameter data. |
0
- Success, -1
- Error, 1
- Error initialization out of range, 2
- Error Gas timeout, 3
- Error I2C, 4
- Error sensor unsupported, 5
- Error config missing, 6
- Error sensor, 7
- Error access conflict, 8
- Error por event.err_t airquality8_start_measurement | ( | airquality8_t * | ctx | ) |
Air Quality 8 start measurement function.
This function start measurement
of the ZMOD4510 Gas Sensor Module for OAQ targeting NO2 & O3 on the Air Quality 8 Click board™.
[in] | ctx | : Click context object. See airquality8_t object definition for detailed explanation. |
0
- Success, -1
- Error.uint8_t raq_check_interrupt | ( | airquality8_t * | ctx | ) |
Air Quality 8 check interrupt function.
This function get states of the Interrupt ( INT pin ) of the ZMOD4510 Gas Sensor Module for OAQ targeting NO2 & O3 on the Air Quality 8 Click board™.
[in] | ctx | : Click context object. See airquality8_t object definition for detailed explanation. |
0
- Low INT pin state, 1
- High INT pin state.