|
@ -1799,22 +1799,7 @@ void Temperature::init() { |
|
|
INIT_FAN_PIN(CONTROLLER_FAN_PIN); |
|
|
INIT_FAN_PIN(CONTROLLER_FAN_PIN); |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
#if MAX6675_SEPARATE_SPI |
|
|
TERN_(MAX6675_SEPARATE_SPI, max6675_spi.init()); |
|
|
|
|
|
|
|
|
OUT_WRITE(SCK_PIN, LOW); |
|
|
|
|
|
OUT_WRITE(MOSI_PIN, HIGH); |
|
|
|
|
|
SET_INPUT_PULLUP(MISO_PIN); |
|
|
|
|
|
|
|
|
|
|
|
max6675_spi.init(); |
|
|
|
|
|
|
|
|
|
|
|
OUT_WRITE(SS_PIN, HIGH); |
|
|
|
|
|
OUT_WRITE(MAX6675_SS_PIN, HIGH); |
|
|
|
|
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
#if HEATER_1_USES_MAX6675 |
|
|
|
|
|
OUT_WRITE(MAX6675_SS2_PIN, HIGH); |
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
HAL_adc_init(); |
|
|
HAL_adc_init(); |
|
|
|
|
|
|
|
@ -2277,9 +2262,7 @@ void Temperature::disable_all_heaters() { |
|
|
spiInit(MAX6675_SPEED_BITS); |
|
|
spiInit(MAX6675_SPEED_BITS); |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
MAX6675_SET_OUTPUT(); |
|
|
|
|
|
MAX6675_WRITE(LOW); // enable TT_MAX6675
|
|
|
MAX6675_WRITE(LOW); // enable TT_MAX6675
|
|
|
|
|
|
|
|
|
DELAY_NS(100); // Ensure 100ns delay
|
|
|
DELAY_NS(100); // Ensure 100ns delay
|
|
|
|
|
|
|
|
|
// Read a big-endian temperature value
|
|
|
// Read a big-endian temperature value
|
|
|