Loading...
Searching...
No Matches

Register definitions for ST HTS221 devices. More...

Detailed Description

Register definitions for ST HTS221 devices.

Author
Sebastian Meiling s@mln.nosp@m.g.ne.nosp@m.t

Definition in file hts221_regs.h.

#include "board.h"
#include "hts221.h"
+ Include dependency graph for hts221_regs.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define HTS221_REGS_AVGT_SHIFT   (3U)
 Shift for AVG oftemperature configuration set in HTS221_REGS_AV_CONF.
 

Enumerations

enum  { HTS221_REGS_CTRL_REG1_ODR_ONE_SHOT = 0 , HTS221_REGS_CTRL_REG1_ODR_1HZ , HTS221_REGS_CTRL_REG1_ODR_7HZ , HTS221_REGS_CTRL_REG1_ODR_12HZ }
 Output data rate settings, HTS221_REGS_CTRL_REG1[1:0]. More...
 
#define HTS221_DEVICE_ID   (0xBC)
 

Register Map

#define HTS221_REGS_WHO_AM_I   (0x0F)
 
#define HTS221_REGS_AV_CONF   (0x10)
 
#define HTS221_REGS_CTRL_REG1   (0x20)
 
#define HTS221_REGS_CTRL_REG2   (0x21)
 
#define HTS221_REGS_CTRL_REG3   (0x22)
 data ready output signal
 
#define HTS221_REGS_STATUS_REG   (0x27)
 
#define HTS221_REGS_HUMIDITY_OUT_L   (0x28)
 
#define HTS221_REGS_HUMIDITY_OUT_H   (0x29)
 
#define HTS221_REGS_TEMP_OUT_L   (0x2A)
 
#define HTS221_REGS_TEMP_OUT_H   (0x2B)
 

Calibration Register Map

#define HTS221_REGS_H0_RH_X2   (0x30)
 
#define HTS221_REGS_H1_RH_X2   (0x31)
 
#define HTS221_REGS_T0_DEGC_X8   (0x32)
 
#define HTS221_REGS_T1_DEGC_X8   (0x33)
 
#define HTS221_REGS_T1_T0_MSB   (0x35)
 
#define HTS221_REGS_H0_T0_OUT_L   (0x36)
 
#define HTS221_REGS_H0_T0_OUT_H   (0x37)
 
#define HTS221_REGS_H1_T0_OUT_L   (0x3A)
 
#define HTS221_REGS_H1_T0_OUT_H   (0x3B)
 
#define HTS221_REGS_T0_OUT_L   (0x3C)
 
#define HTS221_REGS_T0_OUT_H   (0x3D)
 
#define HTS221_REGS_T1_OUT_L   (0x3E)
 
#define HTS221_REGS_T1_OUT_H   (0x3F)
 

Config bits of HTS221_REGS_CTRL_REG1

#define HTS221_REGS_CTRL_REG1_PD_ACTIVE   (1 << 7)
 power-down control, set active mode
 
#define HTS221_REGS_CTRL_REG1_BDU   (1 << 2)
 Block data update.
 

Config bits of HTS221_REGS_CTRL_REG2

#define HTS221_REGS_CTRL_REG2_BOOT   (1 << 7)
 Reboot memory content.
 
#define HTS221_REGS_CTRL_REG2_HEATER   (1 << 1)
 Heater ON.
 
#define HTS221_REGS_CTRL_REG2_OS_EN   (1 << 0)
 One-shot enable, start new dataset.
 

Data ready config bits of HTS221_REGS_CTRL_REG3

#define HTS221_REGS_CTRL_REG3_DRDY_HL   (1 << 7)
 Data Ready output signal active high, low.
 
#define HTS221_REGS_CTRL_REG3_PP_OD   (1 << 6)
 Push-pull / Open Drain selection on pin 3.
 
#define HTS221_REGS_CTRL_REG3_DRDY_EN   (1 << 2)
 Data Ready enable.
 

Status bits to check data availability, HTS221_REGS_STATUS_REG[1:0]

#define HTS221_REGS_STATUS_REG_TDA   (1 << 0)
 temperature data available
 
