• So why not add lcd_spi_unbuf_drawImage

    I probably wouldn't want to merge something in if it was a specific hack for drawImagejust for lcd_spi_unbuf.c.

    There are some really easy wins for lcd_spi_unbuf.c speed though. Something like:

    int lastx,lasty;
    
    void lcd_spi_unbuf_setPixel(JsGraphics *gfx, int x, int y, unsigned int col) {
      uint16_t color =   (col>>8) | (col<<8); 
      jshPinSetValue(_pin_cs, 0);
      if (x!=lastx+1 || y!=lasty) {
        disp_spi_transfer_addrwin(x, y, LCD_WIDTH, y+1);  
        lastx = x;
        lasty = y;
      } else lastx++; 
      spi_data((uint8_t *)&color, 2);
      jshPinSetValue(_pin_cs, 1);
    }
    
  • There are some really easy wins for lcd_spi_unbuf.c speed though.

    Thanks, so let me run some tests and come up with a pr.

About

Avatar for MaBe @MaBe started