()
| 164 | this.updateArea(0, 0, M5EPD_PANEL_W, M5EPD_PANEL_H, mode); |
| 165 | } |
| 166 | checkAFSR() { |
| 167 | const start = Date.now(); |
| 168 | const info = new Array(1); |
| 169 | do { |
| 170 | this.writeCommand(IT8951_TCON_REG_RD); |
| 171 | this.writeWord(IT8951_LUTAFSR); |
| 172 | this.readWords(info); |
| 173 | if (0 === info[0]) |
| 174 | return; |
| 175 | |
| 176 | if ((Date.now() - start) > 3000) |
| 177 | throw new Error("time out"); |
| 178 | } while (true); |
| 179 | } |
| 180 | fillArea(x, y, w, h, color) { |
| 181 | if (w & 3) |
| 182 | throw new Error; |
no test coverage detected