#define HTS221_REGS_STATUS_REG_HDA   (1 << 1)
 humidity data available
 

Humidity average over number of samples 4 to 512

enum  {
  HTS221_REGS_AVGH_4 = 0 , HTS221_REGS_AVGH_8 , HTS221_REGS_AVGH_16 , HTS221_REGS_AVGH_32 ,
  HTS221_REGS_AVGH_64 , HTS221_REGS_AVGH_128 , HTS221_REGS_AVGH_256 , HTS221_REGS_AVGH_512
}
 

Temperature average over number of samples 2 to 256

enum  {
  HTS221_REGS_AVGT_2 = 0 , HTS221_REGS_AVGT_4 , HTS221_REGS_AVGT_8 , HTS221_REGS_AVGT_16 ,
  HTS221_REGS_AVGT_32 , HTS221_REGS_AVGT_64 , HTS221_REGS_AVGT_128 , HTS221_REGS_AVGT_256
}
 

Macro Definition Documentation

◆ HTS221_DEVICE_ID

#define HTS221_DEVICE_ID   (0xBC)

Definition at line 29 of file hts221_regs.h.

◆ HTS221_REGS_AV_CONF

#define HTS221_REGS_AV_CONF   (0x10)

Definition at line 35 of file hts221_regs.h.

◆ HTS221_REGS_AVGT_SHIFT

#define HTS221_REGS_AVGT_SHIFT   (3U)

Shift for AVG oftemperature configuration set in HTS221_REGS_AV_CONF.

Register HTS221_REGS_AV_CONF= [7:6] reserved, [5:3] AVGT2-0, [2:0] AVGH2-0

Definition at line 70 of file hts221_regs.h.

◆ HTS221_REGS_CTRL_REG1

#define HTS221_REGS_CTRL_REG1   (0x20)

Definition at line 36 of file hts221_regs.h.

◆ HTS221_REGS_CTRL_REG1_BDU

#define HTS221_REGS_CTRL_REG1_BDU   (1 << 2)

Block data update.

Definition at line 109 of file hts221_regs.h.

◆ HTS221_REGS_CTRL_REG1_PD_ACTIVE

#define HTS221_REGS_CTRL_REG1_PD_ACTIVE   (1 << 7)

power-down control, set active mode

Definition at line 108 of file hts221_regs.h.

◆ HTS221_REGS_CTRL_REG2

#define HTS221_REGS_CTRL_REG2   (0x21)

Definition at line 37 of file hts221_regs.h.

◆ HTS221_REGS_CTRL_REG2_BOOT

#define HTS221_REGS_CTRL_REG2_BOOT   (1 << 7)

Reboot memory content.

Definition at line 126 of file hts221_regs.h.

◆ HTS221_REGS_CTRL_REG2_HEATER

#define HTS221_REGS_CTRL_REG2_HEATER   (1 << 1)

Heater ON.

Definition at line 127 of file hts221_regs.h.

◆ HTS221_REGS_CTRL_REG2_OS_EN

#define HTS221_REGS_CTRL_REG2_OS_EN   (1 << 0)

One-shot enable, start new dataset.

Definition at line 128 of file hts221_regs.h.

◆ HTS221_REGS_CTRL_REG3

#define HTS221_REGS_CTRL_REG3   (0x22)

data ready output signal

Definition at line 38 of file hts221_regs.h.

◆ HTS221_REGS_CTRL_REG3_DRDY_EN

#define HTS221_REGS_CTRL_REG3_DRDY_EN   (1 << 2)

Data Ready enable.

Definition at line 137 of file hts221_regs.h.

◆ HTS221_REGS_CTRL_REG3_DRDY_HL

#define HTS221_REGS_CTRL_REG3_DRDY_HL   (1 << 7)

Data Ready output signal active high, low.

Definition at line 135 of file hts221_regs.h.

◆ HTS221_REGS_CTRL_REG3_PP_OD

#define HTS221_REGS_CTRL_REG3_PP_OD   (1 << 6)

Push-pull / Open Drain selection on pin 3.

Definition at line 136 of file hts221_regs.h.

