aboutsummaryrefslogtreecommitdiff
path: root/book
diff options
context:
space:
mode:
authorJorge Aparicio <jorge@japaric.io>2019-02-23 22:21:30 +0100
committerJorge Aparicio <jorge@japaric.io>2019-02-26 23:22:34 +0100
commite167af01f02bfa0fbec8f51c54f1aee58ce1875d (patch)
treec084a85dcaff3387044af9433ca7a9a77300fa19 /book
parent11f795aaf69dbd7d185bbf0136ae555b53768538 (diff)
document the `binds` feature
cc @burrbull
Diffstat (limited to 'book')
-rw-r--r--book/en/src/by-example/tips.md16
1 files changed, 16 insertions, 0 deletions
diff --git a/book/en/src/by-example/tips.md b/book/en/src/by-example/tips.md
index 8f71599..c0bfc56 100644
--- a/book/en/src/by-example/tips.md
+++ b/book/en/src/by-example/tips.md
@@ -75,3 +75,19 @@ $ cargo nm --example ramfunc --release | grep ' foo::'
``` console
$ cargo nm --example ramfunc --release | grep ' bar::'
{{#include ../../../../ci/expected/ramfunc.grep.bar}}```
+
+## `binds`
+
+**NOTE**: Requires RTFM ~0.4.2
+
+You can give hardware tasks more task-like names using the `binds` argument: you
+name the function as you wish and specify the name of the interrupt / exception
+in the `binds` argument. Types like `Spawn` will be placed in a module named
+after the function, not the interrupt / exception. Example below:
+
+``` rust
+{{#include ../../../../examples/binds.rs}}
+```
+``` console
+$ cargo run --example binds
+{{#include ../../../../ci/expected/binds.run}}```