Skip to content

Commit a41db91

Browse files
committed
Added panelState for deep sleep
1 parent 8b92e15 commit a41db91

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

src/boards/Inkplate2.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ bool Inkplate::begin()
145145
sendCommand(0x50); // VCOM and data interval setting
146146
sendData(0x77); // WBmode:VBDF 17|D7 VBDW 97 VBDB 57 WBRmode:VBDF F7 VBDW 77 VBDB 37 VBDR B7
147147

148+
_panelState = true;
148149
return true;
149150
}
150151

@@ -224,6 +225,8 @@ void Inkplate::setPanelDeepSleep(bool _state)
224225
pinMode(EPAPER_BUSY_PIN, INPUT);
225226
pinMode(EPAPER_CLK, INPUT);
226227
pinMode(EPAPER_DIN, INPUT);
228+
229+
_panelState = false;
227230
}
228231
}
229232

src/boards/Inkplate4.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ bool Inkplate::begin()
131131
if (!waitForEpd(BUSY_TIMEOUT_MS))
132132
return 0; // Waiting for the electronic paper IC to release the idle signal
133133

134+
_panelState = true;
134135
return true;
135136
}
136137

@@ -211,6 +212,8 @@ void Inkplate::setPanelDeepSleep(bool _state)
211212
pinMode(EPAPER_BUSY_PIN, INPUT);
212213
pinMode(EPAPER_CLK, INPUT);
213214
pinMode(EPAPER_DIN, INPUT);
215+
216+
_panelState = false;
214217
}
215218
}
216219

src/boards/Inkplate7.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,8 @@ void Inkplate::setPanelDeepSleep(bool _state)
175175

176176
// Wait until ePaper is ready (power on is complete)
177177
waitForEpd(BUSY_TIMEOUT_MS);
178+
179+
_panelState = true;
178180
}
179181
else
180182
{
@@ -200,6 +202,8 @@ void Inkplate::setPanelDeepSleep(bool _state)
200202
pinMode(EPAPER_BUSY_PIN, INPUT);
201203
pinMode(EPAPER_CLK, INPUT);
202204
pinMode(EPAPER_DIN, INPUT);
205+
206+
_panelState = false;
203207
}
204208
}
205209

0 commit comments

Comments
 (0)