@@ -200,14 +200,14 @@ int EPD_WaveShare154D67::Init() {
200
200
if (IfInit () != 0 ) {
201
201
return -1 ;
202
202
}
203
- log_v ( " Time before HW reset: %d " , millis ());
203
+
204
204
/* EPD hardware init start */
205
205
Reset ();
206
- log_v ( " Time before SW reset: %d " , millis ());
206
+
207
207
WaitUntilIdle ();
208
208
SendCommand (0x12 ); // SWRESET
209
209
WaitUntilIdle ();
210
- log_v ( " Time SW init : %d " , millis ());
210
+
211
211
SendCommand (0x01 ); // Driver output control
212
212
SendData (0xC7 );
213
213
SendData (0x00 );
@@ -238,15 +238,15 @@ int EPD_WaveShare154D67::Init() {
238
238
SendCommand (0x4F ); // set RAM y address count to 0X199;
239
239
SendData (0xC7 );
240
240
SendData (0x00 );
241
- log_v ( " Time after SW init: %d " , millis ());
241
+
242
242
WaitUntilIdle ();
243
- log_v ( " Time after wait until idle: %d " , millis ());
243
+
244
244
if (isInitialRefresh) {
245
245
fillRam (0x24 , 0x00 );
246
246
fillRam (0x26 , 0x00 );
247
247
isInitialRefresh = false ;
248
248
}
249
- log_v ( " Time end init: %d " , millis ());
249
+
250
250
return 0 ;
251
251
}
252
252
@@ -367,7 +367,11 @@ void EPD_WaveShare154D67::SetMemoryPointer(int x, int y) {
367
367
void EPD_WaveShare154D67::fillRam (uint8_t command, uint8_t value) {
368
368
uint32_t ramLines = EPD_HEIGHT;
369
369
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
+
371
375
SendCommand (command);
372
376
373
377
for (int i = 0 ; i < ramLines; i++) {
0 commit comments