avr-hal
avr-hal copied to clipboard
Interrupt Semantics
From @peacememories in Rahix/avr-device#19:
I wonder... do you think we can encode semantics like “when this interrupt fires the uart has incoming data” in the interrupts? Would that make sense? Why I would be interested in doing this: in c I would just start reading data from uart on an interrupt, but in rust I’d use read on the uart which (afaict) also Checks if there is actually data in the register. This is good for safety, but technically when the uart interrupt fires I have a guarantee that there is data available. Same for adc samples etc.
Linking to issues #235 and #237.