mirror of https://github.com/periph/devices
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
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> |
4 years ago | |
|---|---|---|
| .. | ||
| controller.go | 4 years ago | |
| controller_test.go | 4 years ago | |
| doc.go | 4 years ago | |
| drawing.go | 4 years ago | |
| drawing_test.go | 4 years ago | |
| errorhandler.go | 4 years ago | |
| example_test.go | 5 years ago | |
| waveshare213v2.go | 4 years ago | |