Cascoda SDK
Cascoda SDK for building software to run with CA-821x transceivers
airquality4_click.h File Reference

mikrosdk interface More...

#include <stdint.h>
Include dependency graph for airquality4_click.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define AIRQUALITY4_MEASURE_RAW_SIGNALS   0
 
#define SGP30_I2C_ADDR   0x58
 
#define SGP30_MAXDLEN   6
 
#define SGP30_ADDLEN   3
 
#define SGP30_T_INIT   17000 /* 17 seconds initialisation time after issuing init_air_quality command */
 
#define SGP30_T_CAL   43200000 /* 12 hours initial baseline calibration duration */
 
#define SGP30_T_TEST   250 /* 250 ms for measure_test self test */
 
#define SGP30_T_MEAS_RAW   25 /* 25 ms measurement time (between i2c write and read) for raw signals */
 
#define SGP30_T_MEAS_QUAL   12 /* 12 ms measurement time (between i2c write and read) for air quality signals */
 
#define SGP30_T_MEAS_POWERUP   10 /* 10 ms power-up time */
 
#define SGP30_T_SLEEP   0xFFFFFFFF /* dummy time to indicate device is in sleep mode */
 
#define SGP30_CMD_INIT_AIR_QUALITY   0x2003
 
#define SGP30_CMD_MEASURE_AIR_QUALITY   0x2008
 
#define SGP30_CMD_GET_BASELINE   0x2015
 
#define SGP30_CMD_SET_BASELINE   0x201E
 
#define SGP30_CMD_SET_HUMIDITY   0x2061
 
#define SGP30_CMD_MEASURE_TEST   0x2032
 
#define SGP30_CMD_GET_FEATURE_SET_VERSION   0x202F
 
#define SGP30_CMD_MEASURE_RAW_SIGNALS   0x2050
 
#define SGP30_CMD_GET_SERIAL_ID   0x3682
 

Enumerations

enum  airquality4_status {
  AIRQUALITY4_ST_OK = 0 , AIRQUALITY4_ST_NCAL = 1 , AIRQUALITY4_ST_INIT = 2 , AIRQUALITY4_ST_SLEEP = 3 ,
  AIRQUALITY4_ST_FAIL = 4
}
 

Functions

uint8_t MIKROSDK_AIRQUALITY4_dev_init (void)
 
uint8_t MIKROSDK_AIRQUALITY4_get_baseline (void)
 
uint8_t MIKROSDK_AIRQUALITY4_set_baseline (void)
 
uint8_t MIKROSDK_AIRQUALITY4_soft_reset (void)
 
uint8_t MIKROSDK_AIRQUALITY4_get_version (uint16_t *version)
 
uint8_t MIKROSDK_AIRQUALITY4_measure_test (void)
 
uint8_t MIKROSDK_AIRQUALITY4_measure_raw_signals (uint16_t *value)
 
uint8_t MIKROSDK_AIRQUALITY4_measure_air_quality (uint16_t *value)
 
uint8_t MIKROSDK_AIRQUALITY4_Initialise (void)
 
uint8_t MIKROSDK_AIRQUALITY4_Reinitialise (void)
 
uint8_t MIKROSDK_AIRQUALITY4_Acquire (uint16_t *co2_h2, uint16_t *tvoc_eth)
 
uint8_t MIKROSDK_AIRQUALITY4_Powerdown (void)
 
uint8_t MIKROSDK_AIRQUALITY4_Powerup (void)
 

Detailed Description

mikrosdk interface

Macro Definition Documentation

◆ AIRQUALITY4_MEASURE_RAW_SIGNALS

#define AIRQUALITY4_MEASURE_RAW_SIGNALS   0

◆ SGP30_ADDLEN

#define SGP30_ADDLEN   3

◆ SGP30_CMD_GET_BASELINE

#define SGP30_CMD_GET_BASELINE   0x2015

◆ SGP30_CMD_GET_FEATURE_SET_VERSION

#define SGP30_CMD_GET_FEATURE_SET_VERSION   0x202F

◆ SGP30_CMD_GET_SERIAL_ID

#define SGP30_CMD_GET_SERIAL_ID   0x3682

◆ SGP30_CMD_INIT_AIR_QUALITY

#define SGP30_CMD_INIT_AIR_QUALITY   0x2003

