temphum19 2.0.0.0
temphum19.h File Reference

This file contains API for TempHum 19 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  temphum19_t
 TempHum 19 Click context object. More...
 
struct  temphum19_cfg_t
 TempHum 19 Click configuration object. More...
 

Macros

#define TEMPHUM19_REG_RESET   0x00
 TempHum 19 register list.
 
#define TEMPHUM19_REG_MODE   0x01
 
#define TEMPHUM19_REG_ERROR   0x03
 
#define TEMPHUM19_REG_HUMIDITY_LSB   0x04
 
#define TEMPHUM19_REG_HUMIDITY_MSB   0x05
 
#define TEMPHUM19_REG_TEMPERATURE_LSB   0x06
 
#define TEMPHUM19_REG_TEMPERATURE_MSB   0x07
 
#define TEMPHUM19_REG_CAPACITY_LSB   0x0A
 
#define TEMPHUM19_REG_CAPACITY_MSB   0x0B
 
#define TEMPHUM19_REG_CAPACITY_CTRL   0x2C
 
#define TEMPHUM19_10BIT_RESOLUTION   0x400
 TempHum 19 temperature and humidity calculation setting.
 
#define TEMPHUM19_TEMP_DATA   0x7FF
 
#define TEMPHUM19_HUM_DATA   0x3FF
 
#define TEMPHUM19_TEMP_RESOLUTION   0.1
 
#define TEMPHUM19_HUM_RESOLUTION   100
 
#define TEMPHUM19_TEMP_NOMINAL   25
 
#define TEMPHUM19_NORMAL_OPERATION_MODE   0x00
 TempHum 19 mode register setting.
 
#define TEMPHUM19_HUM_NO_AVG   0x00
 
#define TEMPHUM19_HUM_AVG_2   0x08
 
#define TEMPHUM19_HUM_AVG_4   0x10
 
#define TEMPHUM19_HUM_AVG_8   0x20
 
#define TEMPHUM19_TEMP_AVG_8   0x00
 
#define TEMPHUM19_TEMP_AVG_16   0x04
 
#define TEMPHUM19_START_DETECTION   0x01
 
#define TEMPHUM19_STOP_DETECTION   0x00
 
#define TEMPHUM19_SET_DEV_ADDR   0x7F
 TempHum 19 device address setting.
 
#define TEMPHUM19_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping.
 

Enumerations

enum  temphum19_return_value_t { TEMPHUM19_OK = 0 , TEMPHUM19_ERROR = -1 }
 TempHum 19 Click return value data. More...
 

Functions

void temphum19_cfg_setup (temphum19_cfg_t *cfg)
 TempHum 19 configuration object setup function.
 
err_t temphum19_init (temphum19_t *ctx, temphum19_cfg_t *cfg)
 TempHum 19 initialization function.
 
err_t temphum19_default_cfg (temphum19_t *ctx)
 TempHum 19 default configuration function.
 
err_t temphum19_generic_write (temphum19_t *ctx, uint8_t reg, uint8_t *tx_buf, uint8_t tx_len)
 TempHum 19 I2C writing function.
 
err_t temphum19_generic_read (temphum19_t *ctx, uint8_t reg, uint8_t *rx_buf, uint8_t rx_len)
 TempHum 19 I2C reading function.
 
void temphum19_enable_chip (temphum19_t *ctx)
 TempHum 19 enable chip function.
 
void temphum19_disable_chip (temphum19_t *ctx)
 TempHum 19 disable chip function.
 
void temphum19_restart_chip (temphum19_t *ctx)
 TempHum 19 restart chip function.
 
err_t temphum19_set_mode_reg (temphum19_t *ctx, uint8_t mode)
 TempHum 19 set mode function.
 
err_t temphum19_read_data (temphum19_t *ctx, float *temperature, float *humidity)
 TempHum 19 read data function.
 

Detailed Description

This file contains API for TempHum 19 Click Driver.

Enumeration Type Documentation

◆ temphum19_return_value_t

TempHum 19 Click return value data.

Predefined enum values for driver return values.

Enumerator
TEMPHUM19_OK 
TEMPHUM19_ERROR