• Hi, I have now managed to do a comparison. See video below:


    The numbers in red are the lcd_spi_unbuf driver and the numbers in green are the version I wrote that directly implements drawImage. The application code for both is identical and is trying to increment and display the number every 100ms:

    // display incrementing number
    var pal2color = new Uint16Array([0x0000,0xF100]);
    var buf2 = Graphics.createArrayBuffer(20,64,1,{msb:­true});
    var N = 0;
    function drawNumber() {
       lcd.drawImage({width:20,height:64,bpp:1,­buffer:buf2.buffer, palette:pal2color},30,50);
       if (N>999) N = 0;

    The drawImage based driver (green numbers) appears to be over twice as fast as the lcd_spi_inbuf version. I have cheated a bit in that I have chosen an image size that does not create a fragment. My conclusion is that I will try to combine these two drivers to give the best of both and I think that it is still important to get a solution to the original issue I mentioned of being able to write only part of a buffer to spi.

    You can see the full code here


Avatar for jeffmer @jeffmer started