temphum15 2.0.0.0
temphum15.h File Reference

This file contains API for Temp&Hum 15 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  temphum15_t
 Temp&Hum 15 Click context object. More...
 
struct  temphum15_cfg_t
 Temp&Hum 15 Click configuration object. More...
 

Macros

#define TEMPHUM15_CMD_MEASURE_HIGH_PRECISION   0xFD
 Temp&Hum 15 description register.
 
#define TEMPHUM15_CMD_MEASURE_MEDIUM_PRECISION   0xF6
 
#define TEMPHUM15_CMD_MEASURE_LOW_PRECISION   0xE0
 
#define TEMPHUM15_CMD_READ_SERIAL   0x89
 
#define TEMPHUM15_CMD_SOFT_RESET   0x94
 
#define TEMPHUM15_CMD_HEATER_HIGHEST_POW_HIGH_DUR   0x39
 
#define TEMPHUM15_CMD_HEATER_HIGHEST_POW_LOW_DUR   0x32
 
#define TEMPHUM15_CMD_HEATER_MEDIUM_POW_HIGH_DUR   0x2F
 
#define TEMPHUM15_CMD_HEATER_MEDIUM_POW_LOW_DUR   0x24
 
#define TEMPHUM15_CMD_HEATER_LOWEST_POW_HIGH_DUR   0x1E
 
#define TEMPHUM15_CMD_HEATER_LOWEST_POW_LOW_DUR   0x15
 
#define TEMPHUM15_SET_DEV_ADDR   0x44
 Temp&Hum 15 device address setting.
 
#define TEMPHUM15_MODE_HIGH_PRECISION   0x00
 Temp&Hum 15 precision mode settings.
 
#define TEMPHUM15_MODE_MEDIUM_PRECISION   0x01
 
#define TEMPHUM15_MODE_LOW_PRECISION   0x02
 
#define TEMPHUM15_SUCCESS   0
 Temp&Hum 15 status return codes.
 
#define TEMPHUM15_ERROR   -1
 
#define TEMPHUM15_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.
 

Functions

void temphum15_cfg_setup (temphum15_cfg_t *cfg)
 Temp&Hum 15 configuration object setup function.
 
err_t temphum15_init (temphum15_t *ctx, temphum15_cfg_t *cfg)
 Temp&Hum 15 initialization function.
 
err_t temphum15_default_cfg (temphum15_t *ctx)
 Temp&Hum 15 default configuration function.
 
err_t temphum15_generic_write (temphum15_t *ctx, uint8_t reg, uint8_t *tx_buf, uint8_t tx_len)
 Temp&Hum 15 I2C writing function.
 
err_t temphum15_generic_read (temphum15_t *ctx, uint8_t reg, uint8_t *rx_buf, uint8_t rx_len)
 Temp&Hum 15 I2C reading function.
 
err_t temphum15_get_temp_and_hum (temphum15_t *ctx, uint8_t precision_mode, float *temp_val, float *hum_val)
 Temp&Hum 15 get temperature and humidity function.
 
err_t temphum15_soft_reset (temphum15_t *ctx)
 Temp&Hum 15 soft reset function.
 
err_t temphum15_read_serial (temphum15_t *ctx, uint32_t *serial_number)
 Temp&Hum 15 read serial number function.
 

Detailed Description

This file contains API for Temp&Hum 15 Click Driver.