Don't create unused Serial Port instances (#21066)

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
This commit is contained in:
Giuliano Zaro
2021-02-14 04:04:22 +01:00
committed by GitHub
parent 98a27bff0d
commit 8fd88eee2b
4 changed files with 37 additions and 11 deletions

View File

@@ -33,9 +33,15 @@
// Serial ports
typedef ForwardSerial0Type< decltype(Serial) > DefaultSerial;
extern DefaultSerial MSerial;
typedef ForwardSerial0Type< decltype(Serial1) > DefaultSerial1;
typedef ForwardSerial0Type< decltype(Serial2) > DefaultSerial2;
typedef ForwardSerial0Type< decltype(Serial3) > DefaultSerial3;
typedef ForwardSerial0Type< decltype(Serial4) > DefaultSerial4;
extern DefaultSerial MSerial;
extern DefaultSerial1 MSerial1;
extern DefaultSerial2 MSerial2;
extern DefaultSerial3 MSerial3;
extern DefaultSerial4 MSerial4;
// MYSERIAL0 required before MarlinSerial includes!