diff options
| author | Dario Nieuwenhuis <[email protected]> | 2022-07-29 21:58:35 +0200 |
|---|---|---|
| committer | Dario Nieuwenhuis <[email protected]> | 2022-07-29 23:40:36 +0200 |
| commit | a0f1b0ee01d461607660d2d56b5b1bdc57e0d3fb (patch) | |
| tree | e60fc8f8db8ec07e55d655c1a830b07f4db0b7d2 /examples/rp/src | |
| parent | 8745d646f0976791b7098456aa61adb983fb1c18 (diff) | |
Split embassy crate into embassy-executor, embassy-util.
Diffstat (limited to 'examples/rp/src')
| -rw-r--r-- | examples/rp/src/bin/blinky.rs | 6 | ||||
| -rw-r--r-- | examples/rp/src/bin/button.rs | 4 | ||||
| -rw-r--r-- | examples/rp/src/bin/gpio_async.rs | 6 | ||||
| -rw-r--r-- | examples/rp/src/bin/spi.rs | 4 | ||||
| -rw-r--r-- | examples/rp/src/bin/spi_display.rs | 6 | ||||
| -rw-r--r-- | examples/rp/src/bin/uart.rs | 4 |
6 files changed, 15 insertions, 15 deletions
diff --git a/examples/rp/src/bin/blinky.rs b/examples/rp/src/bin/blinky.rs index 35612a4cf..e53fca1af 100644 --- a/examples/rp/src/bin/blinky.rs +++ b/examples/rp/src/bin/blinky.rs | |||
| @@ -3,13 +3,13 @@ | |||
| 3 | #![feature(type_alias_impl_trait)] | 3 | #![feature(type_alias_impl_trait)] |
| 4 | 4 | ||
| 5 | use defmt::*; | 5 | use defmt::*; |
| 6 | use embassy::executor::Spawner; | 6 | use embassy_executor::executor::Spawner; |
| 7 | use embassy::time::{Duration, Timer}; | 7 | use embassy_executor::time::{Duration, Timer}; |
| 8 | use embassy_rp::{gpio, Peripherals}; | 8 | use embassy_rp::{gpio, Peripherals}; |
| 9 | use gpio::{Level, Output}; | 9 | use gpio::{Level, Output}; |
| 10 | use {defmt_rtt as _, panic_probe as _}; | 10 | use {defmt_rtt as _, panic_probe as _}; |
| 11 | 11 | ||
| 12 | #[embassy::main] | 12 | #[embassy_executor::main] |
| 13 | async fn main(_spawner: Spawner, p: Peripherals) { | 13 | async fn main(_spawner: Spawner, p: Peripherals) { |
| 14 | let mut led = Output::new(p.PIN_25, Level::Low); | 14 | let mut led = Output::new(p.PIN_25, Level::Low); |
| 15 | 15 | ||
diff --git a/examples/rp/src/bin/button.rs b/examples/rp/src/bin/button.rs index 980e54ea1..02cbc9416 100644 --- a/examples/rp/src/bin/button.rs +++ b/examples/rp/src/bin/button.rs | |||
| @@ -2,12 +2,12 @@ | |||
| 2 | #![no_main] | 2 | #![no_main] |
| 3 | #![feature(type_alias_impl_trait)] | 3 | #![feature(type_alias_impl_trait)] |
| 4 | 4 | ||
| 5 | use embassy::executor::Spawner; | 5 | use embassy_executor::executor::Spawner; |
| 6 | use embassy_rp::gpio::{Input, Level, Output, Pull}; | 6 | use embassy_rp::gpio::{Input, Level, Output, Pull}; |
| 7 | use embassy_rp::Peripherals; | 7 | use embassy_rp::Peripherals; |
| 8 | use {defmt_rtt as _, panic_probe as _}; | 8 | use {defmt_rtt as _, panic_probe as _}; |
| 9 | 9 | ||
| 10 | #[embassy::main] | 10 | #[embassy_executor::main] |
| 11 | async fn main(_spawner: Spawner, p: Peripherals) { | 11 | async fn main(_spawner: Spawner, p: Peripherals) { |
| 12 | let button = Input::new(p.PIN_28, Pull::Up); | 12 | let button = Input::new(p.PIN_28, Pull::Up); |
| 13 | let mut led = Output::new(p.PIN_25, Level::Low); | 13 | let mut led = Output::new(p.PIN_25, Level::Low); |
diff --git a/examples/rp/src/bin/gpio_async.rs b/examples/rp/src/bin/gpio_async.rs index e0f2aa961..ba905b015 100644 --- a/examples/rp/src/bin/gpio_async.rs +++ b/examples/rp/src/bin/gpio_async.rs | |||
| @@ -3,8 +3,8 @@ | |||
| 3 | #![feature(type_alias_impl_trait)] | 3 | #![feature(type_alias_impl_trait)] |
| 4 | 4 | ||
| 5 | use defmt::*; | 5 | use defmt::*; |
| 6 | use embassy::executor::Spawner; | 6 | use embassy_executor::executor::Spawner; |
| 7 | use embassy::time::{Duration, Timer}; | 7 | use embassy_executor::time::{Duration, Timer}; |
| 8 | use embassy_rp::{gpio, Peripherals}; | 8 | use embassy_rp::{gpio, Peripherals}; |
| 9 | use gpio::{Input, Level, Output, Pull}; | 9 | use gpio::{Input, Level, Output, Pull}; |
| 10 | use {defmt_rtt as _, panic_probe as _}; | 10 | use {defmt_rtt as _, panic_probe as _}; |
| @@ -19,7 +19,7 @@ use {defmt_rtt as _, panic_probe as _}; | |||
| 19 | /// high signal on PIN 16. Once the high event/signal occurs the program will | 19 | /// high signal on PIN 16. Once the high event/signal occurs the program will |
| 20 | /// continue and turn off the LED, and then wait for 2 seconds before completing | 20 | /// continue and turn off the LED, and then wait for 2 seconds before completing |
| 21 | /// the loop and starting over again. | 21 | /// the loop and starting over again. |
| 22 | #[embassy::main] | 22 | #[embassy_executor::main] |
| 23 | async fn main(_spawner: Spawner, p: Peripherals) { | 23 | async fn main(_spawner: Spawner, p: Peripherals) { |
| 24 | let mut led = Output::new(p.PIN_25, Level::Low); | 24 | let mut led = Output::new(p.PIN_25, Level::Low); |
| 25 | let mut async_input = Input::new(p.PIN_16, Pull::None); | 25 | let mut async_input = Input::new(p.PIN_16, Pull::None); |
diff --git a/examples/rp/src/bin/spi.rs b/examples/rp/src/bin/spi.rs index d97aa94b3..a3160c106 100644 --- a/examples/rp/src/bin/spi.rs +++ b/examples/rp/src/bin/spi.rs | |||
| @@ -3,13 +3,13 @@ | |||
| 3 | #![feature(type_alias_impl_trait)] | 3 | #![feature(type_alias_impl_trait)] |
| 4 | 4 | ||
| 5 | use defmt::*; | 5 | use defmt::*; |
| 6 | use embassy::executor::Spawner; | 6 | use embassy_executor::executor::Spawner; |
| 7 | use embassy_rp::spi::Spi; | 7 | use embassy_rp::spi::Spi; |
| 8 | use embassy_rp::{gpio, spi, Peripherals}; | 8 | use embassy_rp::{gpio, spi, Peripherals}; |
| 9 | use gpio::{Level, Output}; | 9 | use gpio::{Level, Output}; |
| 10 | use {defmt_rtt as _, panic_probe as _}; | 10 | use {defmt_rtt as _, panic_probe as _}; |
| 11 | 11 | ||
| 12 | #[embassy::main] | 12 | #[embassy_executor::main] |
| 13 | async fn main(_spawner: Spawner, p: Peripherals) { | 13 | async fn main(_spawner: Spawner, p: Peripherals) { |
| 14 | info!("Hello World!"); | 14 | info!("Hello World!"); |
| 15 | 15 | ||
diff --git a/examples/rp/src/bin/spi_display.rs b/examples/rp/src/bin/spi_display.rs index f4a411ba6..2760b23fa 100644 --- a/examples/rp/src/bin/spi_display.rs +++ b/examples/rp/src/bin/spi_display.rs | |||
| @@ -5,8 +5,8 @@ | |||
| 5 | use core::cell::RefCell; | 5 | use core::cell::RefCell; |
| 6 | 6 | ||
| 7 | use defmt::*; | 7 | use defmt::*; |
| 8 | use embassy::executor::Spawner; | 8 | use embassy_executor::executor::Spawner; |
| 9 | use embassy::time::Delay; | 9 | use embassy_executor::time::Delay; |
| 10 | use embassy_rp::gpio::{Level, Output}; | 10 | use embassy_rp::gpio::{Level, Output}; |
| 11 | use embassy_rp::spi::Spi; | 11 | use embassy_rp::spi::Spi; |
| 12 | use embassy_rp::{spi, Peripherals}; | 12 | use embassy_rp::{spi, Peripherals}; |
| @@ -27,7 +27,7 @@ use crate::touch::Touch; | |||
| 27 | //const DISPLAY_FREQ: u32 = 64_000_000; | 27 | //const DISPLAY_FREQ: u32 = 64_000_000; |
| 28 | const TOUCH_FREQ: u32 = 200_000; | 28 | const TOUCH_FREQ: u32 = 200_000; |
| 29 | 29 | ||
| 30 | #[embassy::main] | 30 | #[embassy_executor::main] |
| 31 | async fn main(_spawner: Spawner, p: Peripherals) { | 31 | async fn main(_spawner: Spawner, p: Peripherals) { |
| 32 | info!("Hello World!"); | 32 | info!("Hello World!"); |
| 33 | 33 | ||
diff --git a/examples/rp/src/bin/uart.rs b/examples/rp/src/bin/uart.rs index 99072253a..0d2954894 100644 --- a/examples/rp/src/bin/uart.rs +++ b/examples/rp/src/bin/uart.rs | |||
| @@ -2,11 +2,11 @@ | |||
| 2 | #![no_main] | 2 | #![no_main] |
| 3 | #![feature(type_alias_impl_trait)] | 3 | #![feature(type_alias_impl_trait)] |
| 4 | 4 | ||
| 5 | use embassy::executor::Spawner; | 5 | use embassy_executor::executor::Spawner; |
| 6 | use embassy_rp::{uart, Peripherals}; | 6 | use embassy_rp::{uart, Peripherals}; |
| 7 | use {defmt_rtt as _, panic_probe as _}; | 7 | use {defmt_rtt as _, panic_probe as _}; |
| 8 | 8 | ||
| 9 | #[embassy::main] | 9 | #[embassy_executor::main] |
| 10 | async fn main(_spawner: Spawner, p: Peripherals) { | 10 | async fn main(_spawner: Spawner, p: Peripherals) { |
| 11 | let config = uart::Config::default(); | 11 | let config = uart::Config::default(); |
| 12 | let mut uart = uart::Uart::new(p.UART0, p.PIN_0, p.PIN_1, p.PIN_2, p.PIN_3, config); | 12 | let mut uart = uart::Uart::new(p.UART0, p.PIN_0, p.PIN_1, p.PIN_2, p.PIN_3, config); |
