Skip to content

Commit 1bc8e0c

Browse files
committed
add embassy chapter
1 parent 2463ede commit 1bc8e0c

1 file changed

Lines changed: 21 additions & 3 deletions

File tree

src/concurrency/index.md

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -565,15 +565,33 @@ safely, without requiring the overhead of always entering critical sections and
565565
using reference counting (as in `RefCell`). This has a number of advantages such
566566
as guaranteeing no deadlocks and giving extremely low time and memory overhead.
567567

568-
[RTIC framework]: https://github.com/rtic-rs/cortex-m-rtic
568+
[RTIC framework]: https://rtic.rs/2/book/en
569+
570+
RTIC comes with as asynchronous executor, so your software tasks are `async` functions where
571+
you can use `async` APIs in addition to regular synchronous APIs.
569572

570573
The framework also includes other features like message passing, which reduces
571574
the need for explicit shared state, and the ability to schedule tasks to run at
572-
a given time, which can be used to implement periodic tasks. Check out [the
573-
documentation] for more information!
575+
a given time, which can be used to implement periodic tasks.
576+
Check out [the documentation] for more information!
574577

575578
[the documentation]: https://rtic.rs
576579

580+
## Embassy
581+
582+
Embassy is an ecosystem of libraries which focus on using the `async` / `await` syntax
583+
included in Rust for concurrency. The core of embassy is its [asynchronous executor](https://docs.rs/embassy-executor/latest/embassy_executor/)
584+
which supports most common MCU architectures.
585+
586+
embassy also takes a battery-included approach and offers many other components, for example:
587+
588+
- [Time library](https://docs.rs/embassy-time/latest/embassy_time/)
589+
- Various HAL libraries which also provide the time library support.
590+
- [embassy-sync](https://docs.embassy.dev/embassy-sync/git/default/index.html) for synchronization primitives
591+
592+
You can check the [website](https://embassy.dev/) and the [book](https://embassy.dev/book/) for more
593+
information.
594+
577595
## Real Time Operating Systems
578596

579597
Another common model for embedded concurrency is the real-time operating system

0 commit comments

Comments
 (0)