From ba47fe9c416818b7fff5bca8092d9f0265407089 Mon Sep 17 00:00:00 2001
From: Peter Krull <peterkrullpeter@gmail.com>
Date: Sun, 23 Apr 2023 16:37:44 +0200
Subject: [PATCH] embassy-rp : Added feature flag to otherwise unused
 definitions

---
 embassy-rp/src/intrinsics.rs | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/embassy-rp/src/intrinsics.rs b/embassy-rp/src/intrinsics.rs
index 04da74cfd..d5cb5fe9a 100644
--- a/embassy-rp/src/intrinsics.rs
+++ b/embassy-rp/src/intrinsics.rs
@@ -284,7 +284,7 @@ macro_rules! intrinsics {
 // alias the division operators to these for a similar reason r0 is the
 // result either way and r1 a scratch register, so the caller can't assume it
 // retains the argument value.
-#[cfg(all(target_arch = "arm", feature = "intrinsics"))]
+#[cfg(target_arch = "arm")]
 core::arch::global_asm!(
     ".macro hwdivider_head",
     "ldr    r2, =(0xd0000000)", // SIO_BASE
@@ -352,6 +352,7 @@ core::arch::global_asm!(
     ".endm",
 );
 
+#[cfg(all(target_arch = "arm", feature = "intrinsics"))]
 macro_rules! division_function {
     (
         $name:ident $($intrinsic:ident)* ( $argty:ty ) {
@@ -438,6 +439,7 @@ fn divider_signed(n: i32, d: i32) -> DivResult<i32> {
 }
 
 /// Result of divide/modulo operation
+#[cfg(all(target_arch = "arm", feature = "intrinsics"))]
 struct DivResult<T> {
     /// The quotient of divide/modulo operation
     pub quotient: T,