-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
waveshare213v2: Keep display contents in shadow buffer
This is necessary for partial updates of the display--not just incremental updates of the full display, but updating part of the display in general. On the horizontal axis only whole bytes can be written, so updates need to be aligned to 8 pixels. One option would be to require the caller of Dev.Draw to only operate at multiples of 8. Another would be to read back the contents of bytes to be updated partially and combine the data. According to the datasheet the controller supports that (command 0x27). The simplest option, however, is to maintain a shadow buffer in the driver. Updates are applied to the buffer from which only the changed destination rectangle is sent to the display. The permanent cost is a bit more than 4kB of memory for a 122x250 display while saving on memory allocations for a temporary image buffer on updates. Signed-off-by: Michael Hanselmann <public@hansmi.ch>
- Loading branch information
Showing
3 changed files
with
29 additions
and
28 deletions.
There are no files selected for viewing
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
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
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