Browse Source

HAL/serial followup

Scott Lahteine 4 years ago
parent
commit
568f292883

+ 0
- 1
Marlin/src/HAL/AVR/HAL.h View File

86
   #if !WITHIN(SERIAL_PORT, -1, 3)
86
   #if !WITHIN(SERIAL_PORT, -1, 3)
87
     #error "SERIAL_PORT must be from -1 to 3. Please update your configuration."
87
     #error "SERIAL_PORT must be from -1 to 3. Please update your configuration."
88
   #endif
88
   #endif
89
-
90
   #define MYSERIAL0 customizedSerial1
89
   #define MYSERIAL0 customizedSerial1
91
 
90
 
92
   #ifdef SERIAL_PORT_2
91
   #ifdef SERIAL_PORT_2

+ 1
- 1
Marlin/src/HAL/SAMD51/HAL.h View File

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

+ 1
- 1
Marlin/src/HAL/STM32F1/HAL.h View File

108
   #endif
108
   #endif
109
 #endif
109
 #endif
110
 
110
 
111
-#ifdef DGUS_SERIAL
111
+#ifdef DGUS_SERIAL_PORT
112
   #if DGUS_SERIAL_PORT == 0
112
   #if DGUS_SERIAL_PORT == 0
113
     #error "DGUS_SERIAL_PORT cannot be 0. (Port 0 does not exist.) Please update your configuration."
113
     #error "DGUS_SERIAL_PORT cannot be 0. (Port 0 does not exist.) Please update your configuration."
114
   #elif DGUS_SERIAL_PORT == SERIAL_PORT
114
   #elif DGUS_SERIAL_PORT == SERIAL_PORT

+ 1
- 1
Marlin/src/HAL/TEENSY40_41/HAL.h View File

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

+ 5
- 1
Marlin/src/lcd/extui/lib/anycubic_i3mega/anycubic_i3mega_lcd.cpp View File

113
 AnycubicTFTClass::AnycubicTFTClass() {}
113
 AnycubicTFTClass::AnycubicTFTClass() {}
114
 
114
 
115
 void AnycubicTFTClass::OnSetup() {
115
 void AnycubicTFTClass::OnSetup() {
116
-  ANYCUBIC_LCD_SERIAL.begin(115200);
116
+  #ifndef LCD_BAUDRATE
117
+    #define LCD_BAUDRATE 115200
118
+  #endif
119
+  LCD_SERIAL.begin(LCD_BAUDRATE);
120
+
117
   SENDLINE_DBG_PGM("J17", "TFT Serial Debug: Main board reset... J17"); // J17 Main board reset
121
   SENDLINE_DBG_PGM("J17", "TFT Serial Debug: Main board reset... J17"); // J17 Main board reset
118
   ExtUI::delay_ms(10);
122
   ExtUI::delay_ms(10);
119
 
123
 

+ 5
- 1
Marlin/src/lcd/extui/malyan_lcd.cpp View File

428
      * it and translate into ExtUI operations where possible.
428
      * it and translate into ExtUI operations where possible.
429
      */
429
      */
430
     inbound_count = 0;
430
     inbound_count = 0;
431
-    LCD_SERIAL.begin(500000);
431
+
432
+    #ifndef LCD_BAUDRATE
433
+      #define LCD_BAUDRATE 500000
434
+    #endif
435
+    LCD_SERIAL.begin(LCD_BAUDRATE);
432
 
436
 
433
     // Signal init
437
     // Signal init
434
     write_to_lcd_P(PSTR("{SYS:STARTED}\r\n"));
438
     write_to_lcd_P(PSTR("{SYS:STARTED}\r\n"));

Loading…
Cancel
Save