1
0
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:
Victor Tseng 2017-12-29 22:11:00 +08:00 committed by Develo
parent 28803540a2
commit 2b868aac00

View File

@ -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