debounce in setWatch is actually done after the events have been stuck in the event queue - so as you say it's not as efficient as it could be. It's actually quite a bit a harder one to do debounce in an IRQ - although it could be done later.
And yes, I think with option 3 it could be very fast. I'll have a think about that - I've been seeing more and more things that could be done with native code on IRQs - like the ability to execute code on a timer... It could mean that a decent charlieplexing library could be made, and it might even allow us to do some kind of DMA'd VGA library.
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.
debounce in setWatch is actually done after the events have been stuck in the event queue - so as you say it's not as efficient as it could be. It's actually quite a bit a harder one to do debounce in an IRQ - although it could be done later.
And yes, I think with option 3 it could be very fast. I'll have a think about that - I've been seeing more and more things that could be done with native code on IRQs - like the ability to execute code on a timer... It could mean that a decent charlieplexing library could be made, and it might even allow us to do some kind of DMA'd VGA library.