will not last long, the array is not referenced anywhere so will be freed soon, assign it to some variable. The E.getAddressOf just gives memory address, it does not care about allocation.
Fanoush probably has a point here, regarding the temporary array getting cleaned up in garbage collection.
Instead I have used a global auxiliary Uint32Array large enough to be in a flat memory area for passing in additional parameters. Not very elegant but works...
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.
the
will not last long, the array is not referenced anywhere so will be freed soon, assign it to some variable. The
E.getAddressOf
just gives memory address, it does not care about allocation.