aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore3
-rw-r--r--book/en/book.toml (renamed from book/book.toml)0
-rw-r--r--book/en/src/SUMMARY.md (renamed from book/src/SUMMARY.md)0
-rw-r--r--book/en/src/by-example.md (renamed from book/src/by-example.md)0
-rw-r--r--book/en/src/by-example/app.md (renamed from book/src/by-example/app.md)14
-rw-r--r--book/en/src/by-example/new.md (renamed from book/src/by-example/new.md)2
-rw-r--r--book/en/src/by-example/resources.md (renamed from book/src/by-example/resources.md)16
-rw-r--r--book/en/src/by-example/singletons.md (renamed from book/src/by-example/singletons.md)4
-rw-r--r--book/en/src/by-example/tasks.md (renamed from book/src/by-example/tasks.md)12
-rw-r--r--book/en/src/by-example/timer-queue.md (renamed from book/src/by-example/timer-queue.md)12
-rw-r--r--book/en/src/by-example/tips.md (renamed from book/src/by-example/tips.md)14
-rw-r--r--book/en/src/by-example/types-send-sync.md (renamed from book/src/by-example/types-send-sync.md)6
-rw-r--r--book/en/src/internals.md (renamed from book/src/internals.md)0
-rw-r--r--book/en/src/internals/ceilings.md (renamed from book/src/internals/ceilings.md)0
-rw-r--r--book/en/src/internals/tasks.md (renamed from book/src/internals/tasks.md)0
-rw-r--r--book/en/src/internals/timer-queue.md (renamed from book/src/internals/timer-queue.md)0
-rw-r--r--book/en/src/preface.md (renamed from book/src/preface.md)6
-rw-r--r--book/ru/book.toml (renamed from ru/book.toml)0
-rw-r--r--book/ru/src/README_RU.md (renamed from ru/src/README_RU.md)0
-rw-r--r--book/ru/src/SUMMARY.md (renamed from ru/src/SUMMARY.md)0
-rw-r--r--book/ru/src/by-example.md (renamed from ru/src/by-example.md)0
-rw-r--r--book/ru/src/by-example/app.md (renamed from ru/src/by-example/app.md)14
-rw-r--r--book/ru/src/by-example/new.md (renamed from ru/src/by-example/new.md)2
-rw-r--r--book/ru/src/by-example/resources.md (renamed from ru/src/by-example/resources.md)16
-rw-r--r--book/ru/src/by-example/singletons.md (renamed from ru/src/by-example/singletons.md)4
-rw-r--r--book/ru/src/by-example/tasks.md (renamed from ru/src/by-example/tasks.md)12
-rw-r--r--book/ru/src/by-example/timer-queue.md (renamed from ru/src/by-example/timer-queue.md)12
-rw-r--r--book/ru/src/by-example/tips.md (renamed from ru/src/by-example/tips.md)12
-rw-r--r--book/ru/src/by-example/types-send-sync.md (renamed from ru/src/by-example/types-send-sync.md)6
-rw-r--r--book/ru/src/internals.md (renamed from ru/src/internals.md)0
-rw-r--r--book/ru/src/internals/ceilings.md (renamed from ru/src/internals/ceilings.md)0
-rw-r--r--book/ru/src/internals/tasks.md (renamed from ru/src/internals/tasks.md)0
-rw-r--r--book/ru/src/internals/timer-queue.md (renamed from ru/src/internals/timer-queue.md)0
-rw-r--r--book/ru/src/preface.md (renamed from ru/src/preface.md)4
-rw-r--r--ci/script.sh16
-rw-r--r--src/lib.rs2
36 files changed, 96 insertions, 93 deletions
diff --git a/.gitignore b/.gitignore
index 9a7ec5f..0c0491e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,7 +1,6 @@
**/*.rs.bk
.#*
.gdb_history
-/book/book
-/ru/book
+/book/*/book
/target
Cargo.lock
diff --git a/book/book.toml b/book/en/book.toml
index c611ce0..c611ce0 100644
--- a/book/book.toml
+++ b/book/en/book.toml
diff --git a/book/src/SUMMARY.md b/book/en/src/SUMMARY.md
index 051d1ac..051d1ac 100644
--- a/book/src/SUMMARY.md
+++ b/book/en/src/SUMMARY.md
diff --git a/book/src/by-example.md b/book/en/src/by-example.md
index 0e09b03..0e09b03 100644
--- a/book/src/by-example.md
+++ b/book/en/src/by-example.md
diff --git a/book/src/by-example/app.md b/book/en/src/by-example/app.md
index 26aa03f..996b8c1 100644
--- a/book/src/by-example/app.md
+++ b/book/en/src/by-example/app.md
@@ -3,7 +3,7 @@
This is the smallest possible RTFM application:
``` rust
-{{#include ../../../examples/smallest.rs}}
+{{#include ../../../../examples/smallest.rs}}
```
All RTFM applications use the [`app`] attribute (`#[app(..)]`). This attribute
@@ -47,7 +47,7 @@ The example below shows the types of the `core` and `device` variables and
showcases safe access to a `static mut` variable.
``` rust
-{{#include ../../../examples/init.rs}}
+{{#include ../../../../examples/init.rs}}
```
Running the example will print `init` to the console and then exit the QEMU
@@ -55,7 +55,7 @@ process.
``` console
$ cargo run --example init
-{{#include ../../../ci/expected/init.run}}```
+{{#include ../../../../ci/expected/init.run}}```
## `idle`
@@ -78,12 +78,12 @@ references that are safe to access.
The example below shows that `idle` runs after `init`.
``` rust
-{{#include ../../../examples/idle.rs}}
+{{#include ../../../../examples/idle.rs}}
```
``` console
$ cargo run --example idle
-{{#include ../../../ci/expected/idle.run}}```
+{{#include ../../../../ci/expected/idle.run}}```
## `interrupt` / `exception`
@@ -93,12 +93,12 @@ and exception handlers. In RTFM, we refer to interrupt and exception handlers as
*hardware* tasks.
``` rust
-{{#include ../../../examples/interrupt.rs}}
+{{#include ../../../../examples/interrupt.rs}}
```
``` console
$ cargo run --example interrupt
-{{#include ../../../ci/expected/interrupt.run}}```
+{{#include ../../../../ci/expected/interrupt.run}}```
So far all the RTFM applications we have seen look no different that the
applications one can write using only the `cortex-m-rt` crate. In the next
diff --git a/book/src/by-example/new.md b/book/en/src/by-example/new.md
index b7d18a7..ae49ef2 100644
--- a/book/src/by-example/new.md
+++ b/book/en/src/by-example/new.md
@@ -64,4 +64,4 @@ $ cargo add panic-semihosting
``` console
$ # NOTE: I have uncommented the `runner` option in `.cargo/config`
$ cargo run
-{{#include ../../../ci/expected/init.run}}```
+{{#include ../../../../ci/expected/init.run}}```
diff --git a/book/src/by-example/resources.md b/book/en/src/by-example/resources.md
index 93332f0..efdeaa2 100644
--- a/book/src/by-example/resources.md
+++ b/book/en/src/by-example/resources.md
@@ -19,12 +19,12 @@ no preemption is possible. The `SHARED` resource can only be accessed by these
two handlers.
``` rust
-{{#include ../../../examples/resource.rs}}
+{{#include ../../../../examples/resource.rs}}
```
``` console
$ cargo run --example resource
-{{#include ../../../ci/expected/resource.run}}```
+{{#include ../../../../ci/expected/resource.run}}```
## Priorities
@@ -62,12 +62,12 @@ the critical section created by the lowest priority handler.
[`lock`]: ../../api/rtfm/trait.Mutex.html#method.lock
``` rust
-{{#include ../../../examples/lock.rs}}
+{{#include ../../../../examples/lock.rs}}
```
``` console
$ cargo run --example lock
-{{#include ../../../ci/expected/lock.run}}```
+{{#include ../../../../ci/expected/lock.run}}```
## Late resources
@@ -91,12 +91,12 @@ the consumer resource.
[`Queue`]: ../../api/heapless/spsc/struct.Queue.html
``` rust
-{{#include ../../../examples/late.rs}}
+{{#include ../../../../examples/late.rs}}
```
``` console
$ cargo run --example late
-{{#include ../../../ci/expected/late.run}}```
+{{#include ../../../../ci/expected/late.run}}```
## `static` resources
@@ -111,9 +111,9 @@ In the example below a key is loaded (or created) at runtime and then used from
two tasks that run at different priorities.
``` rust
-{{#include ../../../examples/static.rs}}
+{{#include ../../../../examples/static.rs}}
```
``` console
$ cargo run --example static
-{{#include ../../../ci/expected/static.run}}```
+{{#include ../../../../ci/expected/static.run}}```
diff --git a/book/src/by-example/singletons.md b/book/en/src/by-example/singletons.md
index d83cf1c..0823f05 100644
--- a/book/src/by-example/singletons.md
+++ b/book/en/src/by-example/singletons.md
@@ -18,9 +18,9 @@ the [`alloc-singleton`] abstractions.
[`alloc-singleton`]: https://crates.io/crates/alloc-singleton
``` rust
-{{#include ../../../examples/singleton.rs}}
+{{#include ../../../../examples/singleton.rs}}
```
``` console
$ cargo run --example singleton
-{{#include ../../../ci/expected/singleton.run}}```
+{{#include ../../../../ci/expected/singleton.run}}```
diff --git a/book/src/by-example/tasks.md b/book/en/src/by-example/tasks.md
index b950f70..edcdbed 100644
--- a/book/src/by-example/tasks.md
+++ b/book/en/src/by-example/tasks.md
@@ -19,12 +19,12 @@ The example below showcases three software tasks that run at 2 different
priorities. The three tasks map to 2 interrupts handlers.
``` rust
-{{#include ../../../examples/task.rs}}
+{{#include ../../../../examples/task.rs}}
```
``` console
$ cargo run --example task
-{{#include ../../../ci/expected/task.run}}```
+{{#include ../../../../ci/expected/task.run}}```
## Message passing
@@ -35,12 +35,12 @@ the signature of the task handler.
The example below showcases three tasks, two of them expect a message.
``` rust
-{{#include ../../../examples/message.rs}}
+{{#include ../../../../examples/message.rs}}
```
``` console
$ cargo run --example message
-{{#include ../../../ci/expected/message.run}}```
+{{#include ../../../../ci/expected/message.run}}```
## Capacity
@@ -55,9 +55,9 @@ capacity is not specified then the second `spawn.foo` call in `UART0` would
fail.
``` rust
-{{#include ../../../examples/capacity.rs}}
+{{#include ../../../../examples/capacity.rs}}
```
``` console
$ cargo run --example capacity
-{{#include ../../../ci/expected/capacity.run}}```
+{{#include ../../../../ci/expected/capacity.run}}```
diff --git a/book/src/by-example/timer-queue.md b/book/en/src/by-example/timer-queue.md
index 2e3decd..167939c 100644
--- a/book/src/by-example/timer-queue.md
+++ b/book/en/src/by-example/timer-queue.md
@@ -38,13 +38,13 @@ was scheduled to run first.
> counter functionality has not been implemented in `qemu-system-arm`.
``` rust
-{{#include ../../../examples/schedule.rs}}
+{{#include ../../../../examples/schedule.rs}}
```
Running the program on real hardware produces the following output in the console:
``` text
-{{#include ../../../ci/expected/schedule.run}}
+{{#include ../../../../ci/expected/schedule.run}}
```
## Periodic tasks
@@ -54,7 +54,7 @@ through the `scheduled` variable. This information and the `schedule` API can be
used to implement periodic tasks as shown in the example below.
``` rust
-{{#include ../../../examples/periodic.rs}}
+{{#include ../../../../examples/periodic.rs}}
```
This is the output produced by the example. Note that there is zero drift /
@@ -62,7 +62,7 @@ jitter even though `schedule.foo` was invoked at the *end* of `foo`. Using
`Instant::now` instead of `scheduled` would have resulted in drift / jitter.
``` text
-{{#include ../../../ci/expected/periodic.run}}
+{{#include ../../../../ci/expected/periodic.run}}
```
## Baseline
@@ -87,11 +87,11 @@ spawned from it will use `Instant::now()` as their baseline time.
The example below showcases the different meanings of the *baseline*.
``` rust
-{{#include ../../../examples/baseline.rs}}
+{{#include ../../../../examples/baseline.rs}}
```
Running the program on real hardware produces the following output in the console:
``` text
-{{#include ../../../ci/expected/baseline.run}}
+{{#include ../../../../ci/expected/baseline.run}}
```
diff --git a/book/src/by-example/tips.md b/book/en/src/by-example/tips.md
index 5057c80..8f71599 100644
--- a/book/src/by-example/tips.md
+++ b/book/en/src/by-example/tips.md
@@ -8,12 +8,12 @@ data. This lets you easily write generic code that operates on resources and can
be called from different tasks. Here's one such example:
``` rust
-{{#include ../../../examples/generics.rs}}
+{{#include ../../../../examples/generics.rs}}
```
``` console
$ cargo run --example generics
-{{#include ../../../ci/expected/generics.run}}```
+{{#include ../../../../ci/expected/generics.run}}```
This also lets you change the static priorities of tasks without having to
rewrite code. If you consistently use `lock`s to access the data behind shared
@@ -31,7 +31,7 @@ The example below logs a message whenever the `foo` task is spawned, but only if
the program has been compiled using the `dev` profile.
``` rust
-{{#include ../../../examples/cfg.rs}}
+{{#include ../../../../examples/cfg.rs}}
```
## Running tasks from RAM
@@ -56,22 +56,22 @@ improve performance in some cases.
The example below shows how to place the higher priority task, `bar`, in RAM.
``` rust
-{{#include ../../../examples/ramfunc.rs}}
+{{#include ../../../../examples/ramfunc.rs}}
```
Running this program produces the expected output.
``` console
$ cargo run --example ramfunc
-{{#include ../../../ci/expected/ramfunc.run}}```
+{{#include ../../../../ci/expected/ramfunc.run}}```
One can look at the output of `cargo-nm` to confirm that `bar` ended in RAM
(`0x2000_0000`), whereas `foo` ended in Flash (`0x0000_0000`).
``` console
$ cargo nm --example ramfunc --release | grep ' foo::'
-{{#include ../../../ci/expected/ramfunc.grep.foo}}```
+{{#include ../../../../ci/expected/ramfunc.grep.foo}}```
``` console
$ cargo nm --example ramfunc --release | grep ' bar::'
-{{#include ../../../ci/expected/ramfunc.grep.bar}}```
+{{#include ../../../../ci/expected/ramfunc.grep.bar}}```
diff --git a/book/src/by-example/types-send-sync.md b/book/en/src/by-example/types-send-sync.md
index 6433060..da53cf9 100644
--- a/book/src/by-example/types-send-sync.md
+++ b/book/en/src/by-example/types-send-sync.md
@@ -13,7 +13,7 @@ function.
The example below shows the different types generates by the `app` attribute.
``` rust
-{{#include ../../../examples/types.rs}}
+{{#include ../../../../examples/types.rs}}
```
## `Send`
@@ -36,7 +36,7 @@ shared `static mut` resources.
The example below shows where a type that doesn't implement `Send` can be used.
``` rust
-{{#include ../../../examples/not-send.rs}}
+{{#include ../../../../examples/not-send.rs}}
```
## `Sync`
@@ -56,5 +56,5 @@ resources shared between tasks that run at the *same* priority.
The example below shows where a type that doesn't implement `Sync` can be used.
``` rust
-{{#include ../../../examples/not-sync.rs}}
+{{#include ../../../../examples/not-sync.rs}}
```
diff --git a/book/src/internals.md b/book/en/src/internals.md
index 0ef55e6..0ef55e6 100644
--- a/book/src/internals.md
+++ b/book/en/src/internals.md
diff --git a/book/src/internals/ceilings.md b/book/en/src/internals/ceilings.md
index 2c645a4..2c645a4 100644
--- a/book/src/internals/ceilings.md
+++ b/book/en/src/internals/ceilings.md
diff --git a/book/src/internals/tasks.md b/book/en/src/internals/tasks.md
index 85f783f..85f783f 100644
--- a/book/src/internals/tasks.md
+++ b/book/en/src/internals/tasks.md
diff --git a/book/src/internals/timer-queue.md b/book/en/src/internals/timer-queue.md
index 7059285..7059285 100644
--- a/book/src/internals/timer-queue.md
+++ b/book/en/src/internals/timer-queue.md
diff --git a/book/src/preface.md b/book/en/src/preface.md
index 9bc0401..d8f64fd 100644
--- a/book/src/preface.md
+++ b/book/en/src/preface.md
@@ -9,8 +9,8 @@ This book contains user level documentation for the Real Time For the Masses
There is a translation of this book in [Russian].
-[Russian]: ru/index.html
+[Russian]: ../ru/index.html
-{{#include ../../README.md:5:46}}
+{{#include ../../../README.md:5:46}}
-{{#include ../../README.md:52:}}
+{{#include ../../../README.md:52:}}
diff --git a/ru/book.toml b/book/ru/book.toml
index c611ce0..c611ce0 100644
--- a/ru/book.toml
+++ b/book/ru/book.toml
diff --git a/ru/src/README_RU.md b/book/ru/src/README_RU.md
index 921837a..921837a 100644
--- a/ru/src/README_RU.md
+++ b/book/ru/src/README_RU.md
diff --git a/ru/src/SUMMARY.md b/book/ru/src/SUMMARY.md
index 7831e41..7831e41 100644
--- a/ru/src/SUMMARY.md
+++ b/book/ru/src/SUMMARY.md
diff --git a/ru/src/by-example.md b/book/ru/src/by-example.md
index c7a2a4a..c7a2a4a 100644
--- a/ru/src/by-example.md
+++ b/book/ru/src/by-example.md
diff --git a/ru/src/by-example/app.md b/book/ru/src/by-example/app.md
index bcd778d..18147dc 100644
--- a/ru/src/by-example/app.md
+++ b/book/ru/src/by-example/app.md
@@ -3,7 +3,7 @@
Это наименьшая возможная программа на RTFM:
``` rust
-{{#include ../../../examples/smallest.rs}}
+{{#include ../../../../examples/smallest.rs}}
```
Все программы на RTFM используют атрибут [`app`] (`#[app(..)]`). Этот атрибут
@@ -44,14 +44,14 @@
демонстрирует безопасный доступ к переменной `static mut`.
``` rust
-{{#include ../../../examples/init.rs}}
+{{#include ../../../../examples/init.rs}}
```
Запуск примера напечатает `init` в консоли и завершит процесс QEMU.
``` console
$ cargo run --example init
-{{#include ../../../ci/expected/init.run}}```
+{{#include ../../../../ci/expected/init.run}}```
## `idle`
@@ -74,12 +74,12 @@ $ cargo run --example init
В примере ниже показан запуск `idle` после `init`.
``` rust
-{{#include ../../../examples/idle.rs}}
+{{#include ../../../../examples/idle.rs}}
```
``` console
$ cargo run --example idle
-{{#include ../../../ci/expected/idle.run}}```
+{{#include ../../../../ci/expected/idle.run}}```
## `interrupt` / `exception`
@@ -89,12 +89,12 @@ $ cargo run --example idle
*аппаратными* задачами.
``` rust
-{{#include ../../../examples/interrupt.rs}}
+{{#include ../../../../examples/interrupt.rs}}
```
``` console
$ cargo run --example interrupt
-{{#include ../../../ci/expected/interrupt.run}}```
+{{#include ../../../../ci/expected/interrupt.run}}```
До сих пор программы RTFM, которые мы видели не отличались от программ, которые
можно написать, используя только библиотеку `cortex-m-rt`. В следующем разделе
diff --git a/ru/src/by-example/new.md b/book/ru/src/by-example/new.md
index f3aa455..688935e 100644
--- a/ru/src/by-example/new.md
+++ b/book/ru/src/by-example/new.md
@@ -64,4 +64,4 @@ $ cargo add panic-semihosting
``` console
$ # ПРИМЕЧАНИЕ: Я раскомментировал опцию `runner` в `.cargo/config`
$ cargo run
-{{#include ../../../ci/expected/init.run}}```
+{{#include ../../../../ci/expected/init.run}}```
diff --git a/ru/src/by-example/resources.md b/book/ru/src/by-example/resources.md
index 096c803..3e8a606 100644
--- a/ru/src/by-example/resources.md
+++ b/book/ru/src/by-example/resources.md
@@ -19,12 +19,12 @@
К ресурсу `SHARED` можно получить доступ только из этих двух прерываний.
``` rust
-{{#include ../../../examples/resource.rs}}
+{{#include ../../../../examples/resource.rs}}
```
``` console
$ cargo run --example resource
-{{#include ../../../ci/expected/resource.run}}
+{{#include ../../../../ci/expected/resource.run}}
```
## Приоритеты
@@ -64,12 +64,12 @@ API критической секции, предоставляемое фрей
[`lock`]: ../../api/rtfm/trait.Mutex.html#method.lock
``` rust
-{{#include ../../../examples/lock.rs}}
+{{#include ../../../../examples/lock.rs}}
```
``` console
$ cargo run --example lock
-{{#include ../../../ci/expected/lock.run}}```
+{{#include ../../../../ci/expected/lock.run}}```
## Поздние ресурсы
@@ -93,12 +93,12 @@ $ cargo run --example lock
[`Queue`]: ../../api/heapless/spsc/struct.Queue.html
``` rust
-{{#include ../../../examples/late.rs}}
+{{#include ../../../../examples/late.rs}}
```
``` console
$ cargo run --example late
-{{#include ../../../ci/expected/late.run}}```
+{{#include ../../../../ci/expected/late.run}}```
## `static`-ресурсы
@@ -114,9 +114,9 @@ $ cargo run --example late
задачах, запущенных на разных приоритетах.
``` rust
-{{#include ../../../examples/static.rs}}
+{{#include ../../../../examples/static.rs}}
```
``` console
$ cargo run --example static
-{{#include ../../../ci/expected/static.run}}```
+{{#include ../../../../ci/expected/static.run}}```
diff --git a/ru/src/by-example/singletons.md b/book/ru/src/by-example/singletons.md
index 23ed167..d6d60ef 100644
--- a/ru/src/by-example/singletons.md
+++ b/book/ru/src/by-example/singletons.md
@@ -18,9 +18,9 @@
[`alloc-singleton`]: https://crates.io/crates/alloc-singleton
``` rust
-{{#include ../../../examples/singleton.rs}}
+{{#include ../../../../examples/singleton.rs}}
```
``` console
$ cargo run --example singleton
-{{#include ../../../ci/expected/singleton.run}}```
+{{#include ../../../../ci/expected/singleton.run}}```
diff --git a/ru/src/by-example/tasks.md b/book/ru/src/by-example/tasks.md
index f0596d3..355bd4e 100644
--- a/ru/src/by-example/tasks.md
+++ b/book/ru/src/by-example/tasks.md
@@ -19,12 +19,12 @@ RTFM также поддерживает *программные* задачи,
разных приоритетах. Трем задачам назначены 2 обработчика прерываний.
``` rust
-{{#include ../../../examples/task.rs}}
+{{#include ../../../../examples/task.rs}}
```
``` console
$ cargo run --example task
-{{#include ../../../ci/expected/task.run}}```
+{{#include ../../../../ci/expected/task.run}}```
## Передача сообщений
@@ -35,12 +35,12 @@ $ cargo run --example task
Пример ниже демонстрирует три задачи, две из которых ожидают сообщения.
``` rust
-{{#include ../../../examples/message.rs}}
+{{#include ../../../../examples/message.rs}}
```
``` console
$ cargo run --example message
-{{#include ../../../ci/expected/message.run}}```
+{{#include ../../../../ci/expected/message.run}}```
## Ёмкость
@@ -55,9 +55,9 @@ $ cargo run --example message
не определена, тогда второй вызов `spawn.foo` в `UART0` вызовет ошибку.
``` rust
-{{#include ../../../examples/capacity.rs}}
+{{#include ../../../../examples/capacity.rs}}
```
``` console
$ cargo run --example capacity
-{{#include ../../../ci/expected/capacity.run}}```
+{{#include ../../../../ci/expected/capacity.run}}```
diff --git a/ru/src/by-example/timer-queue.md b/book/ru/src/by-example/timer-queue.md
index 939192f..8995bd0 100644
--- a/ru/src/by-example/timer-queue.md
+++ b/book/ru/src/by-example/timer-queue.md
@@ -30,13 +30,13 @@
> тактов Cortex-M не реализована в `qemu-system-arm`.
``` rust
-{{#include ../../../examples/schedule.rs}}
+{{#include ../../../../examples/schedule.rs}}
```
Запуск программы на реальном оборудовании производит следующий вывод в консоли:
``` text
-{{#include ../../../ci/expected/schedule.run}}
+{{#include ../../../../ci/expected/schedule.run}}
```
## Периодические задачи
@@ -46,7 +46,7 @@
быть использованы для реализации периодических задач, как показано в примере ниже.
``` rust
-{{#include ../../../examples/periodic.rs}}
+{{#include ../../../../examples/periodic.rs}}
```
Это вывод, произведенный примером. Заметьте, что есть смещение / колебание нуля
@@ -54,7 +54,7 @@
`Instant::now` вместо `scheduled` имело бы влияние на смещение / колебание.
``` text
-{{#include ../../../ci/expected/periodic.run}}
+{{#include ../../../../ci/expected/periodic.run}}
```
## Базовое время
@@ -80,11 +80,11 @@
Пример ниже демонстрирует разное значение *базового времени*.
``` rust
-{{#include ../../../examples/baseline.rs}}
+{{#include ../../../../examples/baseline.rs}}
```
Запуск программы на реальном оборудовании произведет следующий вывод в консоли:
``` text
-{{#include ../../../ci/expected/baseline.run}}
+{{#include ../../../../ci/expected/baseline.run}}
```
diff --git a/ru/src/by-example/tips.md b/book/ru/src/by-example/tips.md
index ab0f1b5..0294512 100644
--- a/ru/src/by-example/tips.md
+++ b/book/ru/src/by-example/tips.md
@@ -8,12 +8,12 @@
ресурсами, который можно вызывать из различных задач. Вот такой пример:
``` rust
-{{#include ../../../examples/generics.rs}}
+{{#include ../../../../examples/generics.rs}}
```
``` console
$ cargo run --example generics
-{{#include ../../../ci/expected/generics.run}}```
+{{#include ../../../../ci/expected/generics.run}}```
Это также позволяет Вам изменять статические приоритеты задач без
переписывания кода. Если Вы единообразно используете `lock`-и для доступа
@@ -42,22 +42,22 @@ RTFM v0.4.x была возможность взаимодействия с др
В примере ниже показано как разместить высокоприоритетную задачу `bar` в ОЗУ.
``` rust
-{{#include ../../../examples/ramfunc.rs}}
+{{#include ../../../../examples/ramfunc.rs}}
```
Запуск этой программы произведет ожидаемый вывод.
``` console
$ cargo run --example ramfunc
-{{#include ../../../ci/expected/ramfunc.run}}```
+{{#include ../../../../ci/expected/ramfunc.run}}```
Можно посмотреть на вывод `cargo-nm`, чтобы убедиться, что `bar` расположен в ОЗУ
(`0x2000_0000`), тогда как `foo` расположен во Flash (`0x0000_0000`).
``` console
$ cargo nm --example ramfunc --release | grep ' foo::'
-{{#include ../../../ci/expected/ramfunc.grep.foo}}```
+{{#include ../../../../ci/expected/ramfunc.grep.foo}}```
``` console
$ cargo nm --example ramfunc --release | grep ' bar::'
-{{#include ../../../ci/expected/ramfunc.grep.bar}}```
+{{#include ../../../../ci/expected/ramfunc.grep.bar}}```
diff --git a/ru/src/by-example/types-send-sync.md b/book/ru/src/by-example/types-send-sync.md
index e470adf..77c9af0 100644
--- a/ru/src/by-example/types-send-sync.md
+++ b/book/ru/src/by-example/types-send-sync.md
@@ -13,7 +13,7 @@
В примере ниже сгенерированы разные типы с помощью атрибута `app`.
``` rust
-{{#include ../../../examples/types.rs}}
+{{#include ../../../../examples/types.rs}}
```
## `Send`
@@ -35,7 +35,7 @@
В примере ниже показано, где можно использовать типы, не реализующие `Send`.
``` rust
-{{#include ../../../examples/not-send.rs}}
+{{#include ../../../../examples/not-send.rs}}
```
## `Sync`
@@ -55,5 +55,5 @@
В примере ниже показано, где можно использовать типы, не реализующие `Sync`.
``` rust
-{{#include ../../../examples/not-sync.rs}}
+{{#include ../../../../examples/not-sync.rs}}
```
diff --git a/ru/src/internals.md b/book/ru/src/internals.md
index 4a47e77..4a47e77 100644
--- a/ru/src/internals.md
+++ b/book/ru/src/internals.md
diff --git a/ru/src/internals/ceilings.md b/book/ru/src/internals/ceilings.md
index 2c645a4..2c645a4 100644
--- a/ru/src/internals/ceilings.md
+++ b/book/ru/src/internals/ceilings.md
diff --git a/ru/src/internals/tasks.md b/book/ru/src/internals/tasks.md
index 85f783f..85f783f 100644
--- a/ru/src/internals/tasks.md
+++ b/book/ru/src/internals/tasks.md
diff --git a/ru/src/internals/timer-queue.md b/book/ru/src/internals/timer-queue.md
index 7059285..7059285 100644
--- a/ru/src/internals/timer-queue.md
+++ b/book/ru/src/internals/timer-queue.md
diff --git a/ru/src/preface.md b/book/ru/src/preface.md
index 8aa53ad..ee01d10 100644
--- a/ru/src/preface.md
+++ b/book/ru/src/preface.md
@@ -7,6 +7,6 @@
Эта книга содержит документацию уровня пользователя фреймворком Real Time For the Masses
(RTFM). Описание API можно найти [здесь](../api/rtfm/index.html).
-{{#include README_RU.md:5:54}}
+{{#include ../..ADME_RU.md:5:54}}
-{{#include README_RU.md:60:}}
+{{#include ../..ADME_RU.md:60:}}
diff --git a/ci/script.sh b/ci/script.sh
index 8878d92..645db3a 100644
--- a/ci/script.sh
+++ b/ci/script.sh
@@ -23,15 +23,19 @@ main() {
else
cargo doc
fi
- ( cd book && mdbook build )
- ( cd ru && mdbook build )
+ ( cd book/en && mdbook build )
+ ( cd book/ru && mdbook build )
local td=$(mktemp -d)
cp -r target/doc $td/api
- cp -r book/book $td/
- cp LICENSE-* $td/book/
-
- linkchecker $td/book/
+ mkdir $td/book
+ cp -r book/en/book $td/book/en
+ cp -r book/ru/book $td/book/ru
+ cp LICENSE-* $td/book/en
+ cp LICENSE-* $td/book/ru
+
+ linkchecker $td/book/en/
+ linkchecker $td/book/ru/
linkchecker $td/api/rtfm/
linkchecker $td/api/cortex_m_rtfm_macros/
fi
diff --git a/src/lib.rs b/src/lib.rs
index 4756702..9dc5175 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -7,7 +7,7 @@
//!
//! The user level documentation can be found [here].
//!
-//! [here]: https://japaric.github.io/cortex-m-rtfm/book/
+//! [here]: https://japaric.github.io/cortex-m-rtfm/book/en/
//!
//! Don't forget to check the documentation of the [`#[app]`] attribute, which is the main component
//! of the framework.