mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-12-23 21:01:25 +01:00
STM32F412ZG/F446ZE serial support update
This commit is contained in:
parent
984fd2fa08
commit
913f0a0c86
@ -28,13 +28,9 @@
|
|||||||
// This is to avoid repetition and duplication.
|
// This is to avoid repetition and duplication.
|
||||||
#ifdef ARDUINO_ARCH_STM32
|
#ifdef ARDUINO_ARCH_STM32
|
||||||
|
|
||||||
#include "FSH.h" //PMA temp debug
|
|
||||||
#include "DIAG.h" //PMA temp debug
|
|
||||||
#include "DCCTimer.h"
|
#include "DCCTimer.h"
|
||||||
|
|
||||||
#define STM32F411RE // PMA - ideally this ought to be derived from within the STM32 support somehow
|
#if defined(ARDUINO_NUCLEO_F411RE)
|
||||||
|
|
||||||
#if defined(STM32F411RE)
|
|
||||||
// STM32F411RE doesn't have Serial1 defined by default
|
// STM32F411RE doesn't have Serial1 defined by default
|
||||||
HardwareSerial Serial1(PB7, PA15); // Rx=PB7, Tx=PA15 -- CN7 pins 17 and 21 - F411RE
|
HardwareSerial Serial1(PB7, PA15); // Rx=PB7, Tx=PA15 -- CN7 pins 17 and 21 - F411RE
|
||||||
// Serial2 is defined to use USART2 by default, but is in fact used as the diag console
|
// Serial2 is defined to use USART2 by default, but is in fact used as the diag console
|
||||||
@ -42,9 +38,9 @@ HardwareSerial Serial1(PB7, PA15); // Rx=PB7, Tx=PA15 -- CN7 pins 17 and 21 - F
|
|||||||
// for other DCC-EX uses like WiFi, DFPlayer, etc.
|
// for other DCC-EX uses like WiFi, DFPlayer, etc.
|
||||||
// Let's define Serial6 as an additional serial port (the only other option for the F411RE)
|
// Let's define Serial6 as an additional serial port (the only other option for the F411RE)
|
||||||
HardwareSerial Serial6(PA12, PA11); // Rx=PA12, Tx=PA11 -- CN10 pins 12 and 14 - F411RE
|
HardwareSerial Serial6(PA12, PA11); // Rx=PA12, Tx=PA11 -- CN10 pins 12 and 14 - F411RE
|
||||||
#elif defined(STM32F446ZE)
|
#elif defined(ARDUINO_BLAH_F412ZG) || defined(ARDUINO_NUCLEO_F412ZG) || defined(ARDUINO_NUCLEO_F446ZE)
|
||||||
// STM32F446ZE doesn't have Serial1 defined by default
|
// Nucleo-144 boards don't have Serial1 defined by default
|
||||||
HardwareSerial Serial1(PG9, PG14); // Rx=PG9, Tx=PG14 -- D0, D1 - F446ZE
|
HardwareSerial Serial1(PG9, PG14); // Rx=PG9, Tx=PG14 -- D0, D1 - F412ZG/F446ZE
|
||||||
#else
|
#else
|
||||||
#warning Serial1 not defined
|
#warning Serial1 not defined
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user