]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS/Source/portable/IAR/ARM_CM4F/portmacro.h
Updates to the Cortex-M tickless idle code to reduce clock slippage.
[freertos] / FreeRTOS / Source / portable / IAR / ARM_CM4F / portmacro.h
index 007dcfacae93fd81d2e1ab7f84062e431988f966..a14a7cd20691adabdea93441dab223897942f8f6 100644 (file)
@@ -84,6 +84,9 @@ extern "C" {
  *-----------------------------------------------------------\r
  */\r
 \r
+/* IAR includes. */\r
+#include <intrinsics.h>\r
+\r
 /* Type definitions. */\r
 #define portCHAR               char\r
 #define portFLOAT              float\r
@@ -137,7 +140,7 @@ typedef unsigned long UBaseType_t;
        #define configUSE_PORT_OPTIMISED_TASK_SELECTION 1\r
 #endif\r
 \r
-#if configUSE_PORT_OPTIMISED_TASK_SELECTION == 1\r
+#if( configUSE_PORT_OPTIMISED_TASK_SELECTION == 1 )\r
 \r
        /* Check the configuration. */\r
        #if( configMAX_PRIORITIES > 32 )\r
@@ -150,7 +153,6 @@ typedef unsigned long UBaseType_t;
 \r
        /*-----------------------------------------------------------*/\r
 \r
-       #include <intrinsics.h>\r
        #define portGET_HIGHEST_PRIORITY( uxTopPriority, uxReadyPriorities ) uxTopPriority = ( 31UL - ( ( uint32_t ) __CLZ( ( uxReadyPriorities ) ) ) )\r
 \r
 #endif /* configUSE_PORT_OPTIMISED_TASK_SELECTION */\r