Loading...
Searching...
No Matches

Internal addresses, constants for the HSC sensor. More...

Detailed Description

Internal addresses, constants for the HSC sensor.

Internal addresses, constants for the HSC sensor.

Author
Quang Pham phhr_.nosp@m.quan.nosp@m.g@liv.nosp@m.e.co.nosp@m.m

Definition in file hsc_internals.h.

+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

HSC I2C Packet Readout

#define HSC_PRESSURE_DATA_LENGTH   (2)
 Pressure is stored in the first 2 bytes of data.
 
#define HSC_FULL_DATA_LENGTH   (4)
 Pressure + temperature data is 4 bytes long.
 
#define HSC_STATUS_MASK   (0xc0)
 Bit mask for the status bits in the first byte.
 
#define HSC_PRESSURE_MASK   (0x3fff)
 Bit mask for the pressure data.
 
#define HSC_TEMPERATURE_SHIFT   (5)
 Temperature data is left adjusted within the word.
 

Status and error return codes

enum  { HSC_STATUS_OK = 0x00 , HSC_STATUS_STALE_DATA = 0x40 , HSC_STATUS_COMMAND_MODE = 0x80 , HSC_STATUS_DIAGNOSTIC = 0xc0 }
 

Macro Definition Documentation

◆ HSC_FULL_DATA_LENGTH

#define HSC_FULL_DATA_LENGTH   (4)

Pressure + temperature data is 4 bytes long.

Definition at line 34 of file hsc_internals.h.

◆ HSC_PRESSURE_DATA_LENGTH

#define HSC_PRESSURE_DATA_LENGTH   (2)

Pressure is stored in the first 2 bytes of data.

Definition at line 32 of file hsc_internals.h.

◆ HSC_PRESSURE_MASK

#define HSC_PRESSURE_MASK   (0x3fff)

Bit mask for the pressure data.

Definition at line 38 of file hsc_internals.h.

◆ HSC_STATUS_MASK

#define HSC_STATUS_MASK   (0xc0)

Bit mask for the status bits in the first byte.

Definition at line 36 of file hsc_internals.h.

◆ HSC_TEMPERATURE_SHIFT

#define HSC_TEMPERATURE_SHIFT   (5)

Temperature data is left adjusted within the word.

Definition at line 40 of file hsc_internals.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
HSC_STATUS_STALE_DATA 

stale data: data that has already been fetched since the last measurement cycle, or data fetched before the first measurement has been completed.

Definition at line 47 of file hsc_internals.h.