temphum9 2.0.0.0
temphum9.h File Reference

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

Macros

#define TEMPHUM9_MAP_MIKROBUS(cfg, mikrobus)
 
#define TEMPHUM9_OK   0
 
#define TEMPHUM9_ERROR   -1
 
#define TEMPHUM9_DEVICE_ADDRESS   0x70
 
#define TEMPHUM9_NORMAL_MODE   0x00
 
#define TEMPHUM9_LOW_POWER_MODE   0x01
 
#define TEMPHUM9_SINGLE_DATA   0x03
 
#define TEMPHUM9_DUAL_DATA   0x06
 
#define TEMPHUM9_SLEEP   0xB098
 
#define TEMPHUM9_WAKEUP   0x3517
 
#define TEMPHUM9_SOFT_RESET   0x805D
 
#define TEMPHUM9_GENERAL_CALL_RESET   0x0006
 
#define TEMPHUM9_READ_ID   0xEFC8
 

Functions

void temphum9_cfg_setup (temphum9_cfg_t *cfg)
 Config Object Initialization function.
 
err_t temphum9_init (temphum9_t *ctx, temphum9_cfg_t *cfg)
 Initialization function.
 
void temphum9_read_register (temphum9_t *ctx, uint16_t address, uint8_t num_data, uint16_t *data_out)
 Readinig register content.
 
void temphum9_send_command (temphum9_t *ctx, uint16_t command)
 Issuing a command.
 
float temphum9_get_temperature (temphum9_t *ctx, uint8_t data_mode)
 Calculating temperature.
 
float temphum9_get_humidity (temphum9_t *ctx, uint8_t data_mode)
 Calculating relative humidity.
 
void temhum9_get_data (temphum9_t *ctx, uint8_t data_mode, float *temp, float *hum)
 Calculating temperature and relative humidity.
 

Detailed Description

This file contains API for Temp-Hum 9 Click driver.