aboutsummaryrefslogtreecommitdiff
path: root/book/en/src/rtic_and_embassy.md
diff options
context:
space:
mode:
authordatdenkikniet <jcdra1@gmail.com>2023-05-20 11:45:23 +0200
committerdatdenkikniet <jcdra1@gmail.com>2023-05-20 11:45:56 +0200
commit039c2b8bd440018531d79785c63bbfb74f0e686c (patch)
tree346f21e38ea2dea583d1ca62fe36f4c3accb42ff /book/en/src/rtic_and_embassy.md
parent4b3bf59215d682e9473ca66545a1f7c2acbccbfe (diff)
Add some docs on RTIC AND embassy
Diffstat (limited to 'book/en/src/rtic_and_embassy.md')
-rw-r--r--book/en/src/rtic_and_embassy.md17
1 files changed, 17 insertions, 0 deletions
diff --git a/book/en/src/rtic_and_embassy.md b/book/en/src/rtic_and_embassy.md
new file mode 100644
index 0000000..c1347aa
--- /dev/null
+++ b/book/en/src/rtic_and_embassy.md
@@ -0,0 +1,17 @@
+# RTIC vs. Embassy
+
+## Differences
+
+Embassy provides both Hardware Abstraction Layers, and an executor/runtime, while RTIC aims to only provide an execution framework. For example, embassy provides `embassy-stm32` (a HAL), and `embassy-executor` (an executor). On the other hand, RTIC provides the framework in the form of [`rtic`], and the user is responsible for providing a PAC and HAL implementation (generally from the [`stm32-rs`] project).
+
+Additionally, RTIC aims to provide exclusive access to resources on as low a level of possible, ideally guarded by some form of hardware protection. This allows for access to hardware while not necessarily requiring locking mechanisms on the software level.
+
+## Mixing use of Embassy and RTIC
+
+Since most Embassy and RTIC libraries are runtime agnostic, many details from one project can be used in the other. For example, using [`rtic-monotonics`] in an `embassy-executor` powered project works, and using [`embassy-sync`] (though [`rtic-sync`] is recommended) in an RTIC project works.
+
+[`stm32-rs`]: https://github.com/stm32-rs
+[`rtic`]: https://docs.rs/rtic/latest/rtic/
+[`rtic-monotonics`]: https://docs.rs/rtic-monotonics/latest/rtic_monotonics/
+[`embassy-sync`]: https://docs.rs/embassy-sync/latest/embassy_sync/
+[`rtic-sync`]: https://docs.rs/rtic-sync/latest/rtic_sync/ \ No newline at end of file