clock_generator/firmware/rust/src/main.rs

21 lines
420 B
Rust
Raw Normal View History

2022-03-01 21:34:36 +01:00
#![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);
}
}