Thank you for pointing this out. I don't usually read big chunks, so I never wondered about this. I committed this to the repository for people who may find it useful.
Another idea I had was changing the read method like this:
Flash.prototype.read = this.spi.send;
i.e. making the read property point directly to the property of the spi class. This seems a bit unclean but it may work and actually be faster. I don't have that chip right now, but maybe you can test.
© Espruino, powered by microcosm.
Report a problem