We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 14994a3 commit 2c2da5cCopy full SHA for 2c2da5c
waveshare-epd/epd2in13/epd2in13.go
@@ -131,6 +131,17 @@ func (d *Device) DeepSleep() {
131
d.WaitUntilIdle()
132
}
133
134
+// Set the sleep mode of the panel. The display will still show its contents,
135
+// but will go into a lower-power state.
136
+func (d *Device) Sleep(sleepEnabled bool) error {
137
+ if sleepEnabled {
138
+ d.DeepSleep()
139
+ } else {
140
+ d.Reset()
141
+ }
142
+ return nil
143
+}
144
+
145
// SendCommand sends a command to the display
146
func (d *Device) SendCommand(command uint8) {
147
d.sendDataCommand(true, command)
0 commit comments