aboutsummaryrefslogtreecommitdiff
path: root/book/en/src/by-example/hardware_tasks.md
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-09-27 08:31:00 +0000
committerGitHub <noreply@github.com>2021-09-27 08:31:00 +0000
commit380a20859cf09c631467c4c49db27dd359f231c0 (patch)
tree0797d6cd62d99d8f1d9192f254478e935214d669 /book/en/src/by-example/hardware_tasks.md
parentf0c319982524988fa67cac3c59a4a4a863c409c9 (diff)
parent63c6a6afc033432f58d1ec3de39640c584553153 (diff)
Merge #533
533: More docs updates r=AfoHT a=korken89 Co-authored-by: Emil Fresk <emil.fresk@gmail.com>
Diffstat (limited to 'book/en/src/by-example/hardware_tasks.md')
-rw-r--r--book/en/src/by-example/hardware_tasks.md7
1 files changed, 5 insertions, 2 deletions
diff --git a/book/en/src/by-example/hardware_tasks.md b/book/en/src/by-example/hardware_tasks.md
index 5f7b26f..cb0cf9f 100644
--- a/book/en/src/by-example/hardware_tasks.md
+++ b/book/en/src/by-example/hardware_tasks.md
@@ -1,5 +1,9 @@
# Hardware tasks
+In it's core RTIC is based on using the interrupt controller in the hardware to do scheduling and
+run tasks, as all tasks in the framework are run as interrupt handlers (except `#[init]` and
+`#[idle]`). This also means that you can directly bind tasks to interrupt handlers.
+
To declare interrupt handlers the `#[task]` attribute takes a `binds = InterruptName` argument whose
value is the name of the interrupt to which the handler will be bound to; the
function used with this attribute becomes the interrupt handler. Within the
@@ -10,8 +14,7 @@ Providing an interrupt name that does not exist will cause a compile error to he
errors.
The example below demonstrates the use of the `#[task]` attribute to declare an
-interrupt handler. Like in the case of `#[init]` and `#[idle]` local `static
-mut` variables are safe to use within a hardware task.
+interrupt handler.
``` rust
{{#include ../../../../examples/hardware.rs}}