Hello Omar, thank you for your book. Just got it. It's really the only book right now that helps someone getting into embedded with Rust to hit the ground running.
I have a question about interrupts. All examples including yours, works with one interrupt being set for one button.
What happens if you have two buttons, or say 3 buttons. If you set the interrupt to be launched on GPIO level, how does the critical section distinguish which button launched the interrupt.
I am trying to launch an interrupt with a button that ads 1 to a number, and another button which substracts one from a number.
Help would be appreciated! Alex