Don't create unused Serial Port instances (#21066)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
This commit is contained in:
committed by
Scott Lahteine
parent
69fcd9210f
commit
8ec86b810d
@@ -25,8 +25,21 @@
|
||||
#include <wiring_private.h>
|
||||
|
||||
#ifdef ADAFRUIT_GRAND_CENTRAL_M4
|
||||
DefaultSerial MSerial(false, Serial);
|
||||
DefaultSerial1 MSerial1(false, Serial1);
|
||||
#if ANY_SERIAL_IS(-1)
|
||||
DefaultSerial MSerial(false, Serial);
|
||||
#endif
|
||||
#if ANY_SERIAL_IS(0)
|
||||
DefaultSerial1 MSerial1(false, Serial1);
|
||||
#endif
|
||||
#if ANY_SERIAL_IS(1)
|
||||
DefaultSerial2 MSerial2(false, Serial2);
|
||||
#endif
|
||||
#if ANY_SERIAL_IS(2)
|
||||
DefaultSerial3 MSerial3(false, Serial3);
|
||||
#endif
|
||||
#if ANY_SERIAL_IS(3)
|
||||
DefaultSerial4 MSerial4(false, Serial4);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// ------------------------
|
||||
|
||||
Reference in New Issue
Block a user