Open
Conversation
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
4b8aeef to
82bc88d
Compare
|
Ping for review on this? |
Member
|
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 |
This file contains hidden or 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
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
drawPixelsAreato 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
drawPixelsAreato 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.drawPixelsAreaDMAas an alternative todrawPixelsAreawhen DMA is enabled. Also addeddrawPixelsDMASlowfor 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.hand changeSERIAL_BUFFER_SIZEto 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
drawPixelsAreamethod 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