Browse Source

Fix trying to use serial before it's intiialized

VintagePC 2 năm trước cách đây
mục cha
commit
8eb054e789
1 tập tin đã thay đổi với 6 bổ sung4 xóa
  1. 6 4
      Firmware/Marlin_main.cpp

+ 6 - 4
Firmware/Marlin_main.cpp

@@ -1044,10 +1044,6 @@ void setup()
 {
 	timer2_init(); // enables functional millis
 
-	if (eeprom_read_byte((uint8_t *)EEPROM_MMU_ENABLED))
-    {
-        MMU2::mmu2.Start();
-    }
 
 	ultralcd_init();
 
@@ -1063,6 +1059,12 @@ void setup()
 	fdev_setup_stream(uartout, uart_putchar, NULL, _FDEV_SETUP_WRITE); //setup uart out stream
 	stdout = uartout;
 
+	if (eeprom_read_byte((uint8_t *)EEPROM_MMU_ENABLED))
+    {
+        MMU2::mmu2.Start();
+    }
+
+
 #ifdef XFLASH
     bool xflash_success = xflash_init();
 	uint8_t optiboot_status = 1;