Thanks - yeah, the question is between inlining and using a separate file - I'm not sure which is best...
pin.reset()? Oh, yeah. Well it should be unset(), hrrmph!
You know, a shift register module could be made that used similar virtual pins, though the behavior you could get from it would be limited....
storing the bitmask would make it ever so slightly faster, that's a good idea. I guess inlining is probably the way to go, but I think that generic class has some value, maybe in a doc or tutorial page...
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.
Thanks - yeah, the question is between inlining and using a separate file - I'm not sure which is best...
pin.reset()? Oh, yeah. Well it should be unset(), hrrmph!
You know, a shift register module could be made that used similar virtual pins, though the behavior you could get from it would be limited....
storing the bitmask would make it ever so slightly faster, that's a good idea. I guess inlining is probably the way to go, but I think that generic class has some value, maybe in a doc or tutorial page...