airquality7 2.0.0.0
airquality7.h File Reference

This file contains API for Air Quality 7 Click driver. More...

#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_i2c_master.h"

Go to the source code of this file.

Data Structures

struct  airquality7_t
 Click ctx object definition. More...
 
struct  airquality7_cfg_t
 Click configuration structure definition. More...
 

Macros

#define AIRQUALITY7_MAP_MIKROBUS(cfg, mikrobus)
 
#define AIRQUALITY7_RETVAL   uint8_t
 
#define airquality7_err_t   uint8_t
 
#define AIRQUALITY7_OK   0x00
 
#define AIRQUALITY7_INIT_ERROR   0xFF
 
#define AIRQUALITY7_CMD_SET_PPMCO2   0x08
 
#define AIRQUALITY7_CMD_GET_STATUS   0x0C
 
#define AIRQUALITY7_CMD_GET_REVISION   0x0D
 
#define AIRQUALITY7_CMD_GET_R0   0x10
 
#define AIRQUALITY7_DEV_ADDR   0x70
 
#define AIRQUALITY7_ERR_OK   0x00
 
#define AIRQUALITY7_ERR_CRC   0x01
 
#define AIRQUALITY7_NULL   0x00
 
#define AIRQUALITY7_DUMMY   0x00
 

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

This file contains API for Air Quality 7 Click driver.