You can use JsVarArray and can decode all the arguments manually if you want more - it's not worth me wasting another byte (or more) for each function, as 99% of them have 4 or less arguments.
main problem is right now how to read my pixelbuffer (uint8array), change some values and store back.
Instead of trying to get a memory area I'd use jsvArrayBufferIterator - JSV_GET_AS_CHAR_ARRAY was added as a bit of a hack to allow other non-espruino bits of code to access data. All of Espruino's stuff is written to access the data in-place rather than copying it onto the stack first.
However... what are you trying to accomplish? Espruino already lets you access 8x8 RGB matrices of WS2812 really easily: http://www.espruino.com/RGB123
The Graphics library has everything built in, so realistically what you're doing can be accomplished in JS with:
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 use
JsVarArray
and can decode all the arguments manually if you want more - it's not worth me wasting another byte (or more) for each function, as 99% of them have 4 or less arguments.Instead of trying to get a memory area I'd use
jsvArrayBufferIterator
-JSV_GET_AS_CHAR_ARRAY
was added as a bit of a hack to allow other non-espruino bits of code to access data. All of Espruino's stuff is written to access the data in-place rather than copying it onto the stack first.However... what are you trying to accomplish? Espruino already lets you access 8x8 RGB matrices of WS2812 really easily: http://www.espruino.com/RGB123
The Graphics library has everything built in, so realistically what you're doing can be accomplished in JS with: