temphum5 2.0.0.0
temphum5.h File Reference

This file contains API for Temp&Hum 5 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  temphum5_t
 Click ctx object definition. More...
 
struct  temphum5_cfg_t
 Click configuration structure definition. More...
 

Macros

#define TEMPHUM5_MAP_MIKROBUS(cfg, mikrobus)
 
#define TEMPHUM5_RETVAL   uint8_t
 
#define TEMPHUM5_OK   0x00
 
#define TEMPHUM5_INIT_ERROR   0xFF
 
#define TEMPHUM5_DEVICE_SLAVE_ADDRESS   0x27
 
#define TEMPHUM5_TEMP_DATA_IN_CELSIUS   0x01
 
#define TEMPHUM5_TEMP_DATA_IN_KELVIN   0x02
 
#define TEMPHUM5_TEMP_DATA_IN_FAHRENHEIT   0x03
 
#define TEMPHUM5_STATUS_NORMAL_OPERATION   0x00
 
#define TEMPHUM5_STATUS_STALE_DATA   0x01
 
#define TEMPHUM5_STATUS_COMMAND_MODE   0x02
 
#define TEMPHUM5_ALARM_OUTPUT_HIGH   0x01
 
#define TEMPHUM5_ALARM_OUTPUT_LOW   0x02
 

Functions

void temphum5_cfg_setup (temphum5_cfg_t *cfg)
 Config Object Initialization function.
 
TEMPHUM5_RETVAL temphum5_init (temphum5_t *ctx, temphum5_cfg_t *cfg)
 Initialization function.
 
void temphum5_generic_write (temphum5_t *ctx, uint8_t cmd)
 Generic write function.
 
void temphum5_generic_read (temphum5_t *ctx, uint8_t *data_out)
 Generic read function.
 
uint8_t temphum5_start_measurement (temphum5_t *ctx)
 Functions for start measurement.
 
float temphum5_get_temperature (temphum5_t *ctx, uint8_t temp_in)
 Functions for read Temperature data.
 
float temphum5_get_humidity (temphum5_t *ctx)
 Functions for read Relative Huminidy data.
 
uint8_t temphum5_get_alarm (temphum5_t *ctx, uint8_t alarm)
 Functions for get output Alarm.
 

Detailed Description

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