Skip to content

Commit b542e6a

Browse files
Specify NUM_SERIAL_PORTS for non-AVR targets
For AVR-targets, this value is autodetected based on the MCU type, but for other targets it must be explicitly specified.
1 parent 78fc987 commit b542e6a

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

misc/default.yml

+9
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ platforms:
3737
- __SAM3X8E__
3838
- ARDUINO_ARCH_SAM
3939
- ARDUINO_SAM_DUE
40+
- NUM_SERIAL_PORTS=4
4041
warnings:
4142
flags:
4243
zero:
@@ -48,6 +49,8 @@ platforms:
4849
- __SAMD21G18A__
4950
- ARDUINO_ARCH_SAMD
5051
- ARDUINO_SAMD_ZERO
52+
# This also has SerialUSB, which is not included here.
53+
- NUM_SERIAL_PORTS=2
5154
warnings:
5255
flags:
5356
esp32:
@@ -59,6 +62,7 @@ platforms:
5962
- ESP32
6063
- ARDUINO_ARCH_ESP32
6164
- ARDUINO_FEATHER_ESP32
65+
- NUM_SERIAL_PORTS=3
6266
warnings:
6367
flags:
6468
esp8266:
@@ -70,6 +74,7 @@ platforms:
7074
- ESP8266
7175
- ARDUINO_ARCH_ESP8266
7276
- ARDUINO_ESP8266_ESP12
77+
- NUM_SERIAL_PORTS=2
7378
warnings:
7479
flags:
7580
leonardo:
@@ -118,6 +123,8 @@ platforms:
118123
- __SAMD51J19A__
119124
- ARDUINO_ARCH_SAMD
120125
- ARDUINO_METRO_M4
126+
# Serial is actually USB virtual serial, not HardwareSerial
127+
- NUM_SERIAL_PORTS=2
121128
warnings:
122129
flags:
123130
mega2560:
@@ -153,6 +160,8 @@ platforms:
153160
- __SAMD21G18A__
154161
- ARDUINO_ARCH_SAMD
155162
- ARDUINO_SAMD_CIRCUITPLAYGROUND_EXPRESS
163+
# Serial is actually an alias of SerialUSB, not a HardwareSerial
164+
- NUM_SERIAL_PORTS=2
156165
warnings:
157166
flags:
158167

0 commit comments

Comments
 (0)