ozone3 2.0.0.0
ozone3.h File Reference

This file contains API for Ozone 3 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  ozone3_t
 Ozone 3 Click context object. More...
 
struct  ozone3_cfg_t
 Ozone 3 Click configuration object. More...
 

Macros

#define OZONE3_REG_STATUS   0x00
 Ozone 3 description register.
 
#define OZONE3_REG_LOCK   0x01
 
#define OZONE3_REG_TIACN   0x10
 
#define OZONE3_REG_REFCN   0x11
 
#define OZONE3_REG_MODECN   0x12
 
#define OZONE3_WRITE_MODE   0x00
 Ozone 3 description setting.
 
#define OZONE3_READ_ONLY_MODE   0x01
 
#define OZONE3_RES_TIA_EXT   0x00
 Ozone 3 resistance setting.
 
#define OZONE3_RES_TIA_2750_Ohm   0x04
 
#define OZONE3_RES_TIA_3500_Ohm   0x08
 
#define OZONE3_RES_TIA_7K_Ohm   0x0C
 
#define OZONE3_RES_TIA_14K_Ohm   0x10
 
#define OZONE3_RES_TIA_35K_Ohm   0x14
 
#define OZONE3_RES_TIA_120K_Ohm   0x18
 
#define OZONE3_RES_TIA_350K_Ohm   0x1C
 
#define OZONE3_RES_LOAD_10_Ohm   0x00
 
#define OZONE3_RES_LOAD_33_Ohm   0x01
 
#define OZONE3_RES_LOAD_50_Ohm   0x02
 
#define OZONE3_RES_LOAD_100_Ohm   0x03
 
#define OZONE3_VREF_INT   0x00
 Ozone 3 setting.
 
#define OZONE3_VREF_EXT   0x80
 
#define OZONE3_PERCENTS_INT_ZERO_20   0x00
 
#define OZONE3_PERCENTS_INT_ZERO_50   0x20
 
#define OZONE3_PERCENTS_INT_ZERO_67   0x40
 
#define OZONE3_INT_ZERO_BYPASSED   0x60
 
#define OZONE3_BIAS_POL_NEGATIVE   0x00
 
#define OZONE3_BIAS_POL_POSITIVE   0x10
 
#define OZONE3_PERCENTS_BIAS_0   0x00
 
#define OZONE3_PERCENTS_BIAS_1   0x01
 
#define OZONE3_PERCENTS_BIAS_2   0x02
 
#define OZONE3_PERCENTS_BIAS_4   0x03
 
#define OZONE3_PERCENTS_BIAS_6   0x04
 
#define OZONE3_PERCENTS_BIAS_8   0x05
 
#define OZONE3_PERCENTS_BIAS_10   0x06
 
#define OZONE3_PERCENTS_BIAS_12   0x07
 
#define OZONE3_PERCENTS_BIAS_14   0x08
 
#define OZONE3_PERCENTS_BIAS_16   0x09
 
#define OZONE3_PERCENTS_BIAS_18   0x0A
 
#define OZONE3_PERCENTS_BIAS_20   0x0B
 
#define OZONE3_PERCENTS_BIAS_22   0x0C
 
#define OZONE3_PERCENTS_BIAS_24   0x0D
 
#define OZONE3_FET_DIS   0x00
 
#define OZONE3_FET_EN   0x80
 
#define OZONE3_DEEP_SLEEP_MODE   0x00
 
#define OZONE3_LEAD_MODE_2   0x01
 
#define OZONE3_STANDBY_MODE   0x02
 
#define OZONE3_LEAD_MODE_3   0x03
 
#define OZONE3_TEMP_MODE_TIA_OFF   0x06
 
#define OZONE3_TEMP_MODE_TIA_ON   0x07
 
#define OZONE3_DEVICE_ENABLE   0x00
 
#define OZONE3_DEVICE_DISABLE   0x01
 
#define OZONE3_SET_DEV_ADDR   0x48
 Ozone 3 device address setting.
 
#define OZONE3_ADC_DEVICE_ADDR   0x4D
 
#define OZONE3_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.
 

Enumerations

enum  ozone3_return_value_t { OZONE3_OK = 0 , OZONE3_ERROR = -1 }
 Ozone 3 Click return value data. More...
 

Functions

void ozone3_cfg_setup (ozone3_cfg_t *cfg)
 Ozone 3 configuration object setup function.
 
err_t ozone3_init (ozone3_t *ctx, ozone3_cfg_t *cfg)
 Ozone 3 initialization function.
 
err_t ozone3_default_cfg (ozone3_t *ctx)
 Ozone 3 default configuration function.
 
err_t ozone3_generic_write (ozone3_t *ctx, uint8_t reg, uint8_t *tx_buf, uint8_t tx_len)
 Ozone 3 I2C writing function.
 
err_t ozone3_generic_read (ozone3_t *ctx, uint8_t reg, uint8_t *rx_buf, uint8_t rx_len)
 Ozone 3 I2C reading function.
 
err_t ozone3_enable (ozone3_t *ctx, uint8_t state)
 Ozone 3 enable function.
 
err_t ozone3_write_byte (ozone3_t *ctx, uint8_t reg, uint8_t dev_data)
 Ozone 3 write byte function.
 
uint8_t ozone3_read_byte (ozone3_t *ctx, uint8_t reg)
 Ozone 3 read byte function.
 
uint16_t ozone3_read_adc (ozone3_t *ctx)
 Ozone 3 read ADC function.
 
float ozone3_get_o3_ppm (ozone3_t *ctx)
 Ozone 3 get O3 ppm function.
 
void ozone3_wait_ready (ozone3_t *ctx)
 Ozone 3 wait ready function.
 

Detailed Description

This file contains API for Ozone 3 Click Driver.

Enumeration Type Documentation

◆ ozone3_return_value_t

Ozone 3 Click return value data.

Predefined enum values for driver return values.

Enumerator
OZONE3_OK 
OZONE3_ERROR