temphum7 2.0.0.0
temphum7.h File Reference

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

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

Go to the source code of this file.

Data Structures

struct  temphum7_t
 Click ctx object definition. More...
 
struct  temphum7_cfg_t
 Click configuration structure definition. More...
 

Macros

#define TEMPHUM7_MAP_MIKROBUS(cfg, mikrobus)
 
#define TEMPHUM7_RETVAL   uint8_t
 
#define TEMPHUM7_OK   0x00
 
#define TEMPHUM7_INIT_ERROR   0xFF
 
#define TEMPHUM7_DEVICE_ADDRESS   0x40
 
#define TEMPHUM7_HOLD_MASTER_MODE   0x00
 
#define TEMPHUM7_NOHOLD_MASTER_MODE   0x01
 
#define TEMPHUM7_DATA_FROM_PREVIOUS_RH_MEASUREMENT   0x02
 
#define TEMPHUM7_RESET   0xFE
 
#define TEMPHUM7_WRITE_RHT_USER_REGISTER_1   0xE6
 
#define TEMPHUM7_READ_RHT_USER_REGISTER_1   0xE7
 
#define TEMPHUM7_WRITE_HEATER_CONTROL_REGISTER   0x51
 
#define TEMPHUM7_READ_HEATER_CONTROL_REGISTER   0x11
 
#define TEMPHUM7_RESOLUTION_12_BIT   0x00
 
#define TEMPHUM7_RESOLUTION_8_BIT   0x01
 
#define TEMPHUM7_RESOLUTION_10_BIT   0x80
 
#define TEMPHUM7_RESOLUTION_11_BIT   0x81
 
#define TEMPHUM7_HEATER_ENABLE   0x04
 
#define TEMPHUM7_HEATER_DISABLE   0x00
 
#define TEMPHUM7_HEATER_CURRENT_3p09   0x00
 
#define TEMPHUM7_HEATER_CURRENT_9p17   0x01
 
#define TEMPHUM7_HEATER_CURRENT_15p24   0x02
 
#define TEMPHUM7_HEATER_CURRENT_21p31   0x03
 
#define TEMPHUM7_HEATER_CURRENT_27p39   0x04
 
#define TEMPHUM7_HEATER_CURRENT_33p46   0x05
 
#define TEMPHUM7_HEATER_CURRENT_39p53   0x06
 
#define TEMPHUM7_HEATER_CURRENT_45p61   0x07
 
#define TEMPHUM7_HEATER_CURRENT_51p68   0x08
 
#define TEMPHUM7_HEATER_CURRENT_57p76   0x09
 
#define TEMPHUM7_HEATER_CURRENT_63p83   0x0A
 
#define TEMPHUM7_HEATER_CURRENT_69p90   0x0B
 
#define TEMPHUM7_HEATER_CURRENT_75p98   0x0C
 
#define TEMPHUM7_HEATER_CURRENT_82p05   0x0D
 
#define TEMPHUM7_HEATER_CURRENT_88p13   0x0E
 
#define TEMPHUM7_HEATER_CURRENT_94p20   0x0F
 

Functions

void temphum7_cfg_setup (temphum7_cfg_t *cfg)
 Config Object Initialization function.
 
TEMPHUM7_RETVAL temphum7_init (temphum7_t *ctx, temphum7_cfg_t *cfg)
 Initialization function.
 
void temphum7_default_cfg (temphum7_t *ctx)
 Click Default Configuration function.
 
void temphum7_generic_write (temphum7_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic write function.
 
void temphum7_generic_read (temphum7_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic read function.
 
float temphum7_get_relative_humidity (temphum7_t *ctx, uint8_t mode_data)
 Relative humidity.
 
float temphum7_get_temperature (temphum7_t *ctx, uint8_t mode_data)
 Temerature.
 
void temphum7_get_electronic_serial_number (temphum7_t *ctx, uint8_t *esn_buffer)
 Electronic serial number.
 
uint8_t temphum7_get_firmware_revision (temphum7_t *ctx)
 Firmware revision.
 
float temphum7_get_heater_current (temphum7_t *ctx)
 Heater current.
 
void temphum7_reset (temphum7_t *ctx)
 Reset.
 

Detailed Description

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

Macro Definition Documentation

◆ TEMPHUM7_DATA_FROM_PREVIOUS_RH_MEASUREMENT

#define TEMPHUM7_DATA_FROM_PREVIOUS_RH_MEASUREMENT   0x02

◆ TEMPHUM7_HOLD_MASTER_MODE

#define TEMPHUM7_HOLD_MASTER_MODE   0x00

◆ TEMPHUM7_NOHOLD_MASTER_MODE

#define TEMPHUM7_NOHOLD_MASTER_MODE   0x01