blob: a3a71b96be0ab3bf479084af1b9854bed2bb2129 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
//! Slowly blink an LED while blocking on a timer.
//!
//! Use this as the minimum-viable runtime support. You don't
//! need interrupts for this example.
#![no_std]
#![no_main]
const PIT_PERIOD_US: u32 = 1_000_000;
#[imxrt_rt::entry]
fn main() -> ! {
let board::Resources { mut pit, led, .. } = board::prepare(PIT_PERIOD_US).unwrap();
loop {
led.toggle();
pit.blocking_delay();
}
}
|