temphum22 2.1.0.0
temphum22.h File Reference

This file contains API for TempHum 22 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  temphum22_t
 TempHum 22 Click context object. More...
 
struct  temphum22_cfg_t
 TempHum 22 Click configuration object. More...
 

Macros

#define TEMPHUM22_CMD_MEAS_TH_HIGH_PREC   0xFD
 TempHum 22 command list.
 
#define TEMPHUM22_CMD_MEAS_TH_MED_PREC   0xF6
 
#define TEMPHUM22_CMD_MEAS_TH_LOW_PREC   0xE0
 
#define TEMPHUM22_CMD_READ_SERIAL_NUM   0x89
 
#define TEMPHUM22_CMD_SOFT_RESET   0x94
 
#define TEMPHUM22_CMD_ACT_HEATER_200mW_1S   0x39
 
#define TEMPHUM22_CMD_ACT_HEATER_200mW_0p1S   0x32
 
#define TEMPHUM22_CMD_ACT_HEATER_110mW_1S   0x2F
 
#define TEMPHUM22_CMD_ACT_HEATER_110mW_0p1S   0x24
 
#define TEMPHUM22_CMD_ACT_HEATER_20mW_1S   0x1E
 
#define TEMPHUM22_CMD_ACT_HEATER_20mW_0p1S   0x15
 
#define TEMPHUM22_MAX_RH   100.0
 TempHum 22 temperature and humidity calculation values.
 
#define TEMPHUM22_MIN_RH   0.0
 
#define TEMPHUM22_DATA_RESOLUTION   65535.0
 
#define TEMPHUM22_ABS_MIN_TEMP   ( -45.0 )
 
#define TEMPHUM22_ABS_MAX_TEMP   ( 130.0 )
 
#define TEMPHUM22_ABS_MIN_HUM   ( -6.0 )
 
#define TEMPHUM22_ABS_MAX_HUM   ( 119.0 )
 
#define TEMPHUM22_DEVICE_ADDRESS   0x44
 TempHum 22 device address setting.
 
#define TEMPHUM22_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.
 

Enumerations

enum  temphum22_return_value_t { TEMPHUM22_OK = 0 , TEMPHUM22_ERROR = -1 }
 TempHum 22 Click return value data. More...
 

Functions

void temphum22_cfg_setup (temphum22_cfg_t *cfg)
 TempHum 22 configuration object setup function.
 
err_t temphum22_init (temphum22_t *ctx, temphum22_cfg_t *cfg)
 TempHum 22 initialization function.
 
err_t temphum22_send_cmd (temphum22_t *ctx, uint8_t cmd)
 TempHum 22 send cmd function.
 
err_t temphum22_read_response (temphum22_t *ctx, uint8_t *data_out)
 TempHum 22 read response function.
 
err_t temphum22_soft_reset (temphum22_t *ctx)
 TempHum 22 soft reset function.
 
err_t temphum22_read_serial_num (temphum22_t *ctx, uint32_t *serial_num)
 TempHum 22 read serial num function.
 
err_t temphum22_read_measurement_high_precision (temphum22_t *ctx, float *temp, float *hum)
 TempHum 22 read measurement high precision function.
 

Detailed Description

This file contains API for TempHum 22 Click Driver.

Enumeration Type Documentation

◆ temphum22_return_value_t

TempHum 22 Click return value data.

Predefined enum values for driver return values.

Enumerator
TEMPHUM22_OK 
TEMPHUM22_ERROR