Skip to content

Commit c53a6b0

Browse files
kilograhamgraham sanderson
andauthored
RP2040: Add xPortIsInsideInterrupt to match other ARM ports (#1356)
Co-authored-by: graham sanderson <graham.sanderson@raspeberryi.com>
1 parent 1dbc776 commit c53a6b0

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

portable/ThirdParty/GCC/RP2040/include/portmacro.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,10 @@ extern void vPortYield( void );
149149
__asm volatile ( "mrs %0, IPSR" : "=r" ( ulIPSR )::); \
150150
( ( uint8_t ) ulIPSR ) > 0; } )
151151

152+
/* Use #define rather than inline method to make it easier for user code
153+
* to work with kernel versions both with and without xPortIsInsideInterrupt */
154+
#define xPortIsInsideInterrupt() ((BaseType_t)portCHECK_IF_IN_ISR())
155+
152156
void vYieldCore( int xCoreID );
153157
#define portYIELD_CORE( a ) vYieldCore( a )
154158

0 commit comments

Comments
 (0)