diff options
| author | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-02-26 22:26:52 +0000 |
|---|---|---|
| committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-02-26 22:26:52 +0000 |
| commit | 6d1d84980a1f3212164dda5a890a90efd3c8583d (patch) | |
| tree | ee9aa60d3c109b4583299cf6a71277507a4be241 /book/en/src/by-example | |
| parent | bbdc3221f6a76da5784ca0017a0f5ac1ca875597 (diff) | |
| parent | 8eccef7d9cda8a60594b86d31b656a3680d1ca16 (diff) | |
Merge #158
158: implement RFC #128: #[interrupt(binds = ..)] r=korken89 a=japaric
closes #128
r? @korken89 or @TeXitoi
suggestions for tests are welcome! (2 of the 3 tests I added hit bugs in my implementation)
Co-authored-by: Jorge Aparicio <jorge@japaric.io>
Diffstat (limited to 'book/en/src/by-example')
| -rw-r--r-- | book/en/src/by-example/tips.md | 16 |
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}}``` |
