airquality5 2.0.0.0
airquality5.h File Reference

This file contains API for Air quality 5 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  airquality5_t
 Click ctx object definition. More...
 
struct  airquality5_cfg_t
 Click configuration structure definition. More...
 

Macros

#define AIRQUALITY5_MAP_MIKROBUS(cfg, mikrobus)
 
#define AIRQUALITY5_RETVAL   uint8_t
 
#define AIRQUALITY5_OK   0x00
 
#define AIRQUALITY5_INIT_ERROR   0xFF
 
#define AIRQ5_DATA_CHANNEL_NO2   0x4000
 
#define AIRQ5_DATA_CHANNEL_NH3   0x5000
 
#define AIRQ5_DATA_CHANNEL_CO   0x6000
 
#define AIRQ5_REG_POINTER_CONVERT   0x00
 
#define AIRQ5_REG_POINTER_CONFIG   0x01
 
#define AIRQ5_REG_POINTER_LOW_THRESH   0x02
 
#define AIRQ5_REG_POINTER_HIGH_THRESH   0x03
 
#define AIRQ5_CONFIG_OS_SINGLE   0x8000
 
#define AIRQ5_CONFIG_OS_BUSY   0x0000
 
#define AIRQ5_CONFIG_OS_NOTBUSY   0x8000
 
#define AIRQ5_CONFIG_PGA_6_144V   0x0000
 
#define AIRQ5_CONFIG_PGA_4_096V   0x0200
 
#define AIRQ5_CONFIG_PGA_2_048V   0x0400
 
#define AIRQ5_CONFIG_PGA_1_024V   0x0600
 
#define AIRQ5_CONFIG_PGA_0_512V   0x0800
 
#define AIRQ5_CONFIG_PGA_0_256V   0x0A00
 
#define AIRQ5_CONFIG_CONTINUOUS_MODE   0x0000
 
#define AIRQ5_CONFIG_SINGLE_MODE   0x0100
 
#define AIRQ5_CONFIG_DATA_RATE_128SPS   0x0000
 
#define AIRQ5_CONFIG_DATA_RATE_250SPS   0x0020
 
#define AIRQ5_CONFIG_DATA_RATE_490SPS   0x0040
 
#define AIRQ5_CONFIG_DATA_RATE_920SPS   0x0060
 
#define AIRQ5_CONFIG_DATA_RATE_1600SPS   0x0080
 
#define AIRQ5_CONFIG_DATA_RATE_2400SPS   0x00A0
 
#define AIRQ5_CONFIG_DATA_RATE_3300SPS   0x00C0
 
#define AIRQ5_CONFIG_COMP_MODE_TRADITIONAL   0x0000
 
#define AIRQ5_CONFIG_COMP_MODE_WINDOW   0x0010
 
#define AIRQ5_CONFIG_COMP_POL_ACTIVE_LOW   0x0000
 
#define AIRQ5_CONFIG_COMP_POL_ACTIVE_HIGH   0x0008
 
#define AIRQ5_CONFIG_COMP_LAT_NOT_LATCH   0x0000
 
#define AIRQ5_CONFIG_COMP_LAT_LATCH   0x0004
 
#define AIRQ5_CONFIG_COMP_QUE_1CONV   0x0000
 
#define AIRQ5_CONFIG_COMP_QUE_2CONV   0x0001
 
#define AIRQ5_CONFIG_COMP_QUE_4CONV   0x0002
 
#define AIRQ5_CONFIG_COMP_QUE_0CONV   0x0003
 

Functions

void airquality5_cfg_setup (airquality5_cfg_t *cfg)
 Config Object Initialization function.
 
AIRQUALITY5_RETVAL airquality5_init (airquality5_t *ctx, airquality5_cfg_t *cfg)
 Initialization function.
 
void airquality5_default_cfg (airquality5_t *ctx)
 Click Default Configuration function.
 
void airquality5_generic_write (airquality5_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic write function.
 
void airquality5_generic_read (airquality5_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic read function.
 
void airq5_write_data (airquality5_t *ctx, uint8_t reg, uint16_t data_b)
 Functions for write data in register.
 
uint16_t airq5_read_data (airquality5_t *ctx, uint8_t reg)
 Functions for read data from register.
 
void airq5_set_configuration (airquality5_t *ctx, uint16_t config)
 Functions for configuration.
 
uint16_t airq5_read_sensor_data (airquality5_t *ctx, uint16_t channel_data)
 Functions for read sensor data.
 
uint8_t airq5_get_interrupt (airquality5_t *ctx)
 Functions for reads interrupt pin.
 

Detailed Description

This file contains API for Air quality 5 Click driver.