Commit Graph

4 Commits (8bd1a8681ad55aa209c1fa28e3be4f7dbd77800c)

Author SHA1 Message Date
Michael Hanselmann 648f44a621 waveshare213v2: Allow changing update mode without re-initialization
It's perfectly acceptable to update a display in full mode before
switching to partial mode and vice-versa. There's no need for a full
soft-reset in-between.

This change breaks the API: the "Init" function no longer receives
a parameter. The default is to always start in the full update mode.

Signed-off-by: Michael Hanselmann <public@hansmi.ch>
4 years ago
hansmi d09d487465
Remove dependencies on fogleman/gg and golang/freetype (#28)
The waveshare2in13v2 example was evidently copied from the epd example,
but didn't comment out the code pulling in additional dependencies.
5 years ago
hansmi d92a4ed45d
waveshare2in13v2: Add constants, add missing init to example (#25)
Avoid using strconv.Itoa
fmt.Sprintf() can format numbers directly using the "%d" format
specifier.

Call Dev.Init in example code
Without initializing the hardware nothing is shown on the display.

Add constants for commands
Translate the command names from the datasheet into constant names,
similar to `epd/epd.go`. These names make it easier to understand what
the driver does.

One command, 0x37, is not documented in any of the datasheets available
(Waveshare 2.13inch e-Paper, Good Display GDEH0213B72).

Signed-off-by: Michael Hanselmann <public@hansmi.ch>
5 years ago
Dan Kortschak 960e8d343b
waveshare2in13v2: add example (#8) 5 years ago