I actually added something useful to the AES branch called JSV_GET_AS_CHAR_ARRAY - it returns a char*, either by referencing a flat array (if possible) or by allocating on the stack and copying across.
I'll merge in today, but that should really help to simplify your code.
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.
Yes, I'd just add what you have for now, a utility function. I replied to you earlier on this thread as well with some ideas.
I actually added something useful to the AES branch called
JSV_GET_AS_CHAR_ARRAY
- it returns achar*
, either by referencing a flat array (if possible) or by allocating on the stack and copying across.I'll merge in today, but that should really help to simplify your code.