• I'm still refining this, however recent activity on gitter has prompted me to publish this now!

    https://github.com/wilberforce/EspruinoD­ocs/tree/master/modules

    There are 3 modules used.

    The FlashStoreWrite module is used to populate flash with assets that you want access to in your real application. It is a key based storage system, that takes a key, and stores a js object against it. This can then be recovered using the FlashStore module.

    The basic usage is:

    var fs = new(require("FlashStoreWrite"))(0x7c000)­;
    fs.item('example','store me!');
    

    The FlashItem object is used for recovering the stored object, which has methods toString() and valueOf();

    var str=fs.item('example').toString();

    The flashItem also knows about the types of object so treats the differently.

    This allows us to store things like web assets such as css and js files, images and have them served by a the http server object (using pipe so that not much memory) is consumed.

    We can also store modules in flash, and load them on demand.


    1 Attachment

About

Avatar for Wilberforce @Wilberforce started