embedded-trainings-2020/embedded-workshop-book/src/interrupt-handling.md
Jorge Aparicio 4882103341 split next-steps section into subsections
and move from-scratch under the next-steps section
2021-01-21 17:31:30 +01:00

819 B

Interrupt handling

We haven't covered interrupt handling in the workshop but the cortex-m-rt crate provides attributes to declare exception and interrupt handlers: #[exception] and #[interrupt]. You can find documentation about these attributes and how to safely share data with interrupt handlers using Mutexes in the "Concurrency" chapter of the Embedded Rust book.

Another way to deal with interrupts is to use a framework like Real-Time Interrupt-driven Concurrency (RTIC); this framework has a book that explains how you can build reactive applications using interrupts. We use this framework in the advanced level workshop.