diff --git a/examples/adc.rs b/examples/adc.rs index 349a631..3fc56d0 100644 --- a/examples/adc.rs +++ b/examples/adc.rs @@ -2,7 +2,7 @@ #![no_main] #![no_std] -extern crate panic_halt; +use panic_halt as _; use cortex_m_rt::entry; use stm32l0xx_hal::{pac, prelude::*, rcc::Config}; diff --git a/examples/adc_cont.rs b/examples/adc_cont.rs index e0b93f8..7ba9d54 100644 --- a/examples/adc_cont.rs +++ b/examples/adc_cont.rs @@ -3,7 +3,7 @@ #![no_main] #![no_std] -extern crate panic_halt; +use panic_halt as _; use core::{fmt::Write as _, pin::Pin}; diff --git a/examples/adc_multi.rs b/examples/adc_multi.rs index a7e9a2a..873a60b 100644 --- a/examples/adc_multi.rs +++ b/examples/adc_multi.rs @@ -3,7 +3,7 @@ #![no_main] #![no_std] -extern crate panic_halt; +use panic_halt as _; use core::{fmt::Write as _, pin::Pin}; diff --git a/examples/adc_pwm.rs b/examples/adc_pwm.rs index 0d9b5d1..5c11b11 100644 --- a/examples/adc_pwm.rs +++ b/examples/adc_pwm.rs @@ -2,7 +2,7 @@ #![no_main] #![no_std] -extern crate panic_halt; +use panic_halt as _; use cortex_m_rt::entry; use stm32l0xx_hal::{pac, prelude::*, pwm, rcc::Config}; diff --git a/examples/adc_trig.rs b/examples/adc_trig.rs index 2c27af3..208c80d 100644 --- a/examples/adc_trig.rs +++ b/examples/adc_trig.rs @@ -3,7 +3,7 @@ #![no_main] #![no_std] -extern crate panic_halt; +use panic_halt as _; use core::{fmt::Write as _, pin::Pin}; diff --git a/examples/aes_cbc.rs b/examples/aes_cbc.rs index be09368..f0eff0f 100644 --- a/examples/aes_cbc.rs +++ b/examples/aes_cbc.rs @@ -3,7 +3,7 @@ #![no_main] #![no_std] -extern crate panic_semihosting; +use panic_halt as _; use cortex_m_rt::entry; use stm32l0xx_hal::{ diff --git a/examples/aes_ctr.rs b/examples/aes_ctr.rs index 49ee164..d62df9f 100644 --- a/examples/aes_ctr.rs +++ b/examples/aes_ctr.rs @@ -3,7 +3,7 @@ #![no_main] #![no_std] -extern crate panic_semihosting; +use panic_halt as _; use cortex_m_rt::entry; use stm32l0xx_hal::{ diff --git a/examples/aes_ctr_dma.rs b/examples/aes_ctr_dma.rs index 5956dfd..2ae1a45 100644 --- a/examples/aes_ctr_dma.rs +++ b/examples/aes_ctr_dma.rs @@ -3,7 +3,7 @@ #![no_main] #![no_std] -extern crate panic_semihosting; +use panic_halt as _; use core::pin::Pin; diff --git a/examples/aes_ecb.rs b/examples/aes_ecb.rs index 9d6443c..1315847 100644 --- a/examples/aes_ecb.rs +++ b/examples/aes_ecb.rs @@ -3,7 +3,7 @@ #![no_main] #![no_std] -extern crate panic_semihosting; +use panic_halt as _; use cortex_m_rt::entry; use stm32l0xx_hal::{ diff --git a/examples/blinky.rs b/examples/blinky.rs index 1aeb805..a719001 100644 --- a/examples/blinky.rs +++ b/examples/blinky.rs @@ -2,7 +2,7 @@ #![no_main] #![no_std] -extern crate panic_halt; +use panic_halt as _; use cortex_m_rt::entry; use stm32l0xx_hal::{pac, prelude::*, rcc::Config}; diff --git a/examples/blinky_delay.rs b/examples/blinky_delay.rs index cd143af..b2ad233 100644 --- a/examples/blinky_delay.rs +++ b/examples/blinky_delay.rs @@ -1,7 +1,7 @@ #![no_main] #![no_std] -extern crate panic_halt; +use panic_halt as _; use cortex_m_rt::entry; use stm32l0xx_hal::{pac, prelude::*, rcc::Config}; diff --git a/examples/blinky_downgrade.rs b/examples/blinky_downgrade.rs index 3317a24..c2f4043 100644 --- a/examples/blinky_downgrade.rs +++ b/examples/blinky_downgrade.rs @@ -2,7 +2,7 @@ #![no_main] #![no_std] -extern crate panic_halt; +use panic_halt as _; use cortex_m_rt::entry; use stm32l0xx_hal::{ diff --git a/examples/button.rs b/examples/button.rs index d8b5520..7f392ac 100644 --- a/examples/button.rs +++ b/examples/button.rs @@ -2,7 +2,7 @@ #![no_main] #![no_std] -extern crate panic_halt; +use panic_halt as _; use cortex_m_rt::entry; use stm32l0xx_hal::{pac, prelude::*, rcc::Config}; diff --git a/examples/button_irq.rs b/examples/button_irq.rs index 43d377d..53ba86f 100644 --- a/examples/button_irq.rs +++ b/examples/button_irq.rs @@ -1,7 +1,7 @@ #![no_main] #![no_std] -extern crate panic_halt; +use panic_halt as _; use core::cell::RefCell; use core::ops::DerefMut; diff --git a/examples/crc.rs b/examples/crc.rs index bbd7d87..b6649bc 100644 --- a/examples/crc.rs +++ b/examples/crc.rs @@ -2,7 +2,7 @@ #![no_std] #![no_main] -extern crate panic_halt; +use panic_halt as _; use cortex_m_rt::entry; use stm32l0xx_hal::{crc::*, pac, prelude::*, rcc::Config}; diff --git a/examples/exti_wakeup.rs b/examples/exti_wakeup.rs index 34a8c72..8d5775a 100644 --- a/examples/exti_wakeup.rs +++ b/examples/exti_wakeup.rs @@ -1,7 +1,7 @@ #![no_main] #![no_std] -extern crate panic_halt; +use panic_halt as _; use cortex_m_rt::entry; use stm32l0xx_hal::{ diff --git a/examples/flash.rs b/examples/flash.rs index 2256a40..ba0ae80 100644 --- a/examples/flash.rs +++ b/examples/flash.rs @@ -1,7 +1,7 @@ #![no_main] #![no_std] -extern crate panic_semihosting; +use panic_halt as _; use cortex_m_rt::entry; use stm32l0xx_hal::{ diff --git a/examples/i2c.rs b/examples/i2c.rs index 9a3054f..fc426e2 100644 --- a/examples/i2c.rs +++ b/examples/i2c.rs @@ -3,7 +3,7 @@ #![no_main] #![no_std] -extern crate panic_semihosting; +use panic_halt as _; use cortex_m_rt::entry; use stm32l0xx_hal::{pac, prelude::*, rcc::Config}; diff --git a/examples/i2c_dma.rs b/examples/i2c_dma.rs index 9a0a5de..4cfe23d 100644 --- a/examples/i2c_dma.rs +++ b/examples/i2c_dma.rs @@ -5,7 +5,7 @@ #![no_main] #![no_std] -extern crate panic_semihosting; +use panic_halt as _; use core::pin::Pin; diff --git a/examples/linked_timer_rtic.rs b/examples/linked_timer_rtic.rs index 3789b60..da3dec6 100644 --- a/examples/linked_timer_rtic.rs +++ b/examples/linked_timer_rtic.rs @@ -1,7 +1,7 @@ #![no_main] #![no_std] -extern crate panic_halt; +use panic_halt as _; use core::fmt::Write; diff --git a/examples/lptim.rs b/examples/lptim.rs index eee83f2..5329673 100644 --- a/examples/lptim.rs +++ b/examples/lptim.rs @@ -3,7 +3,7 @@ #![no_main] #![no_std] -extern crate panic_semihosting; +use panic_halt as _; use cortex_m::{asm, peripheral::NVIC}; use cortex_m_rt::entry; diff --git a/examples/mco.rs b/examples/mco.rs index 07e2e53..6acd565 100644 --- a/examples/mco.rs +++ b/examples/mco.rs @@ -5,7 +5,7 @@ #![no_main] #![no_std] -extern crate panic_halt; +use panic_halt as _; use cortex_m_rt::entry; use stm32l0xx_hal::{ diff --git a/examples/pwm.rs b/examples/pwm.rs index a9730aa..c3a3a08 100644 --- a/examples/pwm.rs +++ b/examples/pwm.rs @@ -3,7 +3,7 @@ #![no_main] #![no_std] -extern crate panic_halt; +use panic_halt as _; use cortex_m_rt::entry; use stm32l0xx_hal::{pac, prelude::*, pwm, rcc::Config}; diff --git a/examples/pwr.rs b/examples/pwr.rs index 8d0a5af..8b1628d 100644 --- a/examples/pwr.rs +++ b/examples/pwr.rs @@ -1,7 +1,7 @@ #![no_main] #![no_std] -extern crate panic_halt; +use panic_halt as _; use cortex_m::{asm, peripheral::NVIC}; use cortex_m_rt::entry; diff --git a/examples/rng.rs b/examples/rng.rs index 088720a..6aae923 100644 --- a/examples/rng.rs +++ b/examples/rng.rs @@ -1,7 +1,7 @@ #![no_main] #![no_std] -extern crate panic_halt; +use panic_halt as _; use cortex_m_rt::entry; use stm32l0xx_hal::{pac, prelude::*, rcc::Config, syscfg::SYSCFG}; diff --git a/examples/rtc.rs b/examples/rtc.rs index 1acde00..bb29e0c 100644 --- a/examples/rtc.rs +++ b/examples/rtc.rs @@ -11,7 +11,7 @@ #![no_main] #![no_std] -extern crate panic_semihosting; +use panic_halt as _; use core::fmt::Write; diff --git a/examples/rtc_low_apb1.rs b/examples/rtc_low_apb1.rs index 2944614..e22160f 100644 --- a/examples/rtc_low_apb1.rs +++ b/examples/rtc_low_apb1.rs @@ -3,7 +3,7 @@ #![no_main] #![no_std] -extern crate panic_semihosting; +use panic_halt as _; use cortex_m::asm; use cortex_m_rt::entry; diff --git a/examples/rtc_wakeup.rs b/examples/rtc_wakeup.rs index 41fb7fd..fd04744 100644 --- a/examples/rtc_wakeup.rs +++ b/examples/rtc_wakeup.rs @@ -1,7 +1,7 @@ #![no_main] #![no_std] -extern crate panic_halt; +use panic_halt as _; use cortex_m_rt::entry; use stm32l0xx_hal::{ diff --git a/examples/serial.rs b/examples/serial.rs index 3b9f660..dedcbc1 100644 --- a/examples/serial.rs +++ b/examples/serial.rs @@ -3,7 +3,7 @@ #![no_main] #![no_std] -extern crate panic_halt; +use panic_halt as _; //use core::fmt::Write; use cortex_m_rt::entry; diff --git a/examples/serial_dma.rs b/examples/serial_dma.rs index 92a947c..16fbb23 100644 --- a/examples/serial_dma.rs +++ b/examples/serial_dma.rs @@ -1,7 +1,7 @@ #![no_main] #![no_std] -extern crate panic_halt; +use panic_halt as _; use core::pin::Pin; diff --git a/examples/serial_dma_async.rs b/examples/serial_dma_async.rs index 5ab50c5..9f631e1 100644 --- a/examples/serial_dma_async.rs +++ b/examples/serial_dma_async.rs @@ -1,7 +1,7 @@ #![no_main] #![no_std] -extern crate panic_halt; +use panic_halt as _; use core::pin::Pin; use cortex_m_rt::entry; diff --git a/examples/serial_lse.rs b/examples/serial_lse.rs index b80aa8a..d4eebe5 100644 --- a/examples/serial_lse.rs +++ b/examples/serial_lse.rs @@ -3,7 +3,7 @@ #![no_main] #![no_std] -extern crate panic_halt; +use panic_halt as _; //use core::fmt::Write; use cortex_m_rt::entry; diff --git a/examples/spi.rs b/examples/spi.rs index 5ac957b..aaa8e9d 100644 --- a/examples/spi.rs +++ b/examples/spi.rs @@ -2,7 +2,7 @@ #![no_main] #![no_std] -extern crate panic_halt; +use panic_halt as _; use cortex_m_rt::entry; use stm32l0xx_hal::{pac, prelude::*, rcc::Config, spi}; diff --git a/examples/spi2.rs b/examples/spi2.rs index dbcdb7c..e2db3f0 100644 --- a/examples/spi2.rs +++ b/examples/spi2.rs @@ -5,7 +5,7 @@ #![no_main] #![no_std] -extern crate panic_halt; +use panic_halt as _; use cortex_m_rt::entry; use stm32l0xx_hal::{pac, prelude::*, rcc::Config, spi}; diff --git a/examples/spi_dma.rs b/examples/spi_dma.rs index 0059036..6a432fa 100644 --- a/examples/spi_dma.rs +++ b/examples/spi_dma.rs @@ -1,7 +1,7 @@ #![no_main] #![no_std] -extern crate panic_halt; +use panic_halt as _; use core::pin::Pin; diff --git a/examples/temperature.rs b/examples/temperature.rs index db5caa1..f7a47e6 100644 --- a/examples/temperature.rs +++ b/examples/temperature.rs @@ -14,7 +14,7 @@ #![no_main] #![no_std] -use panic_semihosting as _; +use panic_halt as _; use cortex_m_rt::entry; use cortex_m_semihosting::hprintln; diff --git a/examples/timer.rs b/examples/timer.rs index b3ac494..cd88d30 100644 --- a/examples/timer.rs +++ b/examples/timer.rs @@ -1,7 +1,7 @@ #![no_main] #![no_std] -extern crate panic_halt; +use panic_halt as _; use core::cell::RefCell; use core::ops::DerefMut; diff --git a/examples/timer_encoder.rs b/examples/timer_encoder.rs index 8da4cdc..0a7b063 100644 --- a/examples/timer_encoder.rs +++ b/examples/timer_encoder.rs @@ -2,7 +2,7 @@ #![no_main] #![no_std] -extern crate panic_halt; +use panic_halt as _; use cortex_m_rt::entry; use stm32l0xx_hal::{ diff --git a/examples/usb_serial.rs b/examples/usb_serial.rs index 482619d..041fc16 100644 --- a/examples/usb_serial.rs +++ b/examples/usb_serial.rs @@ -2,7 +2,7 @@ #![no_std] #![no_main] -extern crate panic_semihosting; +use panic_halt as _; use cortex_m_rt::entry; use stm32l0xx_hal::usb::{UsbBus, USB}; diff --git a/examples/watchdog.rs b/examples/watchdog.rs index 413759b..ebd0b2f 100644 --- a/examples/watchdog.rs +++ b/examples/watchdog.rs @@ -3,7 +3,7 @@ #![no_main] #![no_std] -extern crate panic_halt; +use panic_halt as _; use cortex_m::asm; use cortex_m_rt::entry;