temphum11 2.0.0.0
temphum11.h File Reference

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

Macros

#define TEMPHUM11_MAP_MIKROBUS(cfg, mikrobus)
 
#define TEMPHUM11_RETVAL   uint8_t
 
#define TEMPHUM11_OK   0x00
 
#define TEMPHUM11_INIT_ERROR   0xFF
 
#define TEMPHUM11_REG_TEMPERATURE   0x00
 
#define TEMPHUM11_REG_HUMIDITY   0x01
 
#define TEMPHUM11_REG_CONFIGURATION   0x02
 
#define TEMPHUM11_REG_SERIAL_ID_0   0xFB
 
#define TEMPHUM11_REG_SERIAL_ID_1   0xFC
 
#define TEMPHUM11_REG_SERIAL_ID_2   0xFD
 
#define TEMPHUM11_REG_MANUFACTURER_ID   0xFE
 
#define TEMPHUM11_REG_DEVICE_ID   0xFF
 
#define TEMPHUM11_NORMAL_OPERATION   0x0000
 
#define TEMPHUM11_SOFTWARE_RESET   0x8000
 
#define TEMPHUM11_HEATER_DISABLED   0x0000
 
#define TEMPHUM11_HEATER_ENABLED   0x2000
 
#define TEMPHUM11_TEMP_HUM_ACQUIRED   0x0000
 
#define TEMPHUM11_TEMP_FIRST   0x1000
 
#define TEMPHUM11_BAT_VOLT_BIGGER_THAN_2p8   0x0000
 
#define TEMPHUM11_BAT_VOLT_SMALLER_THAN_2p8   0x0800
 
#define TEMPHUM11_TEMP_RESOLUTION_14bit   0x0000
 
#define TEMPHUM11_TEMP_RESOLUTION_11bit   0x0400
 
#define TEMPHUM11_HUM_RESOLUTION_14bit   0x0000
 
#define TEMPHUM11_HUM_RESOLUTION_11bit   0x0100
 
#define TEMPHUM11_HUM_RESOLUTION_8bit   0x0200
 
#define TEMPHUM11_DEVICE_SLAVE_ADDR   0x40
 
#define TEMPHUM11_DEVICE_ID   0x1050
 
#define TEMPHUM11_MANUFACTURER_ID   0x5449
 
#define TEMPHUM11_TEMP_IN_CELSIUS   0x00
 
#define TEMPHUM11_TEMP_IN_KELVIN   0x01
 
#define TEMPHUM11_TEMP_IN_FAHRENHEIT   0x02
 

Functions

void temphum11_cfg_setup (temphum11_cfg_t *cfg)
 Config Object Initialization function.
 
TEMPHUM11_RETVAL temphum11_init (temphum11_t *ctx, temphum11_cfg_t *cfg)
 Initialization function.
 
void temphum11_default_cfg (temphum11_t *ctx)
 Click Default Configuration function.
 
void temphum11_write_config (temphum11_t *ctx, uint16_t config)
 Function for writing configuration device for measurement.
 
uint16_t temphum11_read_data (temphum11_t *ctx, uint8_t reg)
 Functions for reading data from registers.
 
float temphum11_get_temperature (temphum11_t *ctx, uint8_t temp_in)
 Functions for reading Temperature data.
 
float temphum11_get_humidity (temphum11_t *ctx)
 Functions for reading Relative Huminidy data.
 

Detailed Description

This file contains API for Temp Hum 11 Click driver.