Commit 3dedcc

2026-03-29 14:01:16 Bob Green: -/-
programming/handling interrupts.md ..
@@ 4,4 4,16 @@
```c
__attribute__((interrupt)) duart_interrupt(void) {
/* Handle the interrupt */
+
+ }
```
+ But there's a macro in `machine.h` to help, so you could replace the above with:
+ ```c
+ #include <machine.h>
+
+ ISR duart_interrupt(void) {
+ /* Handle the interrupt */
+
+ }
+ ```
+ gcc knows that functions declared using either of the above methods should end with the `rte` rather than `rts` instruction.
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9