From 8fcd44a1718337861214ba5499a8faceea2bfa1d Mon Sep 17 00:00:00 2001 From: armandomontanez Date: Mon, 15 Sep 2025 11:14:08 -0700 Subject: [PATCH] Forward declare __sev(), __wfe(), __wfi() (#2658) If the compiler in use offers __sev(), __wfe(), or __wfi(), forward declare them to be sure they're available for use. --- src/rp2_common/hardware_sync/include/hardware/sync.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/rp2_common/hardware_sync/include/hardware/sync.h b/src/rp2_common/hardware_sync/include/hardware/sync.h index 69b3e69a..14a86c88 100644 --- a/src/rp2_common/hardware_sync/include/hardware/sync.h +++ b/src/rp2_common/hardware_sync/include/hardware/sync.h @@ -94,6 +94,9 @@ __force_inline static void __sev(void) { pico_default_asm_volatile ("sev"); #endif } +#else +// Forward declare so we don't have to #include . +void __sev(void); #endif /*! \brief Insert a WFE instruction in to the code path. @@ -110,6 +113,9 @@ __force_inline static void __wfe(void) { pico_default_asm_volatile ("wfe"); #endif } +#else +// Forward declare so we don't have to #include . +void __wfe(void); #endif /*! \brief Insert a WFI instruction in to the code path. @@ -121,6 +127,9 @@ __force_inline static void __wfe(void) { __force_inline static void __wfi(void) { pico_default_asm_volatile("wfi"); } +#else +// Forward declare so we don't have to #include . +void __wfi(void); #endif /*! \brief Insert a DMB instruction in to the code path.