temphum8 2.0.0.0
temphum8.h File Reference

This file contains API for Temp&Hum 8 Click driver. More...

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

Go to the source code of this file.

Data Structures

struct  temphum8_t
 Click ctx object definition. More...
 
struct  temphum8_cfg_t
 Click configuration structure definition. More...
 

Macros

#define TEMPHUM8_MAP_MIKROBUS(cfg, mikrobus)
 
#define TEMPHUM8_RETVAL   uint8_t
 
#define TEMPHUM8_OK   0x00
 
#define TEMPHUM8_INIT_ERROR   0xFF
 
#define TEMPHUM8_TEMP_MEASUREMENT_HOLD_MODE   0xE3
 
#define TEMPHUM8_HUM_MEASUREMENT_HOLD_MODE   0xE5
 
#define TEMPHUM8_TEMP_MEASUREMENT_NO_HOLD_MODE   0xF3
 
#define TEMPHUM8_HUM_MEASUREMENT_NO_HOLD_MODE   0xF5
 
#define TEMPHUM8_USER_REGISTER_WRITE   0xE6
 
#define TEMPHUM8_USER_REGISTER_READ   0xE7
 
#define TEMPHUM8_SOFT_RESET   0xFE
 
#define TEMPHUM8_CFG_RESOLUTION_H12_T14   0x00
 
#define TEMPHUM8_CFG_RESOLUTION_H8_T12   0x01
 
#define TEMPHUM8_CFG_RESOLUTION_H10_T13   0x80
 
#define TEMPHUM8_CFG_RESOLUTION_H11_T11   0x81
 
#define TEMPHUM8_CFG_END_OF_BATTERY_LESS_THAN_2_25V   0x40
 
#define TEMPHUM8_CFG_END_OF_BATTERY_BIGGER_THAN_2_25V   0x00
 
#define TEMPHUM8_CFG_ENABLE_ON_CHIP_HEATER   0x00
 
#define TEMPHUM8_CFG_DISABLE_OTP_RELOAD   0x02
 
#define TEMPHUM8_DEVICE_SLAVE_ADDRESS   0x40
 
#define TEMPHUM8_TEMPERATURE_IN_CELSIUS   0x00
 
#define TEMPHUM8_TEMPERATURE_IN_KELVIN   0x01
 
#define TEMPHUM8_TEMPERATURE_IN_FARENHAJT   0x02
 

Functions

void temphum8_cfg_setup (temphum8_cfg_t *cfg)
 Config Object Initialization function.
 
TEMPHUM8_RETVAL temphum8_init (temphum8_t *ctx, temphum8_cfg_t *cfg)
 Initialization function.
 
void temphum8_default_cfg (temphum8_t *ctx)
 Click Default Configuration function.
 
void temphum8_generic_write (temphum8_t *ctx, uint8_t reg, uint8_t *data_buffer, uint8_t len)
 Generic write function.
 
void temphum8_generic_read (temphum8_t *ctx, uint8_t reg, uint8_t *data_buffer, uint8_t len)
 Generic read function.
 
void temphum8_software_reset (temphum8_t *ctx)
 Functions for device software reset.
 
void temphum8_set_cfg_register (temphum8_t *ctx, uint8_t cfg)
 Configuration device for measurement.
 
float temphum8_get_temperature_data (temphum8_t *ctx, uint8_t temp_format)
 Temperature data.
 
float temphum8_get_humidity_data (temphum8_t *ctx)
 Relative Huminidy data.
 

Detailed Description

This file contains API for Temp&Hum 8 Click driver.