blob: e79ca21f26dc5109e251d89ca20db7333f269280 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
#![no_std]
#![no_main]
#![feature(asm)]
#![feature(type_alias_impl_trait)]
#![allow(incomplete_features)]
#[path = "../example_common.rs"]
mod example_common;
use defmt::*;
use embassy::executor::Spawner;
use embassy::time::{Duration, Timer};
use embassy_rp::{gpio, Peripherals};
use gpio::{Level, Output};
#[embassy::main]
async fn main(_spawner: Spawner, p: Peripherals) {
let mut led = Output::new(p.PIN_25, Level::Low);
loop {
info!("led on!");
led.set_high();
Timer::after(Duration::from_secs(1)).await;
info!("led off!");
led.set_low();
Timer::after(Duration::from_secs(1)).await;
}
}
|