#![no_std]
#![no_main]
use esp32c3_hal::{clock::ClockControl, Delay, gpio::IO, pac::Peripherals, prelude::*, timer::TimerGroup, Rtc};
use esp_backtrace as _;
use riscv_rt::entry;
#[entry]
fn main() -> ! {
let peripherals = Peripherals::take().unwrap();
let system = peripherals.SYSTEM.split();
let clocks = ClockControl::boot_defaults(system.clock_control).freeze();
let io = IO::new(peripherals.GPIO, peripherals.IO_MUX);
let mut led = io.pins.gpio7.into_push_pull_output();
let mut delay = Delay::new(&clocks);
loop {
led.set_high().expect("Failed to set LED high");
delay.delay_ms(500u32);
led.set_low().expect("Failed to set LED low");
delay.delay_ms(500u32);
}
}