Skip to content

Commit 46c2071

Browse files
committed
Fix compatibility with CMSIS 6.1.0
1 parent f9c5f6a commit 46c2071

File tree

1 file changed

+3
-3
lines changed
  • src/rp2_common/hardware_sync/include/hardware

1 file changed

+3
-3
lines changed

src/rp2_common/hardware_sync/include/hardware/sync.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ typedef volatile uint32_t spin_lock_t;
114114
115115
* The SEV (send event) instruction sends an event to both cores.
116116
*/
117-
#if !__has_builtin(__sev)
117+
#if !__has_builtin(__sev) && !defined(__sev)
118118
__force_inline static void __sev(void) {
119119
pico_default_asm_volatile ("sev");
120120
}
@@ -126,7 +126,7 @@ __force_inline static void __sev(void) {
126126
* The WFE (wait for event) instruction waits until one of a number of
127127
* events occurs, including events signalled by the SEV instruction on either core.
128128
*/
129-
#if !__has_builtin(__wfe)
129+
#if !__has_builtin(__wfe) && !defined(__wfe)
130130
__force_inline static void __wfe(void) {
131131
pico_default_asm_volatile ("wfe");
132132
}
@@ -137,7 +137,7 @@ __force_inline static void __wfe(void) {
137137
*
138138
* The WFI (wait for interrupt) instruction waits for a interrupt to wake up the core.
139139
*/
140-
#if !__has_builtin(__wfi)
140+
#if !__has_builtin(__wfi) && !defined(__wfi)
141141
__force_inline static void __wfi(void) {
142142
pico_default_asm_volatile("wfi");
143143
}

0 commit comments

Comments
 (0)