20 lines
420 B
Rust
20 lines
420 B
Rust
#![no_std]
|
|
#![no_main]
|
|
|
|
use atmega_hal::{clock::MHz8, delay::Delay, pins, Peripherals};
|
|
use embedded_hal::blocking::delay::DelayMs;
|
|
use panic_halt as _;
|
|
|
|
#[atmega_hal::entry]
|
|
fn main() -> ! {
|
|
let dp = Peripherals::take().unwrap();
|
|
let pins = pins!(dp);
|
|
|
|
let mut led = pins.pd5.into_output();
|
|
let mut delay = Delay::<MHz8>::new();
|
|
|
|
loop {
|
|
led.toggle();
|
|
delay.delay_ms(255_u8);
|
|
}
|
|
}
|