You are reading a single comment by @Jorgen and its replies. Click here to read the full conversation.
  • @Gordon I Just try to use your original source and only change the part of rewrite flip

    g.flip = function() {
        ce.reset();
        spi.write(0x2A,dc);
        spi.write(0,2,0,LCD_WIDTH+1);
        spi.write(0x2B,dc);
        spi.write(0,3,0,LCD_HEIGHT+2);
        spi.write(0x2C,dc);
        var lines = 16; // size of buffer to use for un-paletting
        var a = new Uint16Array(LCD_WIDTH*lines);
        for (var y=0;y<LCD_HEIGHT;y+=lines) {
          E.mapInPlace(new Uint8Array(g.buffer, y*LCD_WIDTH*bits/8, a.length), a, palette, bits);
          spi.write(a.buffer);
        }
        ce.set();
      };
    

    And voilĂ  it works also :D
    So the display only needs this magix offset for X+2 / Y+3.
    Should I take a better picture, or is the pic above ok? Of course you can use.

About

Avatar for Jorgen @Jorgen started