From 6618e921febc58bb04cc584894de66d6e1fd0716 Mon Sep 17 00:00:00 2001 From: Ryan Summers Date: Mon, 18 Jan 2021 16:55:56 +0100 Subject: [PATCH] Moving panic configuration --- src/hardware/mod.rs | 6 ++++++ src/main.rs | 6 ------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/hardware/mod.rs b/src/hardware/mod.rs index dbe8a9a..6434dbc 100644 --- a/src/hardware/mod.rs +++ b/src/hardware/mod.rs @@ -1,6 +1,12 @@ ///! Module for all hardware-specific setup of Stabilizer use stm32h7xx_hal as hal; +#[cfg(feature = "semihosting")] +use panic_semihosting as _; + +#[cfg(not(any(feature = "nightly", feature = "semihosting")))] +use panic_halt as _; + mod adc; mod afe; mod configuration; diff --git a/src/main.rs b/src/main.rs index 721e1f0..7ab7361 100644 --- a/src/main.rs +++ b/src/main.rs @@ -5,12 +5,6 @@ use stm32h7xx_hal as hal; -#[cfg(feature = "semihosting")] -use panic_semihosting as _; - -#[cfg(not(any(feature = "nightly", feature = "semihosting")))] -use panic_halt as _; - #[macro_use] extern crate log;