Add an example of a compressed DMA frame buffer #2238
Closed
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.
Thank you for your contribution!
We appreciate the time and effort you've put into this pull request.
To help us review it efficiently, please ensure you've gone through the following checklist:
Submission Checklist 📝
cargo xtask fmt-packages
command to ensure that all changed code is formatted correctly.CHANGELOG.md
in the proper section.Extra:
Pull Request Details 📖
Description
Depends on #2191 and #2237.
This example is to showcase what users can do with the
DmaTxBuffer
trait.I've added a "compressed frame buffer" (names hard) which shrinks the space/memory required to store a full solid frame buffer for a 320 * 480 screen, from 307,200 bytes down to just 3,840 bytes. You don't even need PSRAM anymore (Of course for more complex images, just using PSRAM for the full frame buffer would be the better choice).
This example is for I8080 but no reason SPI screens can't use this as well.
It is also particularly useful for #2081, where screens don't typically have a frame buffer and chunking is not possible.
The last commit contains the actual changes.
Testing
Ran the example on my devkit.