mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-06 05:21:22 +03:00
allow disabling global Serial and Serial1 object (#2807)
allow the user to disable specific global `Serial` objects to save memory. that's 0x1c bytes per object.
This commit is contained in:
parent
28803540a2
commit
2b868aac00
@ -180,5 +180,10 @@ HardwareSerial::operator bool() const
|
||||
}
|
||||
|
||||
|
||||
#if !defined(NO_GLOBAL_INSTANCES) && !defined(NO_GLOBAL_SERIAL)
|
||||
HardwareSerial Serial(UART0);
|
||||
#endif
|
||||
#if !defined(NO_GLOBAL_INSTANCES) && !defined(NO_GLOBAL_SERIAL1)
|
||||
HardwareSerial Serial1(UART1);
|
||||
#endif
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user