• Yes, it is enabled, there are also board files used to build it in https://github.com/fanoush/ds-d6/tree/ma­ster/espruino/DFU/P8 and there is USE_LCD_SPI_UNBUF=1 inside, for the InlineC driver try upload example from this gist (also linked in readme). It should now work also with build with storage in SPI flash.

    I actually didn't try lcd_spi_unbuf with the storage it SPI flash, quite likely it may not work out of box due to shared SPI, so for comparison better take version with storage in internal flash (the one without _SPIFLASH suffix) which is still good enough unless your code is over 120KB.

    If the guide in readme is confusing also check https://github.com/enaon/ninebot-one-nRF­52/tree/master/p8-nb

  • Thanks, I managed to get my P8 flashed with Espruino with no problems. I did the following measurements for the Lcd_spi_unbuf driver.

    I compared the time taken to fill a 240 x 160 pixel rectangle with the time to draw a 240 x 160 1 bit image. I include the results for Bangle and ESP32 (T-watch for comparison.

    RESULTS

    Bangle: fillRect 11ms, drawImage 66ms.

    ESP32: fillRect 44ms, drawImage 82ms.

    P8: fillRect 256ms, drawImage 331ms.

    The speed is not great, however, its is worth noting that the issue is not rendering palleted images but it is simply getting pixels sent to the driver. There are at least two improvements I can think of:

    1) The buffer at 128 (256 bytes) is nearly exactly the wrong size as the implementation of spiSendMany uses EasyDMA with a maximum transfer size of 255 bytes i.e. the current buffer size causes two transfers, the second of 1 byte. I would like to try a buffer size of 240 (480 bytes).

    2) spiSendMany is currently used synchronously in spiSendMany so it would be interesting to try double buffering to speed things up.

    I would really like to be able to build the firmware to test this and also to add a Bluetooth hack to support my ANCS widget. I see that you have made the board description public but I would guess that you also need the other files (bootloader etc) to build it?

    Thanks agian for making the package available - the P8 has a bright display and its good to experiment with the touchscreen. I found it really easy to transfer the apps I have been running on the T-watch to the P8. Will share when I clean things up.

    function time_fill(){
        g.setColor(0x07E0);
        var time= Date.now();
        g.fillRect(0,40,239,199);
        g.flip();
        time = Math.floor(Date.now()-time);
        console.log("Time to Draw Rectangle: "+time+"ms");
    }
    
    var pal1color = new Uint16Array([0x0000,0xF100]);
    var buf = Graphics.createArrayBuffer(240,160,1,{ms­b:true});
    buf.setColor(1);
    buf.fillRect(0,0,239,159);
    
    function time_image(){
        var time= Date.now();
        g.drawImage({width:240,height:160,bpp:1,­buffer:buf.buffer, palette:pal1color},0,40);
        g.flip();
        time = Math.floor(Date.now()-time);
        console.log("Time to Draw Image: "+time+"ms");
    }
    
About

Avatar for fanoush @fanoush started