temphum10 2.0.0.0
temphum10.h File Reference

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

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

Go to the source code of this file.

Data Structures

struct  temphum10_t
 Click ctx object definition. More...
 
struct  temphum10_cfg_t
 Click configuration structure definition. More...
 

Macros

#define TEMPHUM10_MAP_MIKROBUS(cfg, mikrobus)
 
#define TEMPHUM10_RETVAL   uint8_t
 
#define TEMPHUM10_OK   0x00
 
#define TEMPHUM10_INIT_ERROR   0xFF
 
#define TEMPHUM10_REG_DEVICE_RESET   0x00
 
#define TEMPHUM10_REG_AVERAGE_MODE   0x01
 
#define TEMPHUM10_REG_ERROR_FLAG   0x03
 
#define TEMPHUM10_REG_HUMIDITY_LSB   0x04
 
#define TEMPHUM10_REG_HUMIDITY_MSB   0x05
 
#define TEMPHUM10_REG_TEMPERATURE_LSB   0x06
 
#define TEMPHUM10_REG_TEMPERATURE_MSB   0x07
 
#define TEMPHUM10_REG_CAPACITY_LSB   0x0A
 
#define TEMPHUM10_REG_CAPACITY_MSB   0x0B
 
#define TEMPHUM10_REG_CAPACITY_CTRL   0x2C
 
#define TEMPHUM10_MODE_SLEEP   0x00
 
#define TEMPHUM10_MODE_STANDBY   0x01
 
#define TEMPHUM10_RST_NORMAL_OPERATION   0x00
 
#define TEMPHUM10_RST_ACTIVE_RESET   0x01
 
#define TEMPHUM10_AM_NO_AVERAGING_PROCESS   0x00
 
#define TEMPHUM10_AM_TIMES_AVERAGE_MODE_2   0x08
 
#define TEMPHUM10_AM_TIMES_AVERAGE_MODE_4   0x10
 
#define TEMPHUM10_AM_TIMES_AVERAGE_MODE_8   0x20
 
#define TEMPHUM10_AM_TEMP_AVERAGE_MODE_TIMES_8   0x00
 
#define TEMPHUM10_AM_TEMP_AVERAGE_MODE_TIMES_16   0x04
 
#define TEMPHUM10_AM_MANUAL_MODE_DETECTION_OP_STOP   0x00
 
#define TEMPHUM10_AM_MANUAL_MODE_DETECTION_OP_START   0x01
 
#define TEMPHUM10_ERR_NO_ERROR   0x00
 
#define TEMPHUM10_ERR_ERROR_FLAG_RESET   0x01
 
#define TEMPHUM10_CAP_OUTSIDE_CAPACITY_CUTTING   0x00
 
#define TEMPHUM10_CAP_OUTSIDE_CAPACITY_CONNECTION   0x10
 

Functions

void temphum10_cfg_setup (temphum10_cfg_t *cfg)
 Config Object Initialization function.
 
TEMPHUM10_RETVAL temphum10_init (temphum10_t *ctx, temphum10_cfg_t *cfg)
 Initialization function.
 
void temphum10_generic_write (temphum10_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic write function.
 
void temphum10_generic_read (temphum10_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len)
 Generic read function.
 
float temphum10_get_humidity (temphum10_t *ctx)
 Functions for read Relative Huminidy data.
 
float temphum10_get_temperature (temphum10_t *ctx)
 Functions for read Temperature data.
 
void temphum10_set_device_mode (temphum10_t *ctx, uint8_t mode)
 Functions for sets Device mode.
 
void temphum10_repeat_measurement (temphum10_t *ctx, uint8_t average)
 Functions for repeat measurement.
 

Detailed Description

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