Apply AUTO_POWER_CONTROL later in setup() (#21193)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
This commit is contained in:
parent
969268166e
commit
6e1c133e33
|
@ -915,12 +915,6 @@ void setup() {
|
||||||
OUT_WRITE(SUICIDE_PIN, !SUICIDE_PIN_INVERTING);
|
OUT_WRITE(SUICIDE_PIN, !SUICIDE_PIN_INVERTING);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ENABLED(PSU_CONTROL)
|
|
||||||
SETUP_LOG("PSU_CONTROL");
|
|
||||||
powersupply_on = ENABLED(PSU_DEFAULT_OFF);
|
|
||||||
if (ENABLED(PSU_DEFAULT_OFF)) PSU_OFF(); else PSU_ON();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if EITHER(DISABLE_DEBUG, DISABLE_JTAG)
|
#if EITHER(DISABLE_DEBUG, DISABLE_JTAG)
|
||||||
// Disable any hardware debug to free up pins for IO
|
// Disable any hardware debug to free up pins for IO
|
||||||
#if ENABLED(DISABLE_DEBUG) && defined(JTAGSWD_DISABLE)
|
#if ENABLED(DISABLE_DEBUG) && defined(JTAGSWD_DISABLE)
|
||||||
|
@ -951,10 +945,6 @@ void setup() {
|
||||||
OUT_WRITE(MAX6675_SS2_PIN, HIGH); // Disable
|
OUT_WRITE(MAX6675_SS2_PIN, HIGH); // Disable
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if HAS_L64XX
|
|
||||||
SETUP_RUN(L64xxManager.init()); // Set up SPI, init drivers
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if ENABLED(DUET_SMART_EFFECTOR) && PIN_EXISTS(SMART_EFFECTOR_MOD)
|
#if ENABLED(DUET_SMART_EFFECTOR) && PIN_EXISTS(SMART_EFFECTOR_MOD)
|
||||||
OUT_WRITE(SMART_EFFECTOR_MOD_PIN, LOW); // Put Smart Effector into NORMAL mode
|
OUT_WRITE(SMART_EFFECTOR_MOD_PIN, LOW); // Put Smart Effector into NORMAL mode
|
||||||
#endif
|
#endif
|
||||||
|
@ -963,10 +953,20 @@ void setup() {
|
||||||
SETUP_RUN(runout.setup());
|
SETUP_RUN(runout.setup());
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if ENABLED(PSU_CONTROL)
|
||||||
|
SETUP_LOG("PSU_CONTROL");
|
||||||
|
powersupply_on = ENABLED(PSU_DEFAULT_OFF);
|
||||||
|
if (ENABLED(PSU_DEFAULT_OFF)) PSU_OFF(); else PSU_ON();
|
||||||
|
#endif
|
||||||
|
|
||||||
#if ENABLED(POWER_LOSS_RECOVERY)
|
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||||
SETUP_RUN(recovery.setup());
|
SETUP_RUN(recovery.setup());
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if HAS_L64XX
|
||||||
|
SETUP_RUN(L64xxManager.init()); // Set up SPI, init drivers
|
||||||
|
#endif
|
||||||
|
|
||||||
#if HAS_TMC220x
|
#if HAS_TMC220x
|
||||||
SETUP_RUN(tmc_serial_begin());
|
SETUP_RUN(tmc_serial_begin());
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue