Skip to content

Commit

Permalink
allow disabling global Serial and Serial1 object (#2807)
Browse files Browse the repository at this point in the history
allow the user to disable specific global `Serial` objects to save
memory.

that's 0x1c bytes per object.
  • Loading branch information
Palatis authored and devyte committed Dec 29, 2017
1 parent 2880354 commit 2b868aa
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cores/esp8266/HardwareSerial.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 2b868aa

Please sign in to comment.