max31865_lut.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2025 David Picard
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 
9 #pragma once
10 
21 #include "container.h"
22 
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26 
27 #ifndef MAX31865_CUSTOM_LUT_PROVIDED
28 
30 #define MAX31865_LUT_NUMLINES (ARRAY_SIZE(max31865_lut))
46 static const int32_t max31865_lut[][4] =
47 { { 0x0E5E, -200000000, -242967290, 11682 },
48  { 0x11B6, -190000000, -243466981, 11792 },
49  { 0x1506, -180000000, -244071429, 11905 },
50  { 0x184E, -170000000, -244425837, 11962 },
51  { 0x1B92, -160000000, -245036145, 12048 },
52  { 0x1ED0, -150000000, -245496368, 12107 },
53  { 0x220A, -140000000, -246268293, 12195 },
54  { 0x253E, -130000000, -247125307, 12285 },
55  { 0x286C, -120000000, -247438424, 12315 },
56  { 0x2B98, -110000000, -248461538, 12407 },
57  { 0x2EBE, -100000000, -248830846, 12438 },
58  { 0x31E2, -90000000, -249625000, 12500 },
59  { 0x3502, -80000000, -250477387, 12563 },
60  { 0x381E, -70000000, -251388889, 12626 },
61  { 0x3B36, -60000000, -251873418, 12658 },
62  { 0x3E4C, -50000000, -252385787, 12690 },
63  { 0x4160, -40000000, -253469388, 12755 },
64  { 0x4470, -30000000, -254040921, 12788 },
65  { 0x477E, -20000000, -254641026, 12821 },
66  { 0x4A8A, -10000000, -255269923, 12853 },
67  { 0x4D94, 0, -256589147, 12920 },
68  { 0x509A, 10000000, -256589147, 12920 },
69  { 0x53A0, 20000000, -258025974, 12987 },
70  { 0x56A2, 30000000, -258776042, 13021 },
71  { 0x59A2, 40000000, -259556136, 13055 },
72  { 0x5CA0, 50000000, -260366492, 13089 },
73  { 0x5F9C, 60000000, -262052632, 13158 },
74  { 0x6294, 70000000, -262052632, 13158 },
75  { 0x658C, 80000000, -263862434, 13228 },
76  { 0x6880, 90000000, -264801061, 13263 },
77  { 0x6B72, 100000000, -265771277, 13298 },
78  { 0x6E62, 110000000, -266773333, 13333 },
79  { 0x7150, 120000000, -267807487, 13369 },
80  { 0x743C, 130000000, -269946237, 13441 },
81  { 0x7724, 140000000, -269946237, 13441 },
82  { 0x7A0C, 150000000, -272216216, 13514 },
83  { 0x7CF0, 160000000, -273387534, 13550 },
84  { 0x7FD2, 170000000, -274592391, 13587 },
85  { 0x82B2, 180000000, -275831063, 13624 },
86  { 0x8590, 190000000, -277103825, 13661 },
87  { 0x886C, 200000000, -278410959, 13699 },
88  { 0x8B46, 210000000, -281101928, 13774 },
89  { 0x8E1C, 220000000, -282486188, 13812 },
90  { 0x90F0, 230000000, -283905817, 13850 },
91  { 0x93C2, 240000000, -285361111, 13889 },
92  { 0x9692, 250000000, -286852368, 13928 },
93  { 0x9960, 260000000, -288379888, 13966 },
94  { 0x9C2C, 270000000, -291516854, 14045 },
95  { 0x9EF4, 280000000, -291516854, 14045 },
96  { 0xA1BC, 290000000, -294802260, 14124 },
97  { 0xA480, 300000000, -296487252, 14164 },
98  { 0xA742, 310000000, -298210227, 14205 },
99  { 0xAA02, 320000000, -299971510, 14245 },
100  { 0xACC0, 330000000, -301771429, 14286 },
101  { 0xAF7C, 340000000, -305459770, 14368 },
102  { 0xB234, 350000000, -307348703, 14409 },
103  { 0xB4EA, 360000000, -307348703, 14409 },
104  { 0xB7A0, 370000000, -311275362, 14493 },
105  { 0xBA52, 380000000, -313284884, 14535 },
106  { 0xBD02, 390000000, -317397661, 14620 },
107  { 0xBFAE, 400000000, -317397661, 14620 },
108  { 0xC25A, 410000000, -319530792, 14663 },
109  { 0xC504, 420000000, -323893805, 14749 },
110  { 0xC7AA, 430000000, -326124260, 14793 },
111  { 0xCA4E, 440000000, -328397626, 14837 },
112  { 0xCCF0, 450000000, -330714286, 14881 },
113  { 0xCF90, 460000000, -333074627, 14925 },
114  { 0xD22E, 470000000, -337897898, 15015 },
115  { 0xD4C8, 480000000, -337897898, 15015 },
116  { 0xD762, 490000000, -342900302, 15106 },
117  { 0xD9F8, 500000000, -345454545, 15152 },
118  { 0xDC8C, 510000000, -348054711, 15198 },
119  { 0xDF1E, 520000000, -350701220, 15244 },
120  { 0xE1AE, 530000000, -353394495, 15291 },
121  { 0xE43C, 540000000, -356134969, 15337 },
122  { 0xE6C8, 550000000, -361728395, 15432 },
123  { 0xE950, 560000000, -364582043, 15480 },
124  { 0xEBD6, 570000000, -367484472, 15528 },
125  { 0xEE5A, 580000000, -370436137, 15576 },
126  { 0xF0DC, 590000000, -373437500, 15625 },
127  { 0xF35C, 600000000, -376489028, 15674 },
128  { 0xF5DA, 610000000, -382712934, 15773 },
129  { 0xF854, 620000000, -382712934, 15773 },
130  { 0xFACE, 630000000, -389142857, 15873 },
131  { 0xFD44, 640000000, -392420382, 15924 },
132  { 0xFFB8, 650000000, -395750799, 15974 } };
133 
134 #endif /* MAX31865_CUSTOM_LUT_PROVIDED */
135 
136 #ifdef __cplusplus
137 }
138 #endif
139 
Common macros and compiler attributes/pragmas configuration.
static const int32_t max31865_lut[][4]
Default lookup table for temperature conversion.
Definition: max31865_lut.h:46