aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorJames Munns <[email protected]>2024-07-18 15:11:54 +0000
committerGitHub <[email protected]>2024-07-18 15:11:54 +0000
commit2766993099b6604739ae25724aa2f6a9877d9902 (patch)
treea4b80bc17476d163da89599ae049eaa9ce304178 /docs
parent5e625f274ac567fcbb37ba797629c6b3d33fad2b (diff)
parentaf9c7379f99b309a99b0b573ebfb8ea1bebecaf9 (diff)
Merge pull request #3159 from kalkyl/shared-bus
Add example for shared I2C and SPI buses
Diffstat (limited to 'docs')
-rw-r--r--docs/pages/sharing_peripherals.adoc6
1 files changed, 5 insertions, 1 deletions
diff --git a/docs/pages/sharing_peripherals.adoc b/docs/pages/sharing_peripherals.adoc
index ebd899c4e..6ba13f93b 100644
--- a/docs/pages/sharing_peripherals.adoc
+++ b/docs/pages/sharing_peripherals.adoc
@@ -127,4 +127,8 @@ async fn toggle_led(control: Sender<'static, ThreadModeRawMutex, LedState, 64>,
127This example replaces the Mutex with a Channel, and uses another task (the main loop) to drive the LED. The advantage of this approach is that only a single task references the peripheral, separating concerns. However, using a Mutex has a lower overhead and might be necessary if you need to ensure 127This example replaces the Mutex with a Channel, and uses another task (the main loop) to drive the LED. The advantage of this approach is that only a single task references the peripheral, separating concerns. However, using a Mutex has a lower overhead and might be necessary if you need to ensure
128that the operation is completed before continuing to do other work in your task. 128that the operation is completed before continuing to do other work in your task.
129 129
130An example showcasing more methods for sharing link:https://github.com/embassy-rs/embassy/blob/main/examples/rp/src/bin/sharing.rs[can be found here]. \ No newline at end of file 130An example showcasing more methods for sharing link:https://github.com/embassy-rs/embassy/blob/main/examples/rp/src/bin/sharing.rs[can be found here].
131
132== Sharing an I2C or SPI bus between multiple devices
133
134An example of how to deal with multiple devices sharing a common I2C or SPI bus link:https://github.com/embassy-rs/embassy/blob/main/examples/rp/src/bin/shared_bus.rs[can be found here].