Cascoda SDK
Cascoda SDK for building software to run with CA-821x transceivers
Loading...
Searching...
No Matches
environment2_click.h File Reference

mikrosdk interface More...

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

Go to the source code of this file.

Macros

#define ENVIRONMENT2_USE_POWERDOWN   0
#define SGP40_T_TEST   250 /* sgp40 250 ms for measure_test self test */
#define SGP40_T_MEAS_RAW   30 /* sgp40 30 ms measurement time (between i2c write and read) for raw signals */
#define SHT40_T_MEAS   10 /* sht40 10 ms measurement time (between i2c write and read) for temperature and humidity */
#define SGP40_T_INIT   60000 /* sgp40 60 seconds until reliably detecting voc events */
#define SGP40_T_SETTLING   3600000 /* sgp40 1 hour until specification is met */
#define SGP40_T_POWERUP   170 /* sgp40 power-up (wait between dummy read and read to warm up heating plate */
#define SGP40_T_SLEEP   0xFFFFFFFF /* dummy time to indicate device is in sleep mode */
#define SGP40_MAXDLEN   6
#define SGP40_ADDLEN   3
#define SHT40_MAXDLEN   6
#define SHT40_ADDLEN   2

Enumerations

enum  environment2_status {
  ENVIRONMENT2_ST_OK = 0 , ENVIRONMENT2_ST_SETTLING = 1 , ENVIRONMENT2_ST_INIT = 2 , ENVIRONMENT2_ST_SLEEP = 3 ,
  ENVIRONMENT2_ST_FAIL = 4
}

Functions

uint8_t MIKROSDK_ENVIRONMENT2_get_temp_hum (int16_t *humidity, int16_t *temperature)
uint8_t MIKROSDK_ENVIRONMENT2_get_air_quality (uint16_t *air_quality_raw)
uint8_t MIKROSDK_ENVIRONMENT2_get_voc_index (int32_t *voc_index)
uint8_t MIKROSDK_ENVIRONMENT2_get_voc_index_with_rh_t (int32_t *voc_index, uint16_t *air_quality_raw, int16_t *relative_humidity, int16_t *temperature)
uint8_t MIKROSDK_ENVIRONMENT2_sgp40_measure_test (void)
uint8_t MIKROSDK_ENVIRONMENT2_sgp40_heater_off (void)
uint8_t MIKROSDK_ENVIRONMENT2_soft_reset (void)
uint8_t MIKROSDK_ENVIRONMENT2_Initialise (void)
uint8_t MIKROSDK_ENVIRONMENT2_Reinitialise (void)
uint8_t MIKROSDK_ENVIRONMENT2_Acquire (int32_t *voc_index, uint16_t *air_quality, int16_t *humidity, int16_t *temperature)
uint8_t MIKROSDK_ENVIRONMENT2_Powerdown (void)
uint8_t MIKROSDK_ENVIRONMENT2_Powerup (void)

Detailed Description

mikrosdk interface

Macro Definition Documentation

◆ ENVIRONMENT2_USE_POWERDOWN

#define ENVIRONMENT2_USE_POWERDOWN   0

◆ SGP40_ADDLEN

#define SGP40_ADDLEN   3

◆ SGP40_MAXDLEN

#define SGP40_MAXDLEN   6

◆ SGP40_T_INIT

#define SGP40_T_INIT   60000 /* sgp40 60 seconds until reliably detecting voc events */

◆ SGP40_T_MEAS_RAW

#define SGP40_T_MEAS_RAW   30 /* sgp40 30 ms measurement time (between i2c write and read) for raw signals */

◆ SGP40_T_POWERUP

#define SGP40_T_POWERUP   170 /* sgp40 power-up (wait between dummy read and read to warm up heating plate */

◆ SGP40_T_SETTLING

#define SGP40_T_SETTLING   3600000 /* sgp40 1 hour until specification is met */

◆ SGP40_T_SLEEP

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

◆ SGP40_T_TEST

#define SGP40_T_TEST   250 /* sgp40 250 ms for measure_test self test */

◆ SHT40_ADDLEN

#define SHT40_ADDLEN   2

◆ SHT40_MAXDLEN

#define SHT40_MAXDLEN   6

◆ SHT40_T_MEAS

#define SHT40_T_MEAS   10 /* sht40 10 ms measurement time (between i2c write and read) for temperature and humidity */

Enumeration Type Documentation

◆ environment2_status

Enumerator
ENVIRONMENT2_ST_OK 
ENVIRONMENT2_ST_SETTLING 
ENVIRONMENT2_ST_INIT 
ENVIRONMENT2_ST_SLEEP 
ENVIRONMENT2_ST_FAIL 

Function Documentation

◆ MIKROSDK_ENVIRONMENT2_Acquire()

uint8_t MIKROSDK_ENVIRONMENT2_Acquire ( int32_t * voc_index,
uint16_t * air_quality,
int16_t * humidity,
int16_t * temperature )

◆ MIKROSDK_ENVIRONMENT2_get_air_quality()

uint8_t MIKROSDK_ENVIRONMENT2_get_air_quality ( uint16_t * air_quality_raw)

◆ MIKROSDK_ENVIRONMENT2_get_temp_hum()

uint8_t MIKROSDK_ENVIRONMENT2_get_temp_hum ( int16_t * humidity,
int16_t * temperature )

◆ MIKROSDK_ENVIRONMENT2_get_voc_index()

uint8_t MIKROSDK_ENVIRONMENT2_get_voc_index ( int32_t * voc_index)

◆ MIKROSDK_ENVIRONMENT2_get_voc_index_with_rh_t()

uint8_t MIKROSDK_ENVIRONMENT2_get_voc_index_with_rh_t ( int32_t * voc_index,
uint16_t * air_quality_raw,
int16_t * relative_humidity,
int16_t * temperature )

◆ MIKROSDK_ENVIRONMENT2_Initialise()

uint8_t MIKROSDK_ENVIRONMENT2_Initialise ( void )

◆ MIKROSDK_ENVIRONMENT2_Powerdown()

uint8_t MIKROSDK_ENVIRONMENT2_Powerdown ( void )

◆ MIKROSDK_ENVIRONMENT2_Powerup()

uint8_t MIKROSDK_ENVIRONMENT2_Powerup ( void )

◆ MIKROSDK_ENVIRONMENT2_Reinitialise()

uint8_t MIKROSDK_ENVIRONMENT2_Reinitialise ( void )

◆ MIKROSDK_ENVIRONMENT2_sgp40_heater_off()

uint8_t MIKROSDK_ENVIRONMENT2_sgp40_heater_off ( void )

◆ MIKROSDK_ENVIRONMENT2_sgp40_measure_test()

uint8_t MIKROSDK_ENVIRONMENT2_sgp40_measure_test ( void )

◆ MIKROSDK_ENVIRONMENT2_soft_reset()

uint8_t MIKROSDK_ENVIRONMENT2_soft_reset ( void )