(x, y, w, h, mode)
| 200 | this.writeCommand(IT8951_TCON_LD_IMG_END); |
| 201 | } |
| 202 | updateArea(x, y, w, h, mode) { |
| 203 | if (UpdateMode.NONE === mode) |
| 204 | return; |
| 205 | |
| 206 | this.checkAFSR(); |
| 207 | |
| 208 | const area = this._updateArea; |
| 209 | const rotation = this._rotation; |
| 210 | if (!rotation) { |
| 211 | area[0] = x; |
| 212 | area[1] = y; |
| 213 | area[2] = w; |
| 214 | area[3] = h; |
| 215 | } |
| 216 | else if (1 === rotation) { |
| 217 | area[0] = y; |
| 218 | area[1] = M5EPD_PANEL_H - w - x; |
| 219 | area[2] = h; |
| 220 | area[3] = w; |
| 221 | } |
| 222 | else if (2 === rotation) { |
| 223 | area[0] = M5EPD_PANEL_W - w - x; |
| 224 | area[1] = M5EPD_PANEL_H - h - y; |
| 225 | area[2] = w; |
| 226 | area[3] = h; |
| 227 | } |
| 228 | else { |
| 229 | area[0] = M5EPD_PANEL_W - h - y; |
| 230 | area[1] = x; |
| 231 | area[2] = h; |
| 232 | area[3] = w; |
| 233 | } |
| 234 | area[4] = mode; |
| 235 | area[5] = this._tar_memaddr; |
| 236 | area[6] = this._tar_memaddr >> 16; |
| 237 | |
| 238 | this.writeArgs(IT8951_I80_CMD_DPY_BUF_AREA, area); |
| 239 | } |
| 240 | |
| 241 | setArea(x, y, w, h) { |
| 242 | const area = this._setArea; |
no test coverage detected