Skip to content

Commit fc07718

Browse files
committed
Remove log_* statements which are not available in ESP8266 and write explicit initaliziation of linebuffer
1 parent a32039a commit fc07718

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

src/EPD_WaveShare_154D67.cpp

+11-7
Original file line numberDiff line numberDiff line change
@@ -200,14 +200,14 @@ int EPD_WaveShare154D67::Init() {
200200
if (IfInit() != 0) {
201201
return -1;
202202
}
203-
log_v("Time before HW reset: %d", millis());
203+
204204
/* EPD hardware init start */
205205
Reset();
206-
log_v("Time before SW reset: %d", millis());
206+
207207
WaitUntilIdle();
208208
SendCommand(0x12); //SWRESET
209209
WaitUntilIdle();
210-
log_v("Time SW init : %d", millis());
210+
211211
SendCommand(0x01); //Driver output control
212212
SendData(0xC7);
213213
SendData(0x00);
@@ -238,15 +238,15 @@ int EPD_WaveShare154D67::Init() {
238238
SendCommand(0x4F); // set RAM y address count to 0X199;
239239
SendData(0xC7);
240240
SendData(0x00);
241-
log_v("Time after SW init: %d", millis());
241+
242242
WaitUntilIdle();
243-
log_v("Time after wait until idle: %d", millis());
243+
244244
if (isInitialRefresh) {
245245
fillRam(0x24, 0x00);
246246
fillRam(0x26, 0x00);
247247
isInitialRefresh = false;
248248
}
249-
log_v("Time end init: %d", millis());
249+
250250
return 0;
251251
}
252252

@@ -367,7 +367,11 @@ void EPD_WaveShare154D67::SetMemoryPointer(int x, int y) {
367367
void EPD_WaveShare154D67::fillRam(uint8_t command, uint8_t value) {
368368
uint32_t ramLines = EPD_HEIGHT;
369369
uint32_t bytesPerLine = EPD_WIDTH >> 3;
370-
uint8_t lineBuffer[bytesPerLine] = {value};
370+
uint8_t lineBuffer[bytesPerLine];
371+
for (uint16_t i = 0; i < bytesPerLine; i++) {
372+
lineBuffer[i] = value;
373+
}
374+
371375
SendCommand(command);
372376

373377
for (int i = 0; i < ramLines; i++) {

0 commit comments

Comments
 (0)