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.
drawImage
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.
@Gordon started
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
I probably wouldn't want to merge something in if it was a specific hack for
drawImage
just forlcd_spi_unbuf.c
.There are some really easy wins for
lcd_spi_unbuf.c
speed though. Something like: