From 40e8231dc814ced145677420208c885dc16e88f7 Mon Sep 17 00:00:00 2001 From: Jared Burce Date: Wed, 13 May 2026 03:00:08 -0700 Subject: [PATCH] Formatting --- src/bin/main.rs | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/src/bin/main.rs b/src/bin/main.rs index bb75550..f39dc19 100644 --- a/src/bin/main.rs +++ b/src/bin/main.rs @@ -1,9 +1,9 @@ #![no_std] #![no_main] #![deny( - clippy::mem_forget, - reason = "mem::forget is generally not safe to do with esp_hal types, especially those \ - holding buffers for the duration of a data transfer." + clippy::mem_forget, + reason = "mem::forget is generally not safe to do with esp_hal types, especially those \ + holding buffers for the duration of a data transfer." )] #![deny(clippy::large_stack_frames)] @@ -15,7 +15,7 @@ use esp_hal::timer::timg::TimerGroup; #[panic_handler] fn panic(_: &core::panic::PanicInfo) -> ! { - loop {} + loop {} } extern crate alloc; @@ -25,32 +25,32 @@ extern crate alloc; esp_bootloader_esp_idf::esp_app_desc!(); #[allow( - clippy::large_stack_frames, - reason = "it's not unusual to allocate larger buffers etc. in main" + clippy::large_stack_frames, + reason = "it's not unusual to allocate larger buffers etc. in main" )] #[esp_rtos::main] async fn main(spawner: Spawner) -> ! { - // generator version: 1.2.0 + // generator version: 1.2.0 - rtt_target::rtt_init_defmt!(); + rtt_target::rtt_init_defmt!(); - let config = esp_hal::Config::default().with_cpu_clock(CpuClock::max()); - let peripherals = esp_hal::init(config); + let config = esp_hal::Config::default().with_cpu_clock(CpuClock::max()); + let peripherals = esp_hal::init(config); - esp_alloc::heap_allocator!(#[esp_hal::ram(reclaimed)] size: 73744); + esp_alloc::heap_allocator!(#[esp_hal::ram(reclaimed)] size: 73744); - let timg0 = TimerGroup::new(peripherals.TIMG0); - esp_rtos::start(timg0.timer0); + let timg0 = TimerGroup::new(peripherals.TIMG0); + esp_rtos::start(timg0.timer0); - info!("Embassy initialized!"); + info!("Embassy initialized!"); - // TODO: Spawn some tasks - let _ = spawner; + // TODO: Spawn some tasks + let _ = spawner; - loop { - info!("Hello world!"); - Timer::after(Duration::from_secs(1)).await; - } + loop { + info!("Hello world!"); + Timer::after(Duration::from_secs(1)).await; + } - // for inspiration have a look at the examples at https://github.com/esp-rs/esp-hal/tree/esp-hal-v1.0.0/examples + // for inspiration have a look at the examples at https://github.com/esp-rs/esp-hal/tree/esp-hal-v1.0.0/examples }