aboutsummaryrefslogtreecommitdiff
path: root/examples/nrf54l15/src
diff options
context:
space:
mode:
authorDario Nieuwenhuis <[email protected]>2024-11-17 14:32:35 +0100
committerDario Nieuwenhuis <[email protected]>2024-11-17 14:42:06 +0100
commita8d7a5eb1e2038d0961e5dda8b1d5d04826fe1fd (patch)
tree0a52bc47cf0a3438ccadcbb7f92b71f05f04f89b /examples/nrf54l15/src
parent8d8cd78f634b2f435e3a997f7f8f3ac0b8ca300c (diff)
nrf: add nrf54l base: gpio and time driver.
Diffstat (limited to 'examples/nrf54l15/src')
-rw-r--r--examples/nrf54l15/src/bin/blinky.rs23
1 files changed, 23 insertions, 0 deletions
diff --git a/examples/nrf54l15/src/bin/blinky.rs b/examples/nrf54l15/src/bin/blinky.rs
new file mode 100644
index 000000000..71fcc461f
--- /dev/null
+++ b/examples/nrf54l15/src/bin/blinky.rs
@@ -0,0 +1,23 @@
1#![no_std]
2#![no_main]
3
4use defmt::info;
5use embassy_executor::Spawner;
6use embassy_nrf::gpio::{Level, Output, OutputDrive};
7use embassy_time::Timer;
8use {defmt_rtt as _, panic_probe as _};
9
10#[embassy_executor::main]
11async fn main(_spawner: Spawner) {
12 let p = embassy_nrf::init(Default::default());
13 let mut led = Output::new(p.P2_09, Level::Low, OutputDrive::Standard);
14
15 loop {
16 info!("high!");
17 led.set_high();
18 Timer::after_millis(300).await;
19 info!("low!");
20 led.set_low();
21 Timer::after_millis(300).await;
22 }
23}