From 95c1b7fb31b1f22d6d330fa8ce7432adf6c80d6d Mon Sep 17 00:00:00 2001 From: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Sat, 13 Jul 2024 10:18:47 -0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20USART6=20for=20STM32,=20expand?= =?UTF-8?q?=20port=20range=20(#27262)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/Configuration.h | 8 ++++---- Marlin/src/HAL/STM32/MarlinSerial.cpp | 3 +++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 837716120d1e..fc0f73014c19 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -77,7 +77,7 @@ * Serial port -1 is the USB emulated serial port, if available. * Note: The first serial port (-1 or 0) will always be used by the Arduino bootloader. * - * :[-1, 0, 1, 2, 3, 4, 5, 6, 7] + * :[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9] */ #define SERIAL_PORT 0 @@ -99,7 +99,7 @@ /** * Select a secondary serial port on the board to use for communication with the host. * Currently Ethernet (-2) is only supported on Teensy 4.1 boards. - * :[-2, -1, 0, 1, 2, 3, 4, 5, 6, 7] + * :[-2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9] */ //#define SERIAL_PORT_2 -1 //#define BAUDRATE_2 250000 // :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000] Enable to override BAUDRATE @@ -107,14 +107,14 @@ /** * Select a third serial port on the board to use for communication with the host. * Currently only supported for AVR, DUE, LPC1768/9 and STM32/STM32F1 - * :[-1, 0, 1, 2, 3, 4, 5, 6, 7] + * :[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9] */ //#define SERIAL_PORT_3 1 //#define BAUDRATE_3 250000 // :[2400, 9600, 19200, 38400, 57600, 115200, 250000, 500000, 1000000] Enable to override BAUDRATE /** * Select a serial port to communicate with RS485 protocol - * :[-1, 0, 1, 2, 3, 4, 5, 6, 7] + * :[-1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9] */ //#define RS485_SERIAL_PORT 1 #ifdef RS485_SERIAL_PORT diff --git a/Marlin/src/HAL/STM32/MarlinSerial.cpp b/Marlin/src/HAL/STM32/MarlinSerial.cpp index c4bc62994908..862678373fb1 100644 --- a/Marlin/src/HAL/STM32/MarlinSerial.cpp +++ b/Marlin/src/HAL/STM32/MarlinSerial.cpp @@ -37,6 +37,9 @@ #ifndef USART5 #define USART5 UART5 #endif +#ifndef USART6 + #define USART6 UART6 +#endif #ifndef USART7 #define USART7 UART7 #endif