From 1d6ab68b4c4762b908465e86326f58e95701322c Mon Sep 17 00:00:00 2001 From: "Chris (ChrisJr404)" <11917633+ChrisJr404@users.noreply.github.com> Date: Wed, 26 Aug 2026 14:16:27 -0400 Subject: [PATCH] Re-export avr_device from the HAL crates This lets downstream code reach items like avr_device::interrupt without depending on avr-device directly and keeping its version in sync manually. Closes #698 --- arduino-hal/src/lib.rs | 6 ++++++ mcu/atmega-hal/src/lib.rs | 6 ++++++ mcu/attiny-hal/src/lib.rs | 6 ++++++ 3 files changed, 18 insertions(+) diff --git a/arduino-hal/src/lib.rs b/arduino-hal/src/lib.rs index e0d5c69373..6534847cd6 100644 --- a/arduino-hal/src/lib.rs +++ b/arduino-hal/src/lib.rs @@ -96,6 +96,12 @@ compile_error!( #[doc(cfg(feature = "rt"))] pub use avr_device::entry; +/// Reexport of the [`avr_device`](https://docs.rs/avr-device) crate. +/// +/// This makes items such as `avr_device::interrupt` available without depending +/// on `avr-device` directly and keeping its version in sync manually. +pub use avr_device; + #[doc(no_inline)] #[cfg(feature = "mcu-atmega")] pub use atmega_hal as hal; diff --git a/mcu/atmega-hal/src/lib.rs b/mcu/atmega-hal/src/lib.rs index d076052345..a0aa3e6ffb 100644 --- a/mcu/atmega-hal/src/lib.rs +++ b/mcu/atmega-hal/src/lib.rs @@ -112,6 +112,12 @@ pub use avr_device::atmega88p as pac; #[cfg(feature = "rt")] pub use avr_device::entry; +/// Reexport of the [`avr_device`](https://docs.rs/avr-device) crate. +/// +/// This makes items such as `avr_device::interrupt` available without depending +/// on `avr-device` directly and keeping its version in sync manually. +pub use avr_device; + #[cfg(feature = "device-selected")] pub use pac::Peripherals; diff --git a/mcu/attiny-hal/src/lib.rs b/mcu/attiny-hal/src/lib.rs index a8bf1541e0..da89b84019 100644 --- a/mcu/attiny-hal/src/lib.rs +++ b/mcu/attiny-hal/src/lib.rs @@ -57,6 +57,12 @@ pub use avr_device::attiny88 as pac; #[cfg(feature = "rt")] pub use avr_device::entry; +/// Reexport of the [`avr_device`](https://docs.rs/avr-device) crate. +/// +/// This makes items such as `avr_device::interrupt` available without depending +/// on `avr-device` directly and keeping its version in sync manually. +pub use avr_device; + #[cfg(feature = "device-selected")] pub use pac::Peripherals;