On-device repro showed the cover snapshot pinning ~52KB of contiguous heap (cloning the full 48KB framebuffer with malloc overhead). MaxAlloc on Home was 61KB; nothing was leaving headroom for HTTPS, which needs 30-50KB contiguous for the mbedTLS handshake. Add region-aware framebuffer helpers to GfxRenderer that translate a logical rect through rotateCoordinates and copy only the byte range that contains the rotated rect. HomeActivity records the tile rect it passes to drawRecentBookCover and caches only that subregion. Measured on device (X3, Portrait): Idle on Home | Free 102K -> 139K | MaxAlloc 61K -> 115K Mid-EPUB-read | Free 81K -> 134K | MaxAlloc 70K -> 115K Cover cache | ~52K -> ~16K (per allocation) Works in all four orientations because the bounds helper samples the four logical corners through the existing rotation, so the cached byte range always covers the pixels the theme could have drawn into. Savings will vary with theme, but should be significant across all.
This directory is intended for project specific (private) libraries.
PlatformIO will compile them to static libraries and link into the executable file.
The source code of each library should be placed in a separate directory
("lib/your_library_name/[Code]").
For example, see the structure of the following example libraries `Foo` and `Bar`:
|--lib
| |
| |--Bar
| | |--docs
| | |--examples
| | |--src
| | |- Bar.c
| | |- Bar.h
| | |- library.json (optional. for custom build options, etc) https://docs.platformio.org/page/librarymanager/config.html
| |
| |--Foo
| | |- Foo.c
| | |- Foo.h
| |
| |- README --> THIS FILE
|
|- platformio.ini
|--src
|- main.c
Example contents of `src/main.c` using Foo and Bar:
```
#include <Foo.h>
#include <Bar.h>
int main (void)
{
...
}
```
The PlatformIO Library Dependency Finder will find automatically dependent
libraries by scanning project source files.
More information about PlatformIO Library Dependency Finder
- https://docs.platformio.org/page/librarymanager/ldf.html