Your other option is to use 'flat strings' - if you can use them then when you use JSV_GET_AS_CHAR_ARRAY you'll get a pointer to the underlying data, so there is no need to copy back.
The ability to scroll with the Graphics library would actually be really useful, although that's a bit tricker to deal with as you need to cope with bit-based graphics where the pixels are in strange formats...
No problem if you're doing this for fun yourself - but I don't see I'll be able to include this code in Espruino itself - there's just too little flash memory available for me to be be able to use it on something that's very single-purpose.
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.
You can do:
But that's not as fast. The ideal thing is to read or write data sequentially:
Your other option is to use 'flat strings' - if you can use them then when you use
JSV_GET_AS_CHAR_ARRAY
you'll get a pointer to the underlying data, so there is no need to copy back.The ability to scroll with the Graphics library would actually be really useful, although that's a bit tricker to deal with as you need to cope with bit-based graphics where the pixels are in strange formats...
No problem if you're doing this for fun yourself - but I don't see I'll be able to include this code in Espruino itself - there's just too little flash memory available for me to be be able to use it on something that's very single-purpose.