From 45911766a46048d81d9198f8b7dd1d6a8bebdea4 Mon Sep 17 00:00:00 2001 From: Scott Mabin Date: Wed, 20 Jul 2022 15:49:34 +0100 Subject: [PATCH] Fix examples and formatting --- esp32-hal/.vscode/settings.json | 16 ---------------- esp32-hal/examples/gpio_interrupt.rs | 6 ------ esp32s2-hal/examples/gpio_interrupt.rs | 4 ---- esp32s3-hal/examples/gpio_interrupt.rs | 2 -- esp32s3-hal/examples/timer_interrupt.rs | 6 +++--- 5 files changed, 3 insertions(+), 31 deletions(-) delete mode 100644 esp32-hal/.vscode/settings.json diff --git a/esp32-hal/.vscode/settings.json b/esp32-hal/.vscode/settings.json deleted file mode 100644 index 54dd8e2321d..00000000000 --- a/esp32-hal/.vscode/settings.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "rust-analyzer.cargo.features": [], - "rust-analyzer.cargo.allFeatures": false, - "editor.formatOnSave": false, - "rust-analyzer.checkOnSave.allTargets": false, - "rust-analyzer.checkOnSave.allFeatures": false, - "rust-analyzer.checkOnSave.overrideCommand": [ - "cargo", - "check", - "--message-format=json", - "-Z", - "build-std=core", - "--examples" - ], - "rust-analyzer.cargo.buildScripts.enable": false -} \ No newline at end of file diff --git a/esp32-hal/examples/gpio_interrupt.rs b/esp32-hal/examples/gpio_interrupt.rs index 96239b14368..58be3a7a92e 100644 --- a/esp32-hal/examples/gpio_interrupt.rs +++ b/esp32-hal/examples/gpio_interrupt.rs @@ -15,8 +15,6 @@ use esp32_hal::{ Cpu, Delay, RtcCntl, - Serial, - Timer, }; use panic_halt as _; use xtensa_lx::mutex::{Mutex, SpinLockMutex}; @@ -34,12 +32,8 @@ fn main() -> ! { let timer_group0 = TimerGroup::new(peripherals.TIMG0, &clocks); let mut wdt = timer_group0.wdt; - // Disable the TIMG watchdog timer. - let serial0 = Serial::new(peripherals.UART0); let mut rtc_cntl = RtcCntl::new(peripherals.RTC_CNTL); - esp_println::println!("Hello esp_println!"); - // Disable MWDT and RWDT (Watchdog) flash boot protection wdt.disable(); rtc_cntl.set_wdt_global_enable(false); diff --git a/esp32s2-hal/examples/gpio_interrupt.rs b/esp32s2-hal/examples/gpio_interrupt.rs index 0890f140931..2e96d3660c4 100644 --- a/esp32s2-hal/examples/gpio_interrupt.rs +++ b/esp32s2-hal/examples/gpio_interrupt.rs @@ -15,8 +15,6 @@ use esp32s2_hal::{ Cpu, Delay, RtcCntl, - Serial, - Timer }; use panic_halt as _; use xtensa_lx::mutex::{CriticalSectionMutex, Mutex}; @@ -35,8 +33,6 @@ fn main() -> ! { let mut wdt = timer_group0.wdt; let mut rtc_cntl = RtcCntl::new(peripherals.RTC_CNTL); - esp_println::println!("Hello esp_println!"); - // Disable MWDT and RWDT (Watchdog) flash boot protection wdt.disable(); rtc_cntl.set_wdt_global_enable(false); diff --git a/esp32s3-hal/examples/gpio_interrupt.rs b/esp32s3-hal/examples/gpio_interrupt.rs index 96f80dd10ed..6e23cea134e 100644 --- a/esp32s3-hal/examples/gpio_interrupt.rs +++ b/esp32s3-hal/examples/gpio_interrupt.rs @@ -15,8 +15,6 @@ use esp32s3_hal::{ Cpu, Delay, RtcCntl, - Serial, - Timer, }; use panic_halt as _; use xtensa_lx::mutex::{Mutex, SpinLockMutex}; diff --git a/esp32s3-hal/examples/timer_interrupt.rs b/esp32s3-hal/examples/timer_interrupt.rs index 40d9c0c3e10..41a3da29488 100644 --- a/esp32s3-hal/examples/timer_interrupt.rs +++ b/esp32s3-hal/examples/timer_interrupt.rs @@ -66,9 +66,9 @@ fn main() -> ! { interrupt::CpuInterrupt::Interrupt20LevelPriority2, ); interrupt::enable( - Cpu::ProCpu, - pac::Interrupt::TG1_T0_LEVEL, - interrupt::CpuInterrupt::Interrupt23LevelPriority3, + Cpu::ProCpu, + pac::Interrupt::TG1_T0_LEVEL, + interrupt::CpuInterrupt::Interrupt23LevelPriority3, ); interrupt::enable( Cpu::ProCpu,