You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • @allObjects E.getSizeOf(xxx) is what I'd suggest - just have a play around and see how much space things take.

    @DrAzzy sounds great about cutting it down... getting rid of writel is great - ideally things using write shouldn't really have to worry about the page issues.

    With debug code, I just tested this: If you add var D=X; up the top of the module then when it is minified, the closure compiler is smart enough to pull out the unreferenced code:

      var D=false; = function() {
        if (D) console.log("Debug");

    With nToS/etc - they could be in a separate module. For easy access of ints/etc you can also use ArrayBufferView too (if the source data is an arraybuffer): (new Uint16Array(arr.buffer,0,1))[0].

    Wrt I2C - if I2C.readFrom returned a Uint8Array, would it break anything? It'd be faster and more memory efficient for sure.


Avatar for Gordon @Gordon started