diff options
| author | Dario Nieuwenhuis <[email protected]> | 2024-04-26 23:18:28 +0200 |
|---|---|---|
| committer | Dario Nieuwenhuis <[email protected]> | 2024-04-26 23:22:25 +0200 |
| commit | 5732ee7ca975c0dd1afa83ade1667a2599d20985 (patch) | |
| tree | f627117733d3fcd5bbb4eb664559c387a8e81f33 /examples/stm32f4 | |
| parent | 597315873dbef394ae4cefe0af740fcb1bb951e0 (diff) | |
Reduce use of the full `futures` crate.
Diffstat (limited to 'examples/stm32f4')
| -rw-r--r-- | examples/stm32f4/Cargo.toml | 3 | ||||
| -rw-r--r-- | examples/stm32f4/src/bin/i2c_comparison.rs | 2 | ||||
| -rw-r--r-- | examples/stm32f4/src/bin/usb_hid_keyboard.rs | 2 | ||||
| -rw-r--r-- | examples/stm32f4/src/bin/usb_hid_mouse.rs | 2 | ||||
| -rw-r--r-- | examples/stm32f4/src/bin/usb_serial.rs | 2 |
5 files changed, 6 insertions, 5 deletions
diff --git a/examples/stm32f4/Cargo.toml b/examples/stm32f4/Cargo.toml index e6a9141e7..64ac50818 100644 --- a/examples/stm32f4/Cargo.toml +++ b/examples/stm32f4/Cargo.toml | |||
| @@ -12,6 +12,7 @@ embassy-executor = { version = "0.5.0", path = "../../embassy-executor", feature | |||
| 12 | embassy-time = { version = "0.3.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } | 12 | embassy-time = { version = "0.3.0", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime", "tick-hz-32_768"] } |
| 13 | embassy-usb = { version = "0.2.0", path = "../../embassy-usb", features = ["defmt" ] } | 13 | embassy-usb = { version = "0.2.0", path = "../../embassy-usb", features = ["defmt" ] } |
| 14 | embassy-net = { version = "0.4.0", path = "../../embassy-net", features = ["defmt", "tcp", "dhcpv4", "medium-ethernet", ] } | 14 | embassy-net = { version = "0.4.0", path = "../../embassy-net", features = ["defmt", "tcp", "dhcpv4", "medium-ethernet", ] } |
| 15 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } | ||
| 15 | 16 | ||
| 16 | defmt = "0.3" | 17 | defmt = "0.3" |
| 17 | defmt-rtt = "0.4" | 18 | defmt-rtt = "0.4" |
| @@ -22,7 +23,7 @@ embedded-hal = "0.2.6" | |||
| 22 | embedded-io = { version = "0.6.0" } | 23 | embedded-io = { version = "0.6.0" } |
| 23 | embedded-io-async = { version = "0.6.1" } | 24 | embedded-io-async = { version = "0.6.1" } |
| 24 | panic-probe = { version = "0.3", features = ["print-defmt"] } | 25 | panic-probe = { version = "0.3", features = ["print-defmt"] } |
| 25 | futures = { version = "0.3.17", default-features = false, features = ["async-await"] } | 26 | futures-util = { version = "0.3.30", default-features = false } |
| 26 | heapless = { version = "0.8", default-features = false } | 27 | heapless = { version = "0.8", default-features = false } |
| 27 | nb = "1.0.0" | 28 | nb = "1.0.0" |
| 28 | embedded-storage = "0.3.1" | 29 | embedded-storage = "0.3.1" |
diff --git a/examples/stm32f4/src/bin/i2c_comparison.rs b/examples/stm32f4/src/bin/i2c_comparison.rs index 30cfbdf57..55c4891e3 100644 --- a/examples/stm32f4/src/bin/i2c_comparison.rs +++ b/examples/stm32f4/src/bin/i2c_comparison.rs | |||
| @@ -13,7 +13,7 @@ use embassy_stm32::i2c::I2c; | |||
| 13 | use embassy_stm32::time::Hertz; | 13 | use embassy_stm32::time::Hertz; |
| 14 | use embassy_stm32::{bind_interrupts, i2c, peripherals}; | 14 | use embassy_stm32::{bind_interrupts, i2c, peripherals}; |
| 15 | use embassy_time::Instant; | 15 | use embassy_time::Instant; |
| 16 | use futures::future::try_join3; | 16 | use futures_util::future::try_join3; |
| 17 | use {defmt_rtt as _, panic_probe as _}; | 17 | use {defmt_rtt as _, panic_probe as _}; |
| 18 | 18 | ||
| 19 | const ADDRESS: u8 = 96; | 19 | const ADDRESS: u8 = 96; |
diff --git a/examples/stm32f4/src/bin/usb_hid_keyboard.rs b/examples/stm32f4/src/bin/usb_hid_keyboard.rs index d48ae4a17..de9b692b1 100644 --- a/examples/stm32f4/src/bin/usb_hid_keyboard.rs +++ b/examples/stm32f4/src/bin/usb_hid_keyboard.rs | |||
| @@ -5,6 +5,7 @@ use core::sync::atomic::{AtomicBool, Ordering}; | |||
| 5 | 5 | ||
| 6 | use defmt::*; | 6 | use defmt::*; |
| 7 | use embassy_executor::Spawner; | 7 | use embassy_executor::Spawner; |
| 8 | use embassy_futures::join::join; | ||
| 8 | use embassy_stm32::exti::ExtiInput; | 9 | use embassy_stm32::exti::ExtiInput; |
| 9 | use embassy_stm32::gpio::Pull; | 10 | use embassy_stm32::gpio::Pull; |
| 10 | use embassy_stm32::time::Hertz; | 11 | use embassy_stm32::time::Hertz; |
| @@ -13,7 +14,6 @@ use embassy_stm32::{bind_interrupts, peripherals, usb, Config}; | |||
| 13 | use embassy_usb::class::hid::{HidReaderWriter, ReportId, RequestHandler, State}; | 14 | use embassy_usb::class::hid::{HidReaderWriter, ReportId, RequestHandler, State}; |
| 14 | use embassy_usb::control::OutResponse; | 15 | use embassy_usb::control::OutResponse; |
| 15 | use embassy_usb::{Builder, Handler}; | 16 | use embassy_usb::{Builder, Handler}; |
| 16 | use futures::future::join; | ||
| 17 | use usbd_hid::descriptor::{KeyboardReport, SerializedDescriptor}; | 17 | use usbd_hid::descriptor::{KeyboardReport, SerializedDescriptor}; |
| 18 | use {defmt_rtt as _, panic_probe as _}; | 18 | use {defmt_rtt as _, panic_probe as _}; |
| 19 | 19 | ||
diff --git a/examples/stm32f4/src/bin/usb_hid_mouse.rs b/examples/stm32f4/src/bin/usb_hid_mouse.rs index c35f4b002..d15ad52dc 100644 --- a/examples/stm32f4/src/bin/usb_hid_mouse.rs +++ b/examples/stm32f4/src/bin/usb_hid_mouse.rs | |||
| @@ -3,6 +3,7 @@ | |||
| 3 | 3 | ||
| 4 | use defmt::*; | 4 | use defmt::*; |
| 5 | use embassy_executor::Spawner; | 5 | use embassy_executor::Spawner; |
| 6 | use embassy_futures::join::join; | ||
| 6 | use embassy_stm32::time::Hertz; | 7 | use embassy_stm32::time::Hertz; |
| 7 | use embassy_stm32::usb::Driver; | 8 | use embassy_stm32::usb::Driver; |
| 8 | use embassy_stm32::{bind_interrupts, peripherals, usb, Config}; | 9 | use embassy_stm32::{bind_interrupts, peripherals, usb, Config}; |
| @@ -10,7 +11,6 @@ use embassy_time::Timer; | |||
| 10 | use embassy_usb::class::hid::{HidWriter, ReportId, RequestHandler, State}; | 11 | use embassy_usb::class::hid::{HidWriter, ReportId, RequestHandler, State}; |
| 11 | use embassy_usb::control::OutResponse; | 12 | use embassy_usb::control::OutResponse; |
| 12 | use embassy_usb::Builder; | 13 | use embassy_usb::Builder; |
| 13 | use futures::future::join; | ||
| 14 | use usbd_hid::descriptor::{MouseReport, SerializedDescriptor}; | 14 | use usbd_hid::descriptor::{MouseReport, SerializedDescriptor}; |
| 15 | use {defmt_rtt as _, panic_probe as _}; | 15 | use {defmt_rtt as _, panic_probe as _}; |
| 16 | 16 | ||
diff --git a/examples/stm32f4/src/bin/usb_serial.rs b/examples/stm32f4/src/bin/usb_serial.rs index 25806dd85..91cfae87b 100644 --- a/examples/stm32f4/src/bin/usb_serial.rs +++ b/examples/stm32f4/src/bin/usb_serial.rs | |||
| @@ -3,13 +3,13 @@ | |||
| 3 | 3 | ||
| 4 | use defmt::{panic, *}; | 4 | use defmt::{panic, *}; |
| 5 | use embassy_executor::Spawner; | 5 | use embassy_executor::Spawner; |
| 6 | use embassy_futures::join::join; | ||
| 6 | use embassy_stm32::time::Hertz; | 7 | use embassy_stm32::time::Hertz; |
| 7 | use embassy_stm32::usb::{Driver, Instance}; | 8 | use embassy_stm32::usb::{Driver, Instance}; |
| 8 | use embassy_stm32::{bind_interrupts, peripherals, usb, Config}; | 9 | use embassy_stm32::{bind_interrupts, peripherals, usb, Config}; |
| 9 | use embassy_usb::class::cdc_acm::{CdcAcmClass, State}; | 10 | use embassy_usb::class::cdc_acm::{CdcAcmClass, State}; |
| 10 | use embassy_usb::driver::EndpointError; | 11 | use embassy_usb::driver::EndpointError; |
| 11 | use embassy_usb::Builder; | 12 | use embassy_usb::Builder; |
| 12 | use futures::future::join; | ||
| 13 | use {defmt_rtt as _, panic_probe as _}; | 13 | use {defmt_rtt as _, panic_probe as _}; |
| 14 | 14 | ||
| 15 | bind_interrupts!(struct Irqs { | 15 | bind_interrupts!(struct Irqs { |
