Browse Source

HAL/serial followup

vanilla_fb_2.0.x
Scott Lahteine 4 years ago
parent
commit
bfa6cd3693
  1. 1
      Marlin/src/HAL/AVR/HAL.h
  2. 2
      Marlin/src/HAL/SAMD51/HAL.h
  3. 2
      Marlin/src/HAL/STM32F1/HAL.h
  4. 2
      Marlin/src/HAL/TEENSY40_41/HAL.h
  5. 6
      Marlin/src/lcd/extui/lib/anycubic_i3mega/anycubic_i3mega_lcd.cpp
  6. 6
      Marlin/src/lcd/extui/malyan_lcd.cpp

1
Marlin/src/HAL/AVR/HAL.h

@ -86,7 +86,6 @@ typedef int8_t pin_t;
#if !WITHIN(SERIAL_PORT, -1, 3)
#error "SERIAL_PORT must be from -1 to 3. Please update your configuration."
#endif
#define MYSERIAL0 customizedSerial1
#ifdef SERIAL_PORT_2

2
Marlin/src/HAL/SAMD51/HAL.h

@ -50,7 +50,7 @@
#if SERIAL_PORT_2 == -1
#define MYSERIAL1 Serial
#elif WITHIN(SERIAL_PORT_2, 0, 3)
#define MYSERIAL0 MSERIAL(SERIAL_PORT_2)
#define MYSERIAL1 MSERIAL(SERIAL_PORT_2)
#else
#error "SERIAL_PORT_2 must be from -1 to 3. Please update your configuration."
#endif

2
Marlin/src/HAL/STM32F1/HAL.h

@ -108,7 +108,7 @@
#endif
#endif
#ifdef DGUS_SERIAL
#ifdef DGUS_SERIAL_PORT
#if DGUS_SERIAL_PORT == 0
#error "DGUS_SERIAL_PORT cannot be 0. (Port 0 does not exist.) Please update your configuration."
#elif DGUS_SERIAL_PORT == SERIAL_PORT

2
Marlin/src/HAL/TEENSY40_41/HAL.h

@ -66,7 +66,7 @@
#if SERIAL_PORT_2 == -1
#define MYSERIAL1 usbSerial
#elif WITHIN(SERIAL_PORT_2, 0, 8)
#define MYSERIAL0 MSERIAL(SERIAL_PORT_2)
#define MYSERIAL1 MSERIAL(SERIAL_PORT_2)
#else
#error "SERIAL_PORT_2 must be from -1 to 8. Please update your configuration."
#endif

6
Marlin/src/lcd/extui/lib/anycubic_i3mega/anycubic_i3mega_lcd.cpp

@ -113,7 +113,11 @@ static void sendLine_P(PGM_P str) {
AnycubicTFTClass::AnycubicTFTClass() {}
void AnycubicTFTClass::OnSetup() {
ANYCUBIC_LCD_SERIAL.begin(115200);
#ifndef LCD_BAUDRATE
#define LCD_BAUDRATE 115200
#endif
LCD_SERIAL.begin(LCD_BAUDRATE);
SENDLINE_DBG_PGM("J17", "TFT Serial Debug: Main board reset... J17"); // J17 Main board reset
ExtUI::delay_ms(10);

6
Marlin/src/lcd/extui/malyan_lcd.cpp

@ -428,7 +428,11 @@ namespace ExtUI {
* it and translate into ExtUI operations where possible.
*/
inbound_count = 0;
LCD_SERIAL.begin(500000);
#ifndef LCD_BAUDRATE
#define LCD_BAUDRATE 500000
#endif
LCD_SERIAL.begin(LCD_BAUDRATE);
// Signal init
write_to_lcd_P(PSTR("{SYS:STARTED}\r\n"));

Loading…
Cancel
Save