-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdps310_config.h
More file actions
49 lines (43 loc) · 1.16 KB
/
dps310_config.h
File metadata and controls
49 lines (43 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#ifndef DPS310_CONFIG_H_
#define DPS310_CONFIG_H_
#define DPS310_NUM_OF_REGMASKS 16
enum Interrupt_source_310_e
{
DPS310_NO_INTR = 0,
DPS310_PRS_INTR = 1,
DPS310_TEMP_INTR = 2,
DPS310_BOTH_INTR = 3,
DPS310_FIFO_FULL_INTR = 4,
};
namespace dps310
{
enum Registers_e
{
PROD_ID = 0,
REV_ID,
TEMP_SENSOR, // internal vs external
TEMP_SENSORREC, //temperature sensor recommendation
TEMP_SE, //temperature shift enable (if temp_osr>3)
PRS_SE, //pressure shift enable (if prs_osr>3)
FIFO_FL, //FIFO flush
FIFO_EMPTY, //FIFO empty
FIFO_FULL, //FIFO full
INT_HL,
INT_SEL, //interrupt select
};
const RegMask_t registers[DPS310_NUM_OF_REGMASKS] = {
{0x0D, 0x0F, 0}, // PROD_ID
{0x0D, 0xF0, 4}, // REV_ID
{0x07, 0x80, 7}, // TEMP_SENSOR
{0x28, 0x80, 7}, // TEMP_SENSORREC
{0x09, 0x08, 3}, // TEMP_SE
{0x09, 0x04, 2}, // PRS_SE
{0x0C, 0x80, 7}, // FIFO_FL
{0x0B, 0x01, 0}, // FIFO_EMPTY
{0x0B, 0x02, 1}, // FIFO_FULL
{0x09, 0x80, 7}, // INT_HL
{0x09, 0x70, 4}, // INT_SEL
};
const RegBlock_t coeffBlock = {0x10, 18};
} // namespace dps310
#endif