temphum6 2.0.0.0
temphum6.h File Reference

This file contains API for Temp Hum 6 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  temphum6_t
 Click ctx object definition. More...
 
struct  temphum6_cfg_t
 Click configuration structure definition. More...
 

Macros

#define TEMPHUM6_MAP_MIKROBUS(cfg, mikrobus)
 
#define TEMPHUM6_RETVAL   uint8_t
 
#define TEMPHUM6_OK   0x00
 
#define TEMPHUM6_INIT_ERROR   0xFF
 
#define TEMPHUM6_PART_ID   0x0210
 
#define TEMPHUM6_DEVICE_SLAVE_ADDRESS   0x43
 
#define TEMPHUM6_REG_PART_ID   0x00
 
#define TEMPHUM6_REG_UNIQUE_IDENTIFIER   0x04
 
#define TEMPHUM6_REG_SYSTEM_CONTROL   0x10
 
#define TEMPHUM6_REG_SYSTEM_STATUS   0x11
 
#define TEMPHUM6_REG_SENS_RUN   0x21
 
#define TEMPHUM6_REG_SENS_START   0x22
 
#define TEMPHUM6_REG_SENS_STOP   0x23
 
#define TEMPHUM6_REG_SENS_STATUS   0x24
 
#define TEMPHUM6_REG_TEMPERATURE   0x30
 
#define TEMPHUM6_REG_RELATIVE_HUMIDITY   0x33
 
#define TEMPHUM6_STATUS_I2C_ERROR   4
 
#define TEMPHUM6_STATUS_CRC_ERROR   3
 
#define TEMPHUM6_STATUS_INVALID   2
 
#define TEMPHUM6_STATUS_OK   1
 
#define TEMPHUM6_TEMP_IN_FAHRENHEIT   2
 
#define TEMPHUM6_TEMP_IN_KELVIN   1
 
#define TEMPHUM6_TEMP_IN_CELSIUS   0
 
#define TEMPHUM6_LOW_POWER_DISABLE   0x00
 
#define TEMPHUM6_LOW_POWER_ENABLE   0x01
 
#define TEMPHUM6_SYSTEM_IS_IN_STANDBY_OR_BOOTING_STATE   0
 
#define TEMPHUM6_SYSTEM_IS_IN_ACTIVE_STATE   1
 
#define TEMPHUM6_HUM_RUN_SINGLE_SHOT_MODE   0x00
 
#define TEMPHUM6_TEMP_RUN_SINGLE_SHOT_MODE   0x00
 
#define TEMPHUM6_HUM_RUN_CONTINUOUS_MODE   0x02
 
#define TEMPHUM6_TEMP_RUN_CONTINUOUS_MODE   0x01
 
#define TEMPHUM6_HUM_START_MEASUREMENT   0x02
 
#define TEMPHUM6_TEMP_START_MEASUREMENT   0x01
 
#define TEMPHUM6_DISABLE_MEASUREMENT   0x00
 
#define TEMPHUM6_HUM_STOP_CONTINUOUS_MEASUREMENT   0x02
 
#define TEMPHUM6_TEMP_STOP_CONTINUOUS_MEASUREMENT   0x01
 
#define TEMPHUM6_DISABLE_CONTINUOUS_MEASUREMENT   0x00
 

Functions

void temphum6_cfg_setup (temphum6_cfg_t *cfg)
 Config Object Initialization function.
 
TEMPHUM6_RETVAL temphum6_init (temphum6_t *ctx, temphum6_cfg_t *cfg)
 Initialization function.
 
void temphum6_generic_write (temphum6_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic write function.
 
void temphum6_generic_read (temphum6_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic read function.
 
void temphum6_reset (temphum6_t *ctx)
 Functions for reset device.
 
uint16_t temphum6_get_part_id (temphum6_t *ctx)
 Functions for get device PART ID.
 
void temphum6_run (temphum6_t *ctx)
 Functions for RUN measurement.
 
float temphum6_read_temperature (temphum6_t *ctx, uint8_t temp_in)
 Functions for read Temperature data.
 
float temphum6_read_relative_huminidy (temphum6_t *ctx)
 Functions for read Relative Huminidy data.
 

Detailed Description

This file contains API for Temp Hum 6 Click driver.