Closed caternuson closed 2 years ago
Still requires editing library source code though. If there's an easier way, then ignore PR.
It's an interesting question. Here's a thought:
Rely on the linker instead of the preprocessor. The Adafruit_SSD1306::begin
member function is the only thing that references the splash
bitmap. We could have a Adafruit_SSD1306::beginNoSplash
member function that does the same thing as begin
, but doesn't mention splash
. User sketches that call beginNoSplash
instead of begin
would have the splash
bitmap optimized out. The linker aggressively optimizes for space in these toolchains with entity-level granularity, and it omits unused entities from the executable.
Or as a parameter to a new begin()
override?
This PR adds a commented out #def that can be used to disable the splash logo. I think that'll be an easier thing to point to for cases like this: https://forums.adafruit.com/viewtopic.php?f=25&t=187139
Still requires editing library source code though. If there's an easier way, then ignore PR.