Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a quite large Code restructure, as well as adding a simple text widget.
The code assumes that the 'blit' function is the core function of the display code, this splits the responsibility of rendering to the display into the preparation of the sprite and the placement of the sprite into the display buffer (the blitting). Widgets are the things that prepare the sprites, which are to be placed into the display buffer. This code is a mild refactor of the original code, where most of the text functions are moved into a set of widget functions that operate on a sprite, before having the sprite copied into the display buffer.
The build system has also been reworked so as to place the library files into the src directory, the fonts into their own directory (as they are in a sense "data" and not code). and also added an example showing how to use the text widget together with raw (avoiding pico stdio) usb-serial that allows to display text typed on the keyboard on the ssd1306.
Besides this there are some small tweaks in the display struct creation macro.