#![no_std] #![no_main] use esp_backtrace as _; use esp_hal::clock::CpuClock; use esp_hal::delay::Delay; use esp_hal::main; use esp_hal::timer::timg::TimerGroup; use log::info; extern crate alloc; #[main] fn main() -> ! { let config = esp_hal::Config::default().with_cpu_clock(CpuClock::max()); let peripherals = esp_hal::init(config); esp_println::logger::init_logger_from_env(); esp_alloc::heap_allocator!(72 * 1024); let timg0 = TimerGroup::new(peripherals.TIMG0); let _init = esp_wifi::init( timg0.timer0, esp_hal::rng::Rng::new(peripherals.RNG), peripherals.RADIO_CLK, ) .unwrap(); let delay = Delay::new(); loop { info!("Hello world!"); delay.delay_millis(500); } // for inspiration have a look at the examples at https://github.com/esp-rs/esp-hal/tree/v0.23.1/examples/src/bin }