Toggle navigation
Documentation
The friendly Operating System for the Internet of Things
Loading...
Searching...
No Matches
mpl3115a2_reg.h
Go to the documentation of this file.
1
/*
2
* SPDX-FileCopyrightText: 2014 PHYTEC Messtechnik GmbH
3
* SPDX-License-Identifier: LGPL-2.1-only
4
*/
5
6
#pragma once
7
18
19
#ifdef __cplusplus
20
extern
"C"
21
{
22
#endif
23
24
#define MPL3115A2_STATUS 0x00
25
#define MPL3115A2_OUT_P_MSB 0x01
26
#define MPL3115A2_OUT_P_CSB 0x02
27
#define MPL3115A2_OUT_P_LSB 0x03
28
#define MPL3115A2_OUT_T_MSB 0x04
29
#define MPL3115A2_OUT_T_LSB 0x05
30
#define MPL3115A2_DR_STATUS 0x06
31
#define MPL3115A2_OUT_P_DELTA MSB 0x07
32
#define MPL3115A2_OUT_P_DELTA_CSB 0x08
33
#define MPL3115A2_OUT_P_DELTA_LSB 0x09
34
#define MPL3115A2_OUT_T_DELTA_MSB 0x0A
35
#define MPL3115A2_OUT_T_DELTA_LSB 0x0B
36
#define MPL3115A2_WHO_AM_I 0x0C
37
#define MPL3115A2_F_STATUS 0x0D
38
#define MPL3115A2_F_DATA 0x0E
39
#define MPL3115A2_F_SETUP 0x0F
40
#define MPL3115A2_TIME_DLY 0x10
41
#define MPL3115A2_SYSMOD 0x11
42
#define MPL3115A2_INT_SOURCE 0x12
43
#define MPL3115A2_PT_DATA_CFG 0x13
44
#define MPL3115A2_BAR_IN_MSB 0x14
45
#define MPL3115A2_BAR_IN_LSB 0x15
46
#define MPL3115A2_P_TGT_MSB 0x16
47
#define MPL3115A2_P_TGT_LSB 0x17
48
#define MPL3115A2_T_TGT 0x18
49
#define MPL3115A2_P_WND_MSB 0x19
50
#define MPL3115A2_P_WND_LSB 0x1A
51
#define MPL3115A2_T_WND 0x1B
52
#define MPL3115A2_P_MIN_MSB 0x1C
53
#define MPL3115A2_P_MIN_CSB 0x1D
54
#define MPL3115A2_P_MIN_LSB 0x1E
55
#define MPL3115A2_T_MIN_MSB 0x1F
56
#define MPL3115A2_T_MIN_LSB 0x20
57
#define MPL3115A2_P_MAX_MSB 0x21
58
#define MPL3115A2_P_MAX_CSB 0x22
59
#define MPL3115A2_P_MAX_LSB 0x23
60
#define MPL3115A2_T_MAX_MSB 0x24
61
#define MPL3115A2_T_MAX_LSB 0x25
62
#define MPL3115A2_CTRL_REG1 0x26
63
#define MPL3115A2_CTRL_REG2 0x27
64
#define MPL3115A2_CTRL_REG3 0x28
65
#define MPL3115A2_CTRL_REG4 0x29
66
#define MPL3115A2_CTRL_REG5 0x2A
67
#define MPL3115A2_OFF_P 0x2B
68
#define MPL3115A2_OFF_T 0x2C
69
#define MPL3115A2_OFF_H 0x2D
70
71
#define MPL3115A2_STATUS_TDR (1 << 1)
72
#define MPL3115A2_STATUS_PDR (1 << 2)
73
#define MPL3115A2_STATUS_PTDR (1 << 3)
74
#define MPL3115A2_STATUS_TOW (1 << 5)
75
#define MPL3115A2_STATUS_POW (1 << 6)
76
#define MPL3115A2_STATUS_PTOW (1 << 7)
77
78
#define MPL3115A2_PT_DATA_CFG_TDEFE (1 << 0)
79
#define MPL3115A2_PT_DATA_CFG_PDEFE (1 << 1)
80
#define MPL3115A2_PT_DATA_CFG_DREM (1 << 2)
81
82
#define MPL3115A2_CTRL_REG1_SBYB (1 << 0)
83
#define MPL3115A2_CTRL_REG1_OST (1 << 1)
84
#define MPL3115A2_CTRL_REG1_RST (1 << 2)
85
#define MPL3115A2_CTRL_REG1_OS_SHIFT 3
86
#define MPL3115A2_CTRL_REG1_OS_MASK 0x38
87
#define MPL3115A2_CTRL_REG1_OS(x) (((uint8_t)(((uint8_t)(x))<<MPL3115A2_CTRL_REG1_OS_SHIFT))\
88
&MPL3115A2_CTRL_REG1_OS_MASK)
89
#define MPL3115A2_CTRL_REG1_RAW (1 << 6)
90
#define MPL3115A2_CTRL_REG1_ALT (1 << 7)
91
92
#define MPL3115A2_CTRL_REG2_ST_SHIFT 0
93
#define MPL3115A2_CTRL_REG2_ST_MASK 0xF
94
#define MPL3115A2_CTRL_REG2_ST(x) (((uint8_t)(((uint8_t)(x))<<MPL3115A2_CTRL_REG2_ST_SHIFT))\
95
&MPL3115A2_CTRL_REG2_ST_MASK)
96
#define MPL3115A2_CTRL_REG2_ALARM_SEL (1 << 4)
97
#define MPL3115A2_CTRL_REG2_LOAD_OPUT (1 << 5)
98
99
#define MPL3115A2_CTRL_REG3_PP_OD2 (1 << 0)
100
#define MPL3115A2_CTRL_REG3_IPOL2 (1 << 1)
101
#define MPL3115A2_CTRL_REG3_PP_OD1 (1 << 4)
102
#define MPL3115A2_CTRL_REG3_IPOL1 (1 << 5)
103
104
#define MPL3115A2_CTRL_REG4_INT_EN_TCHG (1 << 0)
105
#define MPL3115A2_CTRL_REG4_INT_EN_PCHG (1 << 1)
106
#define MPL3115A2_CTRL_REG4_INT_EN_TTH (1 << 2)
107
#define MPL3115A2_CTRL_REG4_INT_EN_PTH (1 << 3)
108
#define MPL3115A2_CTRL_REG4_INT_EN_TW (1 << 4)
109
#define MPL3115A2_CTRL_REG4_INT_EN_PW (1 << 5)
110
#define MPL3115A2_CTRL_REG4_INT_EN_FIFO (1 << 6)
111
#define MPL3115A2_CTRL_REG4_INT_EN_DRDY (1 << 7)
112
113
#define MPL3115A2_CTRL_REG5_INT_TCHG (1 << 0)
114
#define MPL3115A2_CTRL_REG5_INT_PCHG (1 << 1)
115
#define MPL3115A2_CTRL_REG5_INT_TTH (1 << 2)
116
#define MPL3115A2_CTRL_REG5_INT_PTH (1 << 3)
117
#define MPL3115A2_CTRL_REG5_INT_TW (1 << 4)
118
#define MPL3115A2_CTRL_REG5_INT_PW (1 << 5)
119
#define MPL3115A2_CTRL_REG5_INT_FIFO (1 << 6)
120
#define MPL3115A2_CTRL_REG5_INT_DRDY (1 << 7)
121
122
#define MPL3115A2_ID 0xC4
123
124
#ifdef __cplusplus
125
}
126
#endif
127
Generated on Tue May 5 2026 15:28:28 by
1.13.2