Great example, thank you! I found I had to call button.enable_interrupt().unwrap() inside the loop, or I'd only get precisely one interrupt. This is noted in the most recent docs for subscribe() where they note that you must call it from non-ISR context.
Thanks for reading! To your comment, there has probably been a change in the interface, however, it makes sense. Resetting the interrupt enable is not unusual.
Ant Skelton
Great example, thank you! I found I had to call
button.enable_interrupt().unwrap()inside the loop, or I'd only get precisely one interrupt. This is noted in the most recent docs forsubscribe()where they note that you must call it from non-ISR context.