From a39d306649ebd7c6e99f5914bd5d6988a1705d4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Tj=C3=A4der?= Date: Sat, 5 Feb 2022 13:38:01 +0100 Subject: Docs: SW and HW tasks --- book/en/src/by-example/hardware_tasks.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'book/en/src/by-example/hardware_tasks.md') diff --git a/book/en/src/by-example/hardware_tasks.md b/book/en/src/by-example/hardware_tasks.md index 30b88d0..7f8d3c6 100644 --- a/book/en/src/by-example/hardware_tasks.md +++ b/book/en/src/by-example/hardware_tasks.md @@ -14,11 +14,18 @@ start execution in reaction to a hardware event. Specifying a non-existing interrupt name will cause a compilation error. The interrupt names are commonly defined by [PAC or HAL][pacorhal] crates. +Any available interrupt vector should work, but different hardware might have +added special properties to select interrupt priority levels, such as the +[nRF “softdevice”](https://github.com/rtic-rs/cortex-m-rtic/issues/434). + +Beware of re-purposing interrupt vectors used internally by hardware features, +RTIC is unaware of such hardware specific details. + [pacorhal]: https://docs.rust-embedded.org/book/start/registers.html [NVIC]: https://developer.arm.com/documentation/100166/0001/Nested-Vectored-Interrupt-Controller/NVIC-functional-description/NVIC-interrupts -The example below demonstrates the use of the `#[task]` attribute to declare an -interrupt handler. +The example below demonstrates the use of the `#[task(binds = InterruptName)]` attribute to declare a +hardware task bound to an interrupt handler. ``` rust {{#include ../../../../examples/hardware.rs}} -- cgit v1.2.3