|
@@ -1219,13 +1219,11 @@ void disable_all_heaters() {
|
1219
|
1219
|
#define MAX6675_HEAT_INTERVAL 250u
|
1220
|
1220
|
|
1221
|
1221
|
#if ENABLED(MAX6675_IS_MAX31855)
|
1222
|
|
- unsigned long max6675_temp = 2000;
|
1223
|
|
- #define MAX6675_READ_BYTES 4
|
|
1222
|
+ uint32_t max6675_temp = 2000;
|
1224
|
1223
|
#define MAX6675_ERROR_MASK 7
|
1225
|
1224
|
#define MAX6675_DISCARD_BITS 18
|
1226
|
1225
|
#else
|
1227
|
|
- unsigned int max6675_temp = 2000;
|
1228
|
|
- #define MAX6675_READ_BYTES 2
|
|
1226
|
+ uint16_t max6675_temp = 2000;
|
1229
|
1227
|
#define MAX6675_ERROR_MASK 4
|
1230
|
1228
|
#define MAX6675_DISCARD_BITS 3
|
1231
|
1229
|
#endif
|
|
@@ -1257,7 +1255,7 @@ void disable_all_heaters() {
|
1257
|
1255
|
|
1258
|
1256
|
// Read a big-endian temperature value
|
1259
|
1257
|
max6675_temp = 0;
|
1260
|
|
- for (uint8_t i = MAX6675_READ_BYTES; i--;) {
|
|
1258
|
+ for (uint8_t i = sizeof(max6675_temp); i--;) {
|
1261
|
1259
|
SPDR = 0;
|
1262
|
1260
|
for (;!TEST(SPSR, SPIF););
|
1263
|
1261
|
max6675_temp |= SPDR;
|