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.
devices/waveshare2in13v2
Michael Hanselmann 4f995754b0 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>
4 years ago
..
controller.go waveshare213v2: Move initialization to testable functions 4 years ago
controller_test.go waveshare213v2: Move initialization to testable functions 4 years ago
doc.go waveshare2in13v2: Amend documentation with note on GDEH0213B73 4 years ago
drawing.go waveshare213v2: Keep display contents in shadow buffer 4 years ago
drawing_test.go waveshare213v2: Keep display contents in shadow buffer 4 years ago
errorhandler.go waveshare213v2: Make busy a PinIn, use WaitForEdge 4 years ago
example_test.go Remove dependencies on fogleman/gg and golang/freetype (#28) 5 years ago
waveshare213v2.go waveshare213v2: Keep display contents in shadow buffer 4 years ago