aboutsummaryrefslogtreecommitdiff
path: root/docs/modules/ROOT/examples/basic
diff options
context:
space:
mode:
Diffstat (limited to 'docs/modules/ROOT/examples/basic')
-rw-r--r--docs/modules/ROOT/examples/basic/Cargo.toml4
-rw-r--r--docs/modules/ROOT/examples/basic/src/main.rs4
2 files changed, 3 insertions, 5 deletions
diff --git a/docs/modules/ROOT/examples/basic/Cargo.toml b/docs/modules/ROOT/examples/basic/Cargo.toml
index 8f6e05fae..2c282145d 100644
--- a/docs/modules/ROOT/examples/basic/Cargo.toml
+++ b/docs/modules/ROOT/examples/basic/Cargo.toml
@@ -6,8 +6,8 @@ version = "0.1.0"
6license = "MIT OR Apache-2.0" 6license = "MIT OR Apache-2.0"
7 7
8[dependencies] 8[dependencies]
9embassy-executor = { version = "0.4.0", path = "../../../../../embassy-executor", features = ["defmt", "integrated-timers", "arch-cortex-m", "executor-thread"] } 9embassy-executor = { version = "0.5.0", path = "../../../../../embassy-executor", features = ["defmt", "integrated-timers", "arch-cortex-m", "executor-thread"] }
10embassy-time = { version = "0.2.0", path = "../../../../../embassy-time", features = ["defmt"] } 10embassy-time = { version = "0.3.0", path = "../../../../../embassy-time", features = ["defmt"] }
11embassy-nrf = { version = "0.1.0", path = "../../../../../embassy-nrf", features = ["defmt", "nrf52840", "time-driver-rtc1", "gpiote"] } 11embassy-nrf = { version = "0.1.0", path = "../../../../../embassy-nrf", features = ["defmt", "nrf52840", "time-driver-rtc1", "gpiote"] }
12 12
13defmt = "0.3" 13defmt = "0.3"
diff --git a/docs/modules/ROOT/examples/basic/src/main.rs b/docs/modules/ROOT/examples/basic/src/main.rs
index 04170db55..4412712c8 100644
--- a/docs/modules/ROOT/examples/basic/src/main.rs
+++ b/docs/modules/ROOT/examples/basic/src/main.rs
@@ -1,16 +1,14 @@
1#![no_std] 1#![no_std]
2#![no_main] 2#![no_main]
3#![feature(type_alias_impl_trait)]
4 3
5use defmt::*; 4use defmt::*;
6use embassy_executor::Spawner; 5use embassy_executor::Spawner;
7use embassy_nrf::gpio::{Level, Output, OutputDrive}; 6use embassy_nrf::gpio::{Level, Output, OutputDrive};
8use embassy_nrf::peripherals::P0_13;
9use embassy_time::{Duration, Timer}; 7use embassy_time::{Duration, Timer};
10use {defmt_rtt as _, panic_probe as _}; // global logger 8use {defmt_rtt as _, panic_probe as _}; // global logger
11 9
12#[embassy_executor::task] 10#[embassy_executor::task]
13async fn blinker(mut led: Output<'static, P0_13>, interval: Duration) { 11async fn blinker(mut led: Output<'static>, interval: Duration) {
14 loop { 12 loop {
15 led.set_high(); 13 led.set_high();
16 Timer::after(interval).await; 14 Timer::after(interval).await;