HAL/serial followup

This commit is contained in:
Scott Lahteine 2020-09-23 21:36:31 -05:00
parent f588d50d57
commit bfa6cd3693
6 changed files with 13 additions and 6 deletions

View file

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

View file

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

View file

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

View file

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

View file

@ -113,7 +113,11 @@ static void sendLine_P(PGM_P str) {
AnycubicTFTClass::AnycubicTFTClass() {} AnycubicTFTClass::AnycubicTFTClass() {}
void AnycubicTFTClass::OnSetup() { 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 SENDLINE_DBG_PGM("J17", "TFT Serial Debug: Main board reset... J17"); // J17 Main board reset
ExtUI::delay_ms(10); ExtUI::delay_ms(10);

View file

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