From 8b4cadec384d9e0c11fee8a13ae7618968f73bf0 Mon Sep 17 00:00:00 2001 From: Armando Montanez Date: Wed, 10 Sep 2025 18:43:59 -0700 Subject: [PATCH] Forward declare __sev(), __wfe(), __wfi() 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 69b3e69a0..14a86c888 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.