Hey, thanks for the post - that looks good! I can't think of any other obvious ways to make it significantly faster. At some point it'd be nice to have a 'fast path' for GPIO in compiled code, but it's not really that high up the priority list.
I guess the other (slightly cheaty) options are:
Use the inline assembler and access the registers for B2 directly. I imagine that could hit in the region of 10Mhz.
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.
Hey, thanks for the post - that looks good! I can't think of any other obvious ways to make it significantly faster. At some point it'd be nice to have a 'fast path' for GPIO in compiled code, but it's not really that high up the priority list.
I guess the other (slightly cheaty) options are:
analogWrite