|
@@ -1138,10 +1138,12 @@ void Temperature::disable_all_heaters() {
|
1138
|
1138
|
uint32_t max6675_temp = 2000;
|
1139
|
1139
|
#define MAX6675_ERROR_MASK 7
|
1140
|
1140
|
#define MAX6675_DISCARD_BITS 18
|
|
1141
|
+ #define MAX6675_SPEED_BITS (_BV(SPR1)) // clock ÷ 64
|
1141
|
1142
|
#else
|
1142
|
1143
|
uint16_t max6675_temp = 2000;
|
1143
|
1144
|
#define MAX6675_ERROR_MASK 4
|
1144
|
1145
|
#define MAX6675_DISCARD_BITS 3
|
|
1146
|
+ #define MAX6675_SPEED_BITS (_BV(SPR0)) // clock ÷ 16
|
1145
|
1147
|
#endif
|
1146
|
1148
|
|
1147
|
1149
|
int Temperature::read_max6675() {
|
|
@@ -1161,7 +1163,7 @@ void Temperature::disable_all_heaters() {
|
1161
|
1163
|
PRR0
|
1162
|
1164
|
#endif
|
1163
|
1165
|
, PRSPI);
|
1164
|
|
- SPCR = _BV(MSTR) | _BV(SPE) | _BV(SPR0);
|
|
1166
|
+ SPCR = _BV(MSTR) | _BV(SPE) | MAX6675_SPEED_BITS;
|
1165
|
1167
|
|
1166
|
1168
|
WRITE(MAX6675_SS, 0); // enable TT_MAX6675
|
1167
|
1169
|
|