diff options
Diffstat (limited to 'examples/rp')
| -rw-r--r-- | examples/rp/Cargo.toml | 6 | ||||
| -rw-r--r-- | examples/rp/src/bin/pio_uart.rs | 11 | ||||
| -rw-r--r-- | examples/rp/src/bin/wifi_ap_tcp_server.rs | 3 | ||||
| -rw-r--r-- | examples/rp/src/bin/wifi_scan.rs | 3 | ||||
| -rw-r--r-- | examples/rp/src/bin/wifi_tcp_server.rs | 3 |
5 files changed, 11 insertions, 15 deletions
diff --git a/examples/rp/Cargo.toml b/examples/rp/Cargo.toml index e0e0d8a78..08898e96d 100644 --- a/examples/rp/Cargo.toml +++ b/examples/rp/Cargo.toml | |||
| @@ -9,10 +9,10 @@ license = "MIT OR Apache-2.0" | |||
| 9 | embassy-embedded-hal = { version = "0.1.0", path = "../../embassy-embedded-hal", features = ["defmt"] } | 9 | embassy-embedded-hal = { version = "0.1.0", path = "../../embassy-embedded-hal", features = ["defmt"] } |
| 10 | embassy-sync = { version = "0.4.0", path = "../../embassy-sync", features = ["defmt"] } | 10 | embassy-sync = { version = "0.4.0", path = "../../embassy-sync", features = ["defmt"] } |
| 11 | embassy-executor = { version = "0.3.3", path = "../../embassy-executor", features = ["nightly", "arch-cortex-m", "executor-thread", "executor-interrupt", "defmt", "integrated-timers"] } | 11 | embassy-executor = { version = "0.3.3", path = "../../embassy-executor", features = ["nightly", "arch-cortex-m", "executor-thread", "executor-interrupt", "defmt", "integrated-timers"] } |
| 12 | embassy-time = { version = "0.1.5", path = "../../embassy-time", features = ["nightly", "unstable-traits", "defmt", "defmt-timestamp-uptime"] } | 12 | embassy-time = { version = "0.1.5", path = "../../embassy-time", features = ["defmt", "defmt-timestamp-uptime"] } |
| 13 | embassy-rp = { version = "0.1.0", path = "../../embassy-rp", features = ["defmt", "unstable-traits", "nightly", "unstable-pac", "time-driver", "critical-section-impl"] } | 13 | embassy-rp = { version = "0.1.0", path = "../../embassy-rp", features = ["defmt", "unstable-pac", "time-driver", "critical-section-impl"] } |
| 14 | embassy-usb = { version = "0.1.0", path = "../../embassy-usb", features = ["defmt"] } | 14 | embassy-usb = { version = "0.1.0", path = "../../embassy-usb", features = ["defmt"] } |
| 15 | embassy-net = { version = "0.2.0", path = "../../embassy-net", features = ["defmt", "nightly", "tcp", "udp", "dhcpv4", "medium-ethernet"] } | 15 | embassy-net = { version = "0.2.0", path = "../../embassy-net", features = ["defmt", "tcp", "udp", "dhcpv4", "medium-ethernet"] } |
| 16 | embassy-net-wiznet = { version = "0.1.0", path = "../../embassy-net-wiznet", features = ["defmt"] } | 16 | embassy-net-wiznet = { version = "0.1.0", path = "../../embassy-net-wiznet", features = ["defmt"] } |
| 17 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } | 17 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } |
| 18 | embassy-usb-logger = { version = "0.1.0", path = "../../embassy-usb-logger" } | 18 | embassy-usb-logger = { version = "0.1.0", path = "../../embassy-usb-logger" } |
diff --git a/examples/rp/src/bin/pio_uart.rs b/examples/rp/src/bin/pio_uart.rs index fb9d423ec..c0ea23607 100644 --- a/examples/rp/src/bin/pio_uart.rs +++ b/examples/rp/src/bin/pio_uart.rs | |||
| @@ -9,8 +9,7 @@ | |||
| 9 | #![no_std] | 9 | #![no_std] |
| 10 | #![no_main] | 10 | #![no_main] |
| 11 | #![feature(type_alias_impl_trait)] | 11 | #![feature(type_alias_impl_trait)] |
| 12 | #![feature(async_fn_in_trait)] | 12 | #![allow(async_fn_in_trait)] |
| 13 | #![allow(stable_features, unknown_lints, async_fn_in_trait)] | ||
| 14 | 13 | ||
| 15 | use defmt::{info, panic, trace}; | 14 | use defmt::{info, panic, trace}; |
| 16 | use embassy_executor::Spawner; | 15 | use embassy_executor::Spawner; |
| @@ -148,7 +147,7 @@ async fn usb_read<'d, T: Instance + 'd>( | |||
| 148 | let n = usb_rx.read_packet(&mut buf).await?; | 147 | let n = usb_rx.read_packet(&mut buf).await?; |
| 149 | let data = &buf[..n]; | 148 | let data = &buf[..n]; |
| 150 | trace!("USB IN: {:x}", data); | 149 | trace!("USB IN: {:x}", data); |
| 151 | uart_pipe_writer.write(data).await; | 150 | (*uart_pipe_writer).write(data).await; |
| 152 | } | 151 | } |
| 153 | } | 152 | } |
| 154 | 153 | ||
| @@ -159,7 +158,7 @@ async fn usb_write<'d, T: Instance + 'd>( | |||
| 159 | ) -> Result<(), Disconnected> { | 158 | ) -> Result<(), Disconnected> { |
| 160 | let mut buf = [0; 64]; | 159 | let mut buf = [0; 64]; |
| 161 | loop { | 160 | loop { |
| 162 | let n = usb_pipe_reader.read(&mut buf).await; | 161 | let n = (*usb_pipe_reader).read(&mut buf).await; |
| 163 | let data = &buf[..n]; | 162 | let data = &buf[..n]; |
| 164 | trace!("USB OUT: {:x}", data); | 163 | trace!("USB OUT: {:x}", data); |
| 165 | usb_tx.write_packet(&data).await?; | 164 | usb_tx.write_packet(&data).await?; |
| @@ -179,7 +178,7 @@ async fn uart_read( | |||
| 179 | } | 178 | } |
| 180 | let data = &buf[..n]; | 179 | let data = &buf[..n]; |
| 181 | trace!("UART IN: {:x}", buf); | 180 | trace!("UART IN: {:x}", buf); |
| 182 | usb_pipe_writer.write(data).await; | 181 | (*usb_pipe_writer).write(data).await; |
| 183 | } | 182 | } |
| 184 | } | 183 | } |
| 185 | 184 | ||
| @@ -190,7 +189,7 @@ async fn uart_write( | |||
| 190 | ) -> ! { | 189 | ) -> ! { |
| 191 | let mut buf = [0; 64]; | 190 | let mut buf = [0; 64]; |
| 192 | loop { | 191 | loop { |
| 193 | let n = uart_pipe_reader.read(&mut buf).await; | 192 | let n = (*uart_pipe_reader).read(&mut buf).await; |
| 194 | let data = &buf[..n]; | 193 | let data = &buf[..n]; |
| 195 | trace!("UART OUT: {:x}", data); | 194 | trace!("UART OUT: {:x}", data); |
| 196 | let _ = uart_tx.write(&data).await; | 195 | let _ = uart_tx.write(&data).await; |
diff --git a/examples/rp/src/bin/wifi_ap_tcp_server.rs b/examples/rp/src/bin/wifi_ap_tcp_server.rs index b5344c185..ad1fa6462 100644 --- a/examples/rp/src/bin/wifi_ap_tcp_server.rs +++ b/examples/rp/src/bin/wifi_ap_tcp_server.rs | |||
| @@ -4,8 +4,7 @@ | |||
| 4 | #![no_std] | 4 | #![no_std] |
| 5 | #![no_main] | 5 | #![no_main] |
| 6 | #![feature(type_alias_impl_trait)] | 6 | #![feature(type_alias_impl_trait)] |
| 7 | #![feature(async_fn_in_trait)] | 7 | #![allow(async_fn_in_trait)] |
| 8 | #![allow(stable_features, unknown_lints, async_fn_in_trait)] | ||
| 9 | 8 | ||
| 10 | use core::str::from_utf8; | 9 | use core::str::from_utf8; |
| 11 | 10 | ||
diff --git a/examples/rp/src/bin/wifi_scan.rs b/examples/rp/src/bin/wifi_scan.rs index f2acaf3e8..7adf52b88 100644 --- a/examples/rp/src/bin/wifi_scan.rs +++ b/examples/rp/src/bin/wifi_scan.rs | |||
| @@ -4,8 +4,7 @@ | |||
| 4 | #![no_std] | 4 | #![no_std] |
| 5 | #![no_main] | 5 | #![no_main] |
| 6 | #![feature(type_alias_impl_trait)] | 6 | #![feature(type_alias_impl_trait)] |
| 7 | #![feature(async_fn_in_trait)] | 7 | #![allow(async_fn_in_trait)] |
| 8 | #![allow(stable_features, unknown_lints, async_fn_in_trait)] | ||
| 9 | 8 | ||
| 10 | use core::str; | 9 | use core::str; |
| 11 | 10 | ||
diff --git a/examples/rp/src/bin/wifi_tcp_server.rs b/examples/rp/src/bin/wifi_tcp_server.rs index 4e74ad117..ec6b4ee74 100644 --- a/examples/rp/src/bin/wifi_tcp_server.rs +++ b/examples/rp/src/bin/wifi_tcp_server.rs | |||
| @@ -4,8 +4,7 @@ | |||
| 4 | #![no_std] | 4 | #![no_std] |
| 5 | #![no_main] | 5 | #![no_main] |
| 6 | #![feature(type_alias_impl_trait)] | 6 | #![feature(type_alias_impl_trait)] |
| 7 | #![feature(async_fn_in_trait)] | 7 | #![allow(async_fn_in_trait)] |
| 8 | #![allow(stable_features, unknown_lints, async_fn_in_trait)] | ||
| 9 | 8 | ||
| 10 | use core::str::from_utf8; | 9 | use core::str::from_utf8; |
| 11 | 10 | ||
