minor md lints and wording clarification

This commit is contained in:
Daniel Carosone 2020-10-07 09:31:30 +11:00
parent f386cb63cb
commit 987332b831
2 changed files with 12 additions and 11 deletions

View file

@ -3,7 +3,7 @@
This section covers how to upgrade an application written against RTIC v0.4.x to This section covers how to upgrade an application written against RTIC v0.4.x to
the version v0.5.0 of the framework. the version v0.5.0 of the framework.
### `Cargo.toml` ## `Cargo.toml`
First, the version of the `cortex-m-rtic` dependency needs to be updated to First, the version of the `cortex-m-rtic` dependency needs to be updated to
`"0.5.0"`. The `timer-queue` feature needs to be removed. `"0.5.0"`. The `timer-queue` feature needs to be removed.
@ -21,7 +21,7 @@ features = ["timer-queue"]
# ^^^^^^^^^^^^^ # ^^^^^^^^^^^^^
``` ```
### `Context` argument ## `Context` argument
All functions inside the `#[rtic::app]` item need to take as first argument a All functions inside the `#[rtic::app]` item need to take as first argument a
`Context` structure. This `Context` type will contain the variables that were `Context` structure. This `Context` type will contain the variables that were
@ -73,7 +73,7 @@ const APP: () = {
}; };
``` ```
### Resources ## Resources
The syntax used to declare resources has been changed from `static mut` The syntax used to declare resources has been changed from `static mut`
variables to a `struct Resources`. variables to a `struct Resources`.
@ -97,7 +97,7 @@ const APP: () = {
}; };
``` ```
### Device peripherals ## Device peripherals
If your application was accessing the device peripherals in `#[init]` through If your application was accessing the device peripherals in `#[init]` through
the `device` variable then you'll need to add `peripherals = true` to the the `device` variable then you'll need to add `peripherals = true` to the
@ -135,7 +135,7 @@ const APP: () = {
}; };
``` ```
### `#[interrupt]` and `#[exception]` ## `#[interrupt]` and `#[exception]`
The `#[interrupt]` and `#[exception]` attributes have been removed. To declare The `#[interrupt]` and `#[exception]` attributes have been removed. To declare
hardware tasks in v0.5.x use the `#[task]` attribute with the `binds` argument. hardware tasks in v0.5.x use the `#[task]` attribute with the `binds` argument.
@ -181,9 +181,10 @@ const APP: () = {
}; };
``` ```
### `schedule` ## `schedule`
The `timer-queue` feature has been removed. To use the `schedule` API one must The `schedule` API no longer requires the `timer-queue` cargo feature, which has
been removed. To use the `schedule` API one must
first define the monotonic timer the runtime will use using the `monotonic` first define the monotonic timer the runtime will use using the `monotonic`
argument of the `#[rtic::app]` attribute. To continue using the cycle counter argument of the `#[rtic::app]` attribute. To continue using the cycle counter
(CYCCNT) as the monotonic timer, and match the behavior of version v0.4.x, add (CYCCNT) as the monotonic timer, and match the behavior of version v0.4.x, add

View file

@ -2,11 +2,11 @@
This section describes how to upgrade from v0.5.x to v0.6.0 of the RTIC framework. This section describes how to upgrade from v0.5.x to v0.6.0 of the RTIC framework.
### `Cargo.toml` - version bump ## `Cargo.toml` - version bump
Change the version of `cortex-m-rtic` to `"0.6.0"`. Change the version of `cortex-m-rtic` to `"0.6.0"`.
### Module instead of Const ## Module instead of Const
With the support of attributes on modules the `const APP` workaround is not needed. With the support of attributes on modules the `const APP` workaround is not needed.
@ -32,7 +32,7 @@ Now that a regular Rust module is used it means it is possible to have custom
user code within that module. user code within that module.
Additionally, it means that `use`-statements for resources etc may be required. Additionally, it means that `use`-statements for resources etc may be required.
### Init always returns late resources ## Init always returns late resources
In order to make the API more symmetric the #[init]-task always returns a late resource. In order to make the API more symmetric the #[init]-task always returns a late resource.
@ -64,7 +64,7 @@ mod app {
} }
``` ```
### Resources struct - #[resources] ## Resources struct - #[resources]
Previously the RTIC resources had to be in in a struct named exactly "Resources": Previously the RTIC resources had to be in in a struct named exactly "Resources":