mirror of
https://github.com/rtic-rs/rtic.git
synced 2024-12-24 19:09:33 +01:00
Merge #567
567: Promote v1.0 in docs r=korken89 a=AfoHT Co-authored-by: Henrik Tjäder <henrik@grepit.se>
This commit is contained in:
commit
152955c18a
7 changed files with 21 additions and 21 deletions
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
|
@ -522,7 +522,7 @@ jobs:
|
|||
langs=( en ru )
|
||||
devver=( dev )
|
||||
# The latest stable must be the first element in the array
|
||||
vers=( 0.5.x 0.4.x )
|
||||
vers=( 1.0.x 0.5.x 0.4.x )
|
||||
|
||||
# All releases start with "v"
|
||||
# followed by MAJOR.MINOR.PATCH, see semver.org
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
<!-- - [`#[cfg(..)]` support](./by-example/tips.md) -->
|
||||
- [Awesome RTIC examples](./awesome_rtic.md)
|
||||
- [Migration Guides](./migration.md)
|
||||
- [v0.5.x to v0.6.x](./migration/migration_v5.md)
|
||||
- [v0.5.x to v1.0.x](./migration/migration_v5.md)
|
||||
- [v0.4.x to v0.5.x](./migration/migration_v4.md)
|
||||
- [RTFM to RTIC](./migration/migration_rtic.md)
|
||||
- [Under the hood](./internals.md)
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
# Migrating from v0.5.x to v0.6.0
|
||||
# Migrating from v0.5.x to v1.0.0
|
||||
|
||||
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 v1.0.0 of the RTIC framework.
|
||||
|
||||
## `Cargo.toml` - version bump
|
||||
|
||||
Change the version of `cortex-m-rtic` to `"0.6.0"`.
|
||||
Change the version of `cortex-m-rtic` to `"1.0.0"`.
|
||||
|
||||
## `mod` instead of `const`
|
||||
|
||||
|
@ -112,7 +112,7 @@ struct Resources {
|
|||
}
|
||||
```
|
||||
|
||||
With RTIC v0.6.0 the resources structs are annotated similarly like
|
||||
With RTIC v1.0.0 the resources structs are annotated similarly like
|
||||
`#[task]`, `#[init]`, `#[idle]`: with the attributes `#[shared]` and `#[local]`
|
||||
|
||||
``` rust
|
||||
|
@ -131,7 +131,7 @@ These structs can be freely named by the developer.
|
|||
|
||||
## `shared` and `local` arguments in `#[task]`s
|
||||
|
||||
In v0.6.0 resources are split between `shared` resources and `local` resources.
|
||||
In v1.0.0 resources are split between `shared` resources and `local` resources.
|
||||
`#[task]`, `#[init]` and `#[idle]` no longer have a `resources` argument; they must now use the `shared` and `local` arguments.
|
||||
|
||||
In v0.5.x:
|
||||
|
@ -149,7 +149,7 @@ fn a(_: a::Context) {}
|
|||
fn b(_: b::Context) {}
|
||||
```
|
||||
|
||||
In v0.6.0:
|
||||
In v1.0.0:
|
||||
|
||||
``` rust
|
||||
#[shared]
|
||||
|
@ -207,7 +207,7 @@ Note that the performance does not change thanks to LLVM's optimizations which o
|
|||
## Lock-free resource access
|
||||
|
||||
In RTIC 0.5 resources shared by tasks running at the same priority could be accessed *without* the `lock` API.
|
||||
This is still possible in 0.6: the `#[shared]` resource must be annotated with the field-level `#[lock_free]` attribute.
|
||||
This is still possible in 1.0: the `#[shared]` resource must be annotated with the field-level `#[lock_free]` attribute.
|
||||
|
||||
v0.5 code:
|
||||
|
||||
|
@ -227,7 +227,7 @@ fn b(cx: b::Context) {
|
|||
}
|
||||
```
|
||||
|
||||
v0.6 code:
|
||||
v1.0 code:
|
||||
|
||||
``` rust
|
||||
#[shared]
|
||||
|
@ -262,7 +262,7 @@ fn init(_: init::Context) {
|
|||
}
|
||||
```
|
||||
|
||||
v0.6.0 code:
|
||||
v1.0.0 code:
|
||||
|
||||
``` rust
|
||||
#[init(local = [
|
||||
|
|
|
@ -16,7 +16,7 @@ Formerly known as Real-Time For the Masses.
|
|||
|
||||
<!--[Russian]: ../ru/index.html-->
|
||||
|
||||
This is the documentation of v0.6.x of RTIC; for the documentation of version
|
||||
This is the documentation of v1.0.x of RTIC; for the documentation of version
|
||||
|
||||
* v0.5.x go [here](/0.5).
|
||||
* v0.4.x go [here](/0.4).
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
- [Создание нового проекта](./by-example/new.md)
|
||||
- [Советы и хитрости](./by-example/tips.md)
|
||||
- [Инструкции по миграции](./migration.md)
|
||||
- [v0.5.x на v0.6.x](./migration/migration_v5.md)
|
||||
- [v0.5.x на v1.0.x](./migration/migration_v5.md)
|
||||
- [v0.4.x на v0.5.x](./migration/migration_v4.md)
|
||||
- [RTFM на RTIC](./migration/migration_rtic.md)
|
||||
- [Под капотом](./internals.md)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Миграция с v0.5.x на v0.6.0
|
||||
# Миграция с v0.5.x на v1.0.0
|
||||
|
||||
Этот раздел описывает как обновиться с версии v0.5.x на v0.6.0 фреймворка RTIC.
|
||||
Этот раздел описывает как обновиться с версии v0.5.x на v1.0.0 фреймворка RTIC.
|
||||
|
||||
## `Cargo.toml` - увеличьте версию
|
||||
|
||||
|
@ -112,7 +112,7 @@ struct Resources {
|
|||
}
|
||||
```
|
||||
|
||||
Начиная с RTIC v0.6.0 структуры ресурсов аннотируются подобно
|
||||
Начиная с RTIC v1.0.0 структуры ресурсов аннотируются подобно
|
||||
`#[task]`, `#[init]`, `#[idle]`: аттрибутами `#[shared]` и `#[local]`
|
||||
|
||||
``` rust
|
||||
|
@ -131,7 +131,7 @@ struct MyLocalResources {
|
|||
|
||||
## `shared` и `local` аргументы в `#[task]`'ах
|
||||
|
||||
В v0.6.0 ресурсы разделены на `shared` ресурсы и `local` ресурсы.
|
||||
В v1.0.0 ресурсы разделены на `shared` ресурсы и `local` ресурсы.
|
||||
`#[task]`, `#[init]` и `#[idle]` больше не имеют аргумента `resources`;
|
||||
они должны использовать аргументы `shared` и `local`.
|
||||
|
||||
|
@ -150,7 +150,7 @@ fn a(_: a::Context) {}
|
|||
fn b(_: b::Context) {}
|
||||
```
|
||||
|
||||
В v0.6.0:
|
||||
В v1.0.0:
|
||||
|
||||
``` rust
|
||||
#[shared]
|
||||
|
@ -229,7 +229,7 @@ fn b(cx: b::Context) {
|
|||
}
|
||||
```
|
||||
|
||||
v0.6 код:
|
||||
v1.0 код:
|
||||
|
||||
``` rust
|
||||
#[shared]
|
||||
|
@ -264,7 +264,7 @@ fn init(_: init::Context) {
|
|||
}
|
||||
```
|
||||
|
||||
v0.6.0 code:
|
||||
v1.0.0 code:
|
||||
|
||||
``` rust
|
||||
#[init(local = [
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
<!--[английском]: ../en/index.html-->
|
||||
|
||||
Это документация по RTIC версии v0.6.x; за документацией по другим версиям:
|
||||
Это документация по RTIC версии v1.0.x; за документацией по другим версиям:
|
||||
|
||||
* v0.5.x [сюда](/0.5).
|
||||
* v0.4.x [сюда](/0.4).
|
||||
|
|
Loading…
Reference in a new issue