Browse Source

Remove extraneous Serial init (#16794)

pull/1/head
Robby Candra 5 years ago
committed by GitHub
parent
commit
86812432f3
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 9
      Marlin/src/HAL/HAL_LPC1768/main.cpp
  2. 7
      Marlin/src/MarlinCore.cpp

9
Marlin/src/HAL/HAL_LPC1768/main.cpp

@ -136,15 +136,6 @@ void HAL_init() {
#endif #endif
} }
#if NUM_SERIAL > 0
MYSERIAL0.begin(BAUDRATE);
#if NUM_SERIAL > 1
MYSERIAL1.begin(BAUDRATE);
#endif
SERIAL_PRINTF("\n\necho:%s (%dMhz) Initialized\n", isLPC1769() ? "LPC1769" : "LPC1768", SystemCoreClock / 1000000);
SERIAL_FLUSHTX();
#endif
HAL_timer_init(); HAL_timer_init();
} }

7
Marlin/src/MarlinCore.cpp

@ -880,15 +880,10 @@ void setup() {
#if NUM_SERIAL > 0 #if NUM_SERIAL > 0
MYSERIAL0.begin(BAUDRATE); MYSERIAL0.begin(BAUDRATE);
#if NUM_SERIAL > 1
MYSERIAL1.begin(BAUDRATE);
#endif
#endif
#if NUM_SERIAL > 0
uint32_t serial_connect_timeout = millis() + 1000UL; uint32_t serial_connect_timeout = millis() + 1000UL;
while (!MYSERIAL0 && PENDING(millis(), serial_connect_timeout)) { /*nada*/ } while (!MYSERIAL0 && PENDING(millis(), serial_connect_timeout)) { /*nada*/ }
#if NUM_SERIAL > 1 #if NUM_SERIAL > 1
MYSERIAL1.begin(BAUDRATE);
serial_connect_timeout = millis() + 1000UL; serial_connect_timeout = millis() + 1000UL;
while (!MYSERIAL1 && PENDING(millis(), serial_connect_timeout)) { /*nada*/ } while (!MYSERIAL1 && PENDING(millis(), serial_connect_timeout)) { /*nada*/ }
#endif #endif

Loading…
Cancel
Save