-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/dmaspi multi buffer #41
Open
ahoenerBE
wants to merge
14
commits into
adafruit:master
Choose a base branch
from
boston-engineering:feature/dmaspi-multi-buffer
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Feature/dmaspi multi buffer #41
ahoenerBE
wants to merge
14
commits into
adafruit:master
from
boston-engineering:feature/dmaspi-multi-buffer
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Added function to manually set SPI Speed. Added drawPixelsArea to make up for the lack of a bounded draw in the RA8875
…thod that reuses frames, if the operation will allow. Significantly improves performance.
… slower SPI speeds. A timing difference put the CS pin up too quickly, resulting in the loss of data over the line
ahoenerBE
force-pushed
the
feature/dmaspi-multi-buffer
branch
from
June 30, 2021 18:02
4b8aeef
to
82bc88d
Compare
Ping for review on this? |
hiya, with a cursory look - could you split out the DMA handling to another library? its so platform specific it will need updating often and will need its own maintenance cycles. we're worried it will break this (old, but so far dependable) library |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 primary feature of this PR is the addition of library code to support the DMA controller of various Arduino devices.
Currently the only implementation defined is for the Arduino Due, but there are config options to allow for fallback to the default Arduino SPI class.
Additionally this PR provides a new non-DMA method
drawPixelsArea
to support drawing a rectangle of pixels to the screen (which to my knowledge the library doesn't currently support.All the changes should allow the RA8875 to work better with libraries like LVGL that refresh portions of the screen at a time.
Changes & Scope
drawPixelsArea
to allow redrawing of a specific rect on the screen from a pixel buffer. Makes it a lot easier to use LVGL, even in blocking SPI mode.drawPixelsAreaDMA
as an alternative todrawPixelsArea
when DMA is enabled. Also addeddrawPixelsDMASlow
for testing purposes. The slow one recreates its frames every time the delegate callback is called, the normal one only creates the frames once and then updates specific portions to save time.Limitations
RingBuffer.h
and changeSERIAL_BUFFER_SIZE
to be>=128
.Examples
An example has been provided at
examples/dma_squares/dma_squares.ino
. It should draw a series of colored squares across the screen using the chosen drawing function.Partially fixes #39, the
drawPixelsArea
method makes using this driver with LVGL a lot easier, but the real speed increase comes from using an MCU with DMA capabilities, like the Due. If the clock is high enough it can work though.Fixes #40