Oh, forgot that initialization to zero goes to bss segment too, so either the attribute or try =1. volatile should not matter in that code you wrote, you don't access a variable from interrupts. That example possibly uses it because of setWatch with irq:true (?).
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.
Oh, forgot that initialization to zero goes to bss segment too, so either the attribute or try
=1
. volatile should not matter in that code you wrote, you don't accessa
variable from interrupts. That example possibly uses it because ofsetWatch
withirq:true
(?).