]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS/Source/portable/GCC/ARM_CM4F/portmacro.h
Added a build configuration for the Wonder Gecko starter kit to the existing Giant...
[freertos] / FreeRTOS / Source / portable / GCC / ARM_CM4F / portmacro.h
index 073e408abbe3a0f3c20ade07da7c02deeb876a3d..2754972fd02ce2cfe96841c6da8318c2786217ba 100644 (file)
@@ -202,10 +202,32 @@ not necessary for to use this port.  They are defined so the common demo files
 /* portNOP() is not required by this port. */\r
 #define portNOP()\r
 \r
+#define portINLINE     __inline\r
+\r
 #ifndef portFORCE_INLINE\r
        #define portFORCE_INLINE inline __attribute__(( always_inline))\r
 #endif\r
 \r
+portFORCE_INLINE static BaseType_t xPortIsInsideInterrupt( void )\r
+{\r
+uint32_t ulCurrentInterrupt;\r
+BaseType_t xReturn;\r
+\r
+       /* Obtain the number of the currently executing interrupt. */\r
+       __asm volatile( "mrs %0, ipsr" : "=r"( ulCurrentInterrupt ) );\r
+\r
+       if( ulCurrentInterrupt == 0 )\r
+       {\r
+               xReturn = pdFALSE;\r
+       }\r
+       else\r
+       {\r
+               xReturn = pdTRUE;\r
+       }\r
+\r
+       return xReturn;\r
+}\r
+\r
 /*-----------------------------------------------------------*/\r
 \r
 portFORCE_INLINE static void vPortRaiseBASEPRI( void )\r