◆ SGP30_CMD_MEASURE_AIR_QUALITY

#define SGP30_CMD_MEASURE_AIR_QUALITY   0x2008

◆ SGP30_CMD_MEASURE_RAW_SIGNALS

#define SGP30_CMD_MEASURE_RAW_SIGNALS   0x2050

◆ SGP30_CMD_MEASURE_TEST

#define SGP30_CMD_MEASURE_TEST   0x2032

◆ SGP30_CMD_SET_BASELINE

#define SGP30_CMD_SET_BASELINE   0x201E

◆ SGP30_CMD_SET_HUMIDITY

#define SGP30_CMD_SET_HUMIDITY   0x2061

◆ SGP30_I2C_ADDR

#define SGP30_I2C_ADDR   0x58

◆ SGP30_MAXDLEN

#define SGP30_MAXDLEN   6

◆ SGP30_T_CAL

#define SGP30_T_CAL   43200000 /* 12 hours initial baseline calibration duration */

◆ SGP30_T_INIT

#define SGP30_T_INIT   17000 /* 17 seconds initialisation time after issuing init_air_quality command */

◆ SGP30_T_MEAS_POWERUP

#define SGP30_T_MEAS_POWERUP   10 /* 10 ms power-up time */

◆ SGP30_T_MEAS_QUAL

#define SGP30_T_MEAS_QUAL   12 /* 12 ms measurement time (between i2c write and read) for air quality signals */

◆ SGP30_T_MEAS_RAW

#define SGP30_T_MEAS_RAW   25 /* 25 ms measurement time (between i2c write and read) for raw signals */

◆ SGP30_T_SLEEP

#define SGP30_T_SLEEP   0xFFFFFFFF /* dummy time to indicate device is in sleep mode */

◆ SGP30_T_TEST

#define SGP30_T_TEST   250 /* 250 ms for measure_test self test */

Enumeration Type Documentation

◆ airquality4_status

Enumerator
AIRQUALITY4_ST_OK 
AIRQUALITY4_ST_NCAL 
AIRQUALITY4_ST_INIT 
AIRQUALITY4_ST_SLEEP 
AIRQUALITY4_ST_FAIL 

Function Documentation

◆ MIKROSDK_AIRQUALITY4_Acquire()

uint8_t MIKROSDK_AIRQUALITY4_Acquire ( uint16_t *  co2_h2,
uint16_t *  tvoc_eth 
)

◆ MIKROSDK_AIRQUALITY4_dev_init()

uint8_t MIKROSDK_AIRQUALITY4_dev_init ( void  )

◆ MIKROSDK_AIRQUALITY4_get_baseline()

uint8_t MIKROSDK_AIRQUALITY4_get_baseline ( void  )

◆ MIKROSDK_AIRQUALITY4_get_version()

uint8_t MIKROSDK_AIRQUALITY4_get_version ( uint16_t *  version)

◆ MIKROSDK_AIRQUALITY4_Initialise()

uint8_t MIKROSDK_AIRQUALITY4_Initialise ( void  )

◆ MIKROSDK_AIRQUALITY4_measure_air_quality()

uint8_t MIKROSDK_AIRQUALITY4_measure_air_quality ( uint16_t *  value)

◆ MIKROSDK_AIRQUALITY4_measure_raw_signals()

uint8_t MIKROSDK_AIRQUALITY4_measure_raw_signals ( uint16_t *  value)

◆ MIKROSDK_AIRQUALITY4_measure_test()

uint8_t MIKROSDK_AIRQUALITY4_measure_test ( void  )

◆ MIKROSDK_AIRQUALITY4_Powerdown()

uint8_t MIKROSDK_AIRQUALITY4_Powerdown ( void  )

◆ MIKROSDK_AIRQUALITY4_Powerup()

uint8_t MIKROSDK_AIRQUALITY4_Powerup ( void  )

◆ MIKROSDK_AIRQUALITY4_Reinitialise()

uint8_t MIKROSDK_AIRQUALITY4_Reinitialise ( void  )

◆ MIKROSDK_AIRQUALITY4_set_baseline()

uint8_t MIKROSDK_AIRQUALITY4_set_baseline ( void  )

◆ MIKROSDK_AIRQUALITY4_soft_reset()

uint8_t MIKROSDK_AIRQUALITY4_soft_reset ( void  )