diff options
| author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-10-23 22:03:08 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-10-23 22:03:08 +0000 |
| commit | 4f4c95be40019f6656d4eee549932ee811a40116 (patch) | |
| tree | 092cede9ccdaa9b7a4381f7c369db79583d7eb8b /book | |
| parent | bbcae14e37c5f4ab5701b2a688bee52bfa7aaa1b (diff) | |
| parent | 1c244a995d54332649c1643aa0a3178f169406e4 (diff) | |
Merge #400
400: codegen and examples r=AfoHT a=perlindgren
just a test
Co-authored-by: Per Lindgren <per.lindgren@ltu.se>
Diffstat (limited to 'book')
| -rw-r--r-- | book/en/src/migration/migration_v5.md | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/book/en/src/migration/migration_v5.md b/book/en/src/migration/migration_v5.md index 1d83444..5cf818c 100644 --- a/book/en/src/migration/migration_v5.md +++ b/book/en/src/migration/migration_v5.md @@ -6,6 +6,37 @@ This section describes how to upgrade from v0.5.x to v0.6.0 of the RTIC framewor Change the version of `cortex-m-rtic` to `"0.6.0"`. +## Move Dispatchers from `extern "C"` to app arguments. + +Change + +``` rust +#[rtic::app(/* .. */)] +const APP: () = { + [code here] + + // RTIC requires that unused interrupts are declared in an extern block when + // using software tasks; these free interrupts will be used to dispatch the + // software tasks. + extern "C" { + fn SSI0(); + fn QEI0(); + } +}; +``` + +into + +``` rust +#[rtic::app(/* .. */, dispatchers = [SSI0, QEI0])] +mod app { + [code here] +} +``` + +This works also for ram functions, see examples/ramfunc.rs + + ## Module instead of Const With the support of attributes on modules the `const APP` workaround is not needed. |