◆ HTS221_REGS_H0_RH_X2

#define HTS221_REGS_H0_RH_X2   (0x30)

Definition at line 50 of file hts221_regs.h.

◆ HTS221_REGS_H0_T0_OUT_H

#define HTS221_REGS_H0_T0_OUT_H   (0x37)

Definition at line 56 of file hts221_regs.h.

◆ HTS221_REGS_H0_T0_OUT_L

#define HTS221_REGS_H0_T0_OUT_L   (0x36)

Definition at line 55 of file hts221_regs.h.

◆ HTS221_REGS_H1_RH_X2

#define HTS221_REGS_H1_RH_X2   (0x31)

Definition at line 51 of file hts221_regs.h.

◆ HTS221_REGS_H1_T0_OUT_H

#define HTS221_REGS_H1_T0_OUT_H   (0x3B)

Definition at line 58 of file hts221_regs.h.

◆ HTS221_REGS_H1_T0_OUT_L

#define HTS221_REGS_H1_T0_OUT_L   (0x3A)

Definition at line 57 of file hts221_regs.h.

◆ HTS221_REGS_HUMIDITY_OUT_H

#define HTS221_REGS_HUMIDITY_OUT_H   (0x29)

Definition at line 41 of file hts221_regs.h.

◆ HTS221_REGS_HUMIDITY_OUT_L

#define HTS221_REGS_HUMIDITY_OUT_L   (0x28)

Definition at line 40 of file hts221_regs.h.

◆ HTS221_REGS_STATUS_REG

#define HTS221_REGS_STATUS_REG   (0x27)

Definition at line 39 of file hts221_regs.h.

◆ HTS221_REGS_STATUS_REG_HDA

#define HTS221_REGS_STATUS_REG_HDA   (1 << 1)

humidity data available

Definition at line 145 of file hts221_regs.h.

◆ HTS221_REGS_STATUS_REG_TDA

#define HTS221_REGS_STATUS_REG_TDA   (1 << 0)

temperature data available

Definition at line 144 of file hts221_regs.h.

◆ HTS221_REGS_T0_DEGC_X8

#define HTS221_REGS_T0_DEGC_X8   (0x32)

Definition at line 52 of file hts221_regs.h.

◆ HTS221_REGS_T0_OUT_H

#define HTS221_REGS_T0_OUT_H   (0x3D)

Definition at line 60 of file hts221_regs.h.

◆ HTS221_REGS_T0_OUT_L

#define HTS221_REGS_T0_OUT_L   (0x3C)

Definition at line 59 of file hts221_regs.h.

◆ HTS221_REGS_T1_DEGC_X8

#define HTS221_REGS_T1_DEGC_X8   (0x33)

Definition at line 53 of file hts221_regs.h.

◆ HTS221_REGS_T1_OUT_H

#define HTS221_REGS_T1_OUT_H   (0x3F)

Definition at line 62 of file hts221_regs.h.

◆ HTS221_REGS_T1_OUT_L

#define HTS221_REGS_T1_OUT_L   (0x3E)

Definition at line 61 of file hts221_regs.h.

◆ HTS221_REGS_T1_T0_MSB

#define HTS221_REGS_T1_T0_MSB   (0x35)

Definition at line 54 of file hts221_regs.h.

◆ HTS221_REGS_TEMP_OUT_H

#define HTS221_REGS_TEMP_OUT_H   (0x2B)

Definition at line 43 of file hts221_regs.h.

◆ HTS221_REGS_TEMP_OUT_L

#define HTS221_REGS_TEMP_OUT_L   (0x2A)

Definition at line 42 of file hts221_regs.h.

◆ HTS221_REGS_WHO_AM_I

#define HTS221_REGS_WHO_AM_I   (0x0F)

Definition at line 34 of file hts221_regs.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

Definition at line 76 of file hts221_regs.h.

◆ anonymous enum

anonymous enum

Definition at line 92 of file hts221_regs.h.

◆ anonymous enum

anonymous enum

Output data rate settings, HTS221_REGS_CTRL_REG1[1:0].

Definition at line 115 of file hts221_regs.h.