diff options
author | Henrik Alsér <henrik.alser@me.com> | 2022-05-07 09:47:29 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-07 09:47:29 +0200 |
commit | 1ca5475010a1cae6ebc55a27948ca4320decd5cd (patch) | |
tree | 2484384d601823b4dfe96c2bc4bf2d260b34c5f1 /examples/nrf | |
parent | 108a98136096f8b530266aa6687bdbbed4a6a382 (diff) | |
parent | a4bf190f2f0ce28a298626de6de1c8059269cedc (diff) | |
download | embassy-1ca5475010a1cae6ebc55a27948ca4320decd5cd.zip |
Merge branch 'embassy-rs:master' into qdec
Diffstat (limited to 'examples/nrf')
-rw-r--r-- | examples/nrf/Cargo.toml | 3 | ||||
-rw-r--r-- | examples/nrf/src/bin/buffered_uart.rs | 2 | ||||
-rw-r--r-- | examples/nrf/src/bin/usb_ethernet.rs | 8 |
3 files changed, 8 insertions, 5 deletions
diff --git a/examples/nrf/Cargo.toml b/examples/nrf/Cargo.toml index 4258544f..ffac0a76 100644 --- a/examples/nrf/Cargo.toml +++ b/examples/nrf/Cargo.toml @@ -6,7 +6,7 @@ version = "0.1.0" [features] default = ["nightly"] -nightly = ["embassy-nrf/nightly", "embassy-nrf/unstable-traits", "embassy-usb", "embassy-usb-serial", "embassy-usb-hid", "embassy-usb-ncm"] +nightly = ["embassy-nrf/nightly", "embassy-nrf/unstable-traits", "embassy-usb", "embassy-usb-serial", "embassy-usb-hid", "embassy-usb-ncm", "embedded-io/async", "embassy-net/nightly"] [dependencies] embassy = { version = "0.1.0", path = "../../embassy", features = ["defmt", "defmt-timestamp-uptime"] } @@ -16,6 +16,7 @@ embassy-usb = { version = "0.1.0", path = "../../embassy-usb", features = ["defm embassy-usb-serial = { version = "0.1.0", path = "../../embassy-usb-serial", features = ["defmt"], optional = true } embassy-usb-hid = { version = "0.1.0", path = "../../embassy-usb-hid", features = ["defmt"], optional = true } embassy-usb-ncm = { version = "0.1.0", path = "../../embassy-usb-ncm", features = ["defmt"], optional = true } +embedded-io = "0.2.0" defmt = "0.3" defmt-rtt = "0.3" diff --git a/examples/nrf/src/bin/buffered_uart.rs b/examples/nrf/src/bin/buffered_uart.rs index 2cd163a9..a64c5821 100644 --- a/examples/nrf/src/bin/buffered_uart.rs +++ b/examples/nrf/src/bin/buffered_uart.rs @@ -4,9 +4,9 @@ use defmt::*; use embassy::executor::Spawner; -use embassy::io::{AsyncBufReadExt, AsyncWriteExt}; use embassy_nrf::buffered_uarte::State; use embassy_nrf::{buffered_uarte::BufferedUarte, interrupt, uarte, Peripherals}; +use embedded_io::asynch::{Read, Write}; use futures::pin_mut; use defmt_rtt as _; // global logger diff --git a/examples/nrf/src/bin/usb_ethernet.rs b/examples/nrf/src/bin/usb_ethernet.rs index f14a29c4..843487c0 100644 --- a/examples/nrf/src/bin/usb_ethernet.rs +++ b/examples/nrf/src/bin/usb_ethernet.rs @@ -10,9 +10,9 @@ use defmt::*; use embassy::blocking_mutex::raw::ThreadModeRawMutex; use embassy::channel::Channel; use embassy::executor::Spawner; -use embassy::io::{AsyncBufReadExt, AsyncWriteExt}; use embassy::util::Forever; -use embassy_net::{PacketBox, PacketBoxExt, PacketBuf, TcpSocket}; +use embassy_net::tcp::TcpSocket; +use embassy_net::{PacketBox, PacketBoxExt, PacketBuf}; use embassy_nrf::pac; use embassy_nrf::usb::Driver; use embassy_nrf::Peripherals; @@ -20,7 +20,9 @@ use embassy_nrf::{interrupt, peripherals}; use embassy_usb::{Builder, Config, UsbDevice}; use embassy_usb_ncm::{CdcNcmClass, Receiver, Sender, State}; -use defmt_rtt as _; // global logger +use defmt_rtt as _; +use embedded_io::asynch::{Read, Write}; +// global logger use panic_probe as _; type MyDriver = Driver<'static, peripherals::USBD>; |