Commit Graph

6 Commits (1b894b6f17a3058f08192deee4a22cf5b2aa3382)

Author SHA1 Message Date
Michael Hanselmann df5238c598 waveshare2in13v2: Enable hardware early
Enable the clock and analog parts when configuring the mode. In probably
all use cases a drawing operation is following soon after anyway.
Putting the device to sleep disables these hardware parts again.
4 years ago
Michael Hanselmann 52b148df45 waveshare2in13v2: Document command 0x37 and always apply it
The datasheets of the comparable SSD1680, SSD1675B and GDEH0213B73
controllers describe this command as "Write register for display
option".

Signed-off-by: Michael Hanselmann <public@hansmi.ch>
4 years ago
Michael Hanselmann 0c6b49f898 waveshare213v2: Implement flicker-free partial updates
Update both image buffers (B/W and red) and configure the controller to
only refresh the changed areas. With this change the "DrawPartial"
function becomes equivalent to "Draw" and is thus marked as deprecated.
It didn't really provide additional functionality before as partial
updates weren't truly implemented.

Signed-off-by: Michael Hanselmann <public@hansmi.ch>
4 years ago
Michael Hanselmann be539b05ff waveshare213v2: Move display update to testable function
Signed-off-by: Michael Hanselmann <public@hansmi.ch>
4 years ago
Michael Hanselmann 85bed23e58 waveshare213v2: Unify initialization, separate mode config
Merge the common logic in the "initDisplayFull" and "initDisplayPartial"
functions and separate out the parts related to the display update mode.
In a forthcoming change the update mode will no longer be set when
initializing, but rather via a separate setter function, requiring the
ability to reconfigure the display controller without a full
re-initialization.

Signed-off-by: Michael Hanselmann <public@hansmi.ch>
4 years ago
Michael Hanselmann 6052af94b0 waveshare213v2: Move initialization to testable functions 4 years ago