From 1e3cf2f1468789e1c3ba4009a58d3c206ef890fb Mon Sep 17 00:00:00 2001 From: Kenny Strawn Date: Tue, 12 Apr 2022 13:12:18 -0700 Subject: [PATCH] The `asm!` macro now needs to be `use`d for this to compile Now that `asm!` has become a stable feature, one needs to `use core::arch::asm` in order to, well, use it. Otherwise a bunch of errors get thrown by the compiler. So, time to make this crate usable again. --- src/port.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/port.rs b/src/port.rs index 31f5f30..19ef5f8 100644 --- a/src/port.rs +++ b/src/port.rs @@ -3,6 +3,12 @@ use std::marker::PhantomData; #[cfg(not(feature="std"))] use core::marker::PhantomData; +#[cfg(feature="std")] +use std::arch::asm; + +#[cfg(not(feature="std"))] +use core::arch::asm; + /// Trait for limiting [Port] to only being able to read/write u8/16/32. pub(crate) trait PortRW { /// Read a value (self) from the port