temphum25  2.1.0.0
Data Structures | Macros | Enumerations | Functions
temphum25.h File Reference

This file contains API for TempHum 25 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  temphum25_t
 TempHum 25 Click context object. More...
 
struct  temphum25_cfg_t
 TempHum 25 Click configuration object. More...
 

Macros

#define TEMPHUM25_CMD_MEAS_SSH_REP_HIGH_CS_EN   0x2C06
 TempHum 25 command list. More...
 
#define TEMPHUM25_CMD_MEAS_SSH_REP_MID_CS_EN   0x2C0D
 
#define TEMPHUM25_CMD_MEAS_SSH_REP_LOW_CS_EN   0x2C10
 
#define TEMPHUM25_CMD_MEAS_SSH_REP_HIGH_CS_DIS   0x2400
 
#define TEMPHUM25_CMD_MEAS_SSH_REP_MID_CS_DIS   0x240B
 
#define TEMPHUM25_CMD_MEAS_SSH_REP_LOW_CS_DIS   0x2416
 
#define TEMPHUM25_CMD_MEAS_CONT_REP_HIGH_MPS_0_5   0x2032
 
#define TEMPHUM25_CMD_MEAS_CONT_REP_MID_MPS_0_5   0x2024
 
#define TEMPHUM25_CMD_MEAS_CONT_REP_LOW_MPS_0_5   0x202F
 
#define TEMPHUM25_CMD_MEAS_CONT_REP_HIGH_MPS_1   0x2130
 
#define TEMPHUM25_CMD_MEAS_CONT_REP_MID_MPS_1   0x2126
 
#define TEMPHUM25_CMD_MEAS_CONT_REP_LOW_MPS_1   0x212D
 
#define TEMPHUM25_CMD_MEAS_CONT_REP_HIGH_MPS_2   0x2236
 
#define TEMPHUM25_CMD_MEAS_CONT_REP_MID_MPS_2   0x2220
 
#define TEMPHUM25_CMD_MEAS_CONT_REP_LOW_MPS_2   0x222B
 
#define TEMPHUM25_CMD_MEAS_CONT_REP_HIGH_MPS_4   0x2334
 
#define TEMPHUM25_CMD_MEAS_CONT_REP_MID_MPS_4   0x2322
 
#define TEMPHUM25_CMD_MEAS_CONT_REP_LOW_MPS_4   0x2329
 
#define TEMPHUM25_CMD_MEAS_CONT_REP_HIGH_MPS_10   0x2737
 
#define TEMPHUM25_CMD_MEAS_CONT_REP_MID_MPS_10   0x2721
 
#define TEMPHUM25_CMD_MEAS_CONT_REP_LOW_MPS_10   0x272A
 
#define TEMPHUM25_CMD_MEAS_CONT_ART   0x2B32
 
#define TEMPHUM25_CMD_CONT_MEAS_STOP   0x3093
 
#define TEMPHUM25_CMD_FETCH_DATA   0xE000
 
#define TEMPHUM25_CMD_SOFT_RESET   0x30A2
 
#define TEMPHUM25_CMD_HEATER_ENABLE   0x306D
 
#define TEMPHUM25_CMD_HEATER_DISABLE   0x3066
 
#define TEMPHUM25_CMD_GET_SERIAL_NUM_0   0x3780
 
#define TEMPHUM25_CMD_GET_SERIAL_NUM_1   0x3682
 
#define TEMPHUM25_CMD_READ_STATUS   0xF32D
 
#define TEMPHUM25_CMD_CLEAR_STATUS   0x3041
 
#define TEMPHUM25_MAX_RH   100.0f
 TempHum 25 temperature and humidity calculation values. More...
 
#define TEMPHUM25_MIN_RH   0.0f
 
#define TEMPHUM25_DATA_RESOLUTION   65535.0f
 
#define TEMPHUM25_ABS_MIN_TEMP   ( -45.0f )
 
#define TEMPHUM25_ABS_MAX_TEMP   ( 130.0f )
 
#define TEMPHUM25_DEVICE_ADDRESS_0   0x44
 TempHum 25 device address setting. More...
 
#define TEMPHUM25_DEVICE_ADDRESS_1   0x45
 
#define TEMPHUM25_MAP_MIKROBUS(cfg, mikrobus)
 MikroBUS pin mapping. More...
 

Enumerations

enum  temphum25_return_value_t { TEMPHUM25_OK = 0, TEMPHUM25_ERROR = -1 }
 TempHum 25 Click return value data. More...
 

Functions

void temphum25_cfg_setup (temphum25_cfg_t *cfg)
 TempHum 25 configuration object setup function. More...
 
err_t temphum25_init (temphum25_t *ctx, temphum25_cfg_t *cfg)
 TempHum 25 initialization function. More...
 
err_t temphum25_send_command (temphum25_t *ctx, uint16_t cmd)
 TempHum 25 send command function. More...
 
err_t temphum25_start_measurement (temphum25_t *ctx, uint16_t meas_cmd)
 TempHum 25 start measurement function. More...
 
err_t temphum25_stop_measurement (temphum25_t *ctx)
 TempHum 25 stop measurement function. More...
 
err_t temphum25_read_measurement (temphum25_t *ctx, float *temperature, float *humidity)
 TempHum 25 read measurement function. More...
 
err_t temphum25_read_serial_num (temphum25_t *ctx, uint32_t *serial_num)
 TempHum 25 read serial num function. More...
 
err_t temphum25_read_status (temphum25_t *ctx, uint16_t *status)
 TempHum 25 read status function. More...
 
err_t temphum25_clear_status (temphum25_t *ctx)
 TempHum 25 clear status function. More...
 
err_t temphum25_enable_heater (temphum25_t *ctx)
 TempHum 25 enable heater function. More...
 
err_t temphum25_disable_heater (temphum25_t *ctx)
 TempHum 25 disable heater function. More...
 
err_t temphum25_soft_reset (temphum25_t *ctx)
 TempHum 25 soft reset function. More...
 
void temphum25_set_rst_pin (temphum25_t *ctx, uint8_t state)
 TempHum 25 set rst pin function. More...
 
void temphum25_reset_device (temphum25_t *ctx)
 TempHum 25 reset device function. More...
 
uint8_t temphum25_get_alert_pin (temphum25_t *ctx)
 TempHum 25 get alert pin function. More...
 

Detailed Description

This file contains API for TempHum 25 Click Driver.

Enumeration Type Documentation

◆ temphum25_return_value_t

TempHum 25 Click return value data.

Predefined enum values for driver return values.

Enumerator
TEMPHUM25_OK 
TEMPHUM25_ERROR