8000 Use consistent naming for Serial interfaces · arduino/ArduinoCore-mbed@3573539 · GitHub
[go: up one dir, main page]

Skip to content

Commit 3573539

Browse files
committed
Use consistent naming for Serial interfaces
After a discussion with @hpssjellis I concluded that it's confusing the map the serial interfaces to different UART port depending on the core. It's probably more understandable if the M4 doesn't support `Serial` for now, or to map it also to _UART1_. In the future we can add support for `Serial` to the M4 by piping the messages to the M7.
1 parent bad8e6d commit 3573539

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

cores/arduino/Arduino.h

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -127,19 +127,16 @@ extern analogin_config_t adcCurrentConfig;
127127
#endif
128128

129129
#include "Serial.h"
130+
130131
#if defined(SERIAL_CDC)
131132
#include "USB/PluggableUSBSerial.h"
132133
#define Serial SerialUSB
134+
#endif
135+
133136
#define Serial1 _UART1_
134137
#define Serial2 _UART2_
135138
#define Serial3 _UART3_
136139
#define Serial4 _UART4_
137-
#else
138-
#define Serial _UART1_
139-
#define Serial1 _UART2_
140-
#define Serial2 _UART3_
141-
#define Serial3 _UART4_
142-
#endif
143140

144141
#include "overloads.h"
145142
#endif

0 commit comments

Comments
 (0)
0