Toggle navigation
Documentation
The friendly Operating System for the Internet of Things
Loading...
Searching...
No Matches
max31855_constants.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2024 HAW Hamburg
3
*
4
* This file is subject to the terms and conditions of the GNU Lesser
5
* General Public License v2.1. See the file LICENSE in the top level
6
* directory for more details.
7
*/
8
19
#ifndef MAX31855_CONSTANTS_H
20
#define MAX31855_CONSTANTS_H
21
22
#ifdef __cplusplus
23
extern
"C"
{
24
#endif
25
29
#define MAX31855_DATA_SIZE (4)
30
34
#define MAX31855_THERMOCOUPLE_SIGN_SHIFT (31)
35
39
#define MAX31855_THERMOCOUPLE_SIGN_MASK (1UL << MAX31855_THERMOCOUPLE_SIGN_SHIFT)
40
44
#define MAX31855_THERMOCOUPLE_INTEGER_SHIFT (20)
45
49
#define MAX31855_THERMOCOUPLE_INTEGER_MASK (0x7FFUL << MAX31855_THERMOCOUPLE_INTEGER_SHIFT)
50
54
#define MAX31855_THERMOCOUPLE_FRACTIONAL_HALF_SHIFT (19)
55
59
#define MAX31855_THERMOCOUPLE_FRACTIONAL_HALF_MASK (1UL << MAX31855_THERMOCOUPLE_FRACTIONAL_HALF_SHIFT)
60
64
#define MAX31855_THERMOCOUPLE_FRACTIONAL_QUARTER_SHIFT (18)
65
69
#define MAX31855_THERMOCOUPLE_FRACTIONAL_QUARTER_MASK (1UL << MAX31855_THERMOCOUPLE_FRACTIONAL_QUARTER_SHIFT)
70
74
#define MAX31855_INTERNAL_SIGN_SHIFT (15)
75
79
#define MAX31855_INTERNAL_SIGN_MASK (1UL << MAX31855_INTERNAL_SIGN_SHIFT)
80
84
#define MAX31855_INTERNAL_INTEGER_SHIFT (8)
85
89
#define MAX31855_INTERNAL_INTEGER_MASK (0x7FUL << MAX31855_INTERNAL_INTEGER_SHIFT)
90
94
#define MAX31855_INTERNAL_FRACTIONAL_HALF_SHIFT (7)
95
99
#define MAX31855_INTERNAL_FRACTIONAL_HALF_MASK (1UL << MAX31855_INTERNAL_FRACTIONAL_HALF_SHIFT)
100
104
#define MAX31855_INTERNAL_FRACTIONAL_QUARTER_SHIFT (6)
105
109
#define MAX31855_INTERNAL_FRACTIONAL_QUARTER_MASK (1UL << MAX31855_INTERNAL_FRACTIONAL_QUARTER_SHIFT)
110
114
#define MAX31855_INTERNAL_FRACTIONAL_EIGHTH_SHIFT (5)
115
119
#define MAX31855_INTERNAL_FRACTIONAL_EIGHTH_MASK (1UL << MAX31855_INTERNAL_FRACTIONAL_EIGHTH_SHIFT)
120
124
#define MAX31855_INTERNAL_FRACTIONAL_SIXTEENTH_SHIFT (4)
125
129
#define MAX31855_INTERNAL_FRACTIONAL_SIXTEENTH_MASK (1UL << MAX31855_INTERNAL_FRACTIONAL_SIXTEENTH_SHIFT)
130
134
#define MAX31855_FAULT_VCC_SHORT_SHIFT (2)
135
139
#define MAX31855_FAULT_VCC_SHORT_MASK (1UL << MAX31855_FAULT_VCC_SHORT_SHIFT)
140
144
#define MAX31855_FAULT_GND_SHORT_SHIFT (1)
145
149
#define MAX31855_FAULT_GND_SHORT_MASK (1UL << MAX31855_FAULT_GND_SHORT_SHIFT)
150
154
#define MAX31855_FAULT_OPEN_CIRCUIT_SHIFT (0)
155
159
#define MAX31855_FAULT_OPEN_CIRCUIT_MASK (1UL << MAX31855_FAULT_OPEN_CIRCUIT_SHIFT)
160
164
#define MAX31855_FAULT_MASK (MAX31855_FAULT_VCC_SHORT_MASK | \
165
MAX31855_FAULT_GND_SHORT_MASK | \
166
MAX31855_FAULT_OPEN_CIRCUIT_MASK)
167
168
#ifdef __cplusplus
169
}
170
#endif
171
172
#endif
/* MAX31855_CONSTANTS_H */
Generated on Thu Nov 21 2024 13:53:01 by
1.9.8