Hmm... I did try it out - I deleted that function definition and it worked...
I just saw the fillRect issue - I'll look into it...
flip is the name of the function I've been using in display modules when they send the data over to the display. For example PCD8544 and the source.
flip
You could do something a bit like:
display.flip = function(){ var tmp = new Uint8Array(17); // tmp[0] = 0x00; // initialiased to 0 anyway tmp.set(graphics.buffer, 1); i2c.writeTo(address, tmp); };
... assuming you have the buffer - but unfortunately right now graphics can only do 1,8,16,24,32 bits. It'd be good to add more options though.
at the moment you can use 'ArrayBufferViews' to re-interpret array data very efficiently though:
var tmp = new Uint8Array(17); // tmp[0] = 0x00; // initialiased to 0 anyway tmp.set(new Uint8Array(displaybuffer.buffer), 1); i2c.writeTo(address, tmp);
@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.
Hmm... I did try it out - I deleted that function definition and it worked...
I just saw the fillRect issue - I'll look into it...
flip
is the name of the function I've been using in display modules when they send the data over to the display. For example PCD8544 and the source.You could do something a bit like:
... assuming you have the buffer - but unfortunately right now graphics can only do 1,8,16,24,32 bits. It'd be good to add more options though.
at the moment you can use 'ArrayBufferViews' to re-interpret array data very efficiently though: