]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS/Source/portable/IAR/ARM_CM3/portmacro.h
Linting and MISRA checking
[freertos] / FreeRTOS / Source / portable / IAR / ARM_CM3 / portmacro.h
index f470e73abdaf3fe93795b151a68fc52cd3e0199b..b3568290044a477c49f06771ef97f8ec3ae95cf0 100644 (file)
@@ -1,5 +1,5 @@
 /*\r
-    FreeRTOS V7.4.0 - Copyright (C) 2013 Real Time Engineers Ltd.\r
+    FreeRTOS V7.4.2 - Copyright (C) 2013 Real Time Engineers Ltd.\r
 \r
     FEATURES AND PORTS ARE ADDED TO FREERTOS ALL THE TIME.  PLEASE VISIT\r
     http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
@@ -39,7 +39,7 @@
     WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\r
     FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more\r
     details. You should have received a copy of the GNU General Public License\r
-    and the FreeRTOS license exception along with FreeRTOS; if not itcan be\r
+    and the FreeRTOS license exception along with FreeRTOS; if not it can be\r
     viewed here: http://www.freertos.org/a00114.html and also obtained by\r
     writing to Real Time Engineers Ltd., contact details for whom are available\r
     on the FreeRTOS WEB site.\r
     ***************************************************************************\r
 \r
 \r
-    http://www.FreeRTOS.org - Documentation, books, training, latest versions, \r
+    http://www.FreeRTOS.org - Documentation, books, training, latest versions,\r
     license and Real Time Engineers Ltd. contact details.\r
 \r
     http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,\r
     including FreeRTOS+Trace - an indispensable productivity tool, and our new\r
     fully thread aware and reentrant UDP/IP stack.\r
 \r
-    http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High \r
-    Integrity Systems, who sell the code with commercial support, \r
+    http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High\r
+    Integrity Systems, who sell the code with commercial support,\r
     indemnification and middleware, under the OpenRTOS brand.\r
-    \r
-    http://www.SafeRTOS.com - High Integrity Systems also provide a safety \r
-    engineered and independently SIL3 certified version for use in safety and \r
+\r
+    http://www.SafeRTOS.com - High Integrity Systems also provide a safety\r
+    engineered and independently SIL3 certified version for use in safety and\r
     mission critical applications that require provable dependability.\r
 */\r
 \r
@@ -101,25 +101,26 @@ extern "C" {
 \r
 #if( configUSE_16_BIT_TICKS == 1 )\r
        typedef unsigned portSHORT portTickType;\r
-       #define portMAX_DELAY ( portTickType ) 0xffff\r
+       #define portMAX_DELAY 0xffff\r
 #else\r
        typedef unsigned portLONG portTickType;\r
-       #define portMAX_DELAY ( portTickType ) 0xffffffff\r
+       #define portMAX_DELAY 0xffffffffUL\r
 #endif\r
-/*-----------------------------------------------------------*/        \r
+/*-----------------------------------------------------------*/\r
 \r
 /* Architecture specifics. */\r
 #define portSTACK_GROWTH                       ( -1 )\r
-#define portTICK_RATE_MS                       ( ( portTickType ) 1000 / configTICK_RATE_HZ )          \r
+#define portTICK_RATE_MS                       ( ( portTickType ) 1000 / configTICK_RATE_HZ )\r
 #define portBYTE_ALIGNMENT                     8\r
-/*-----------------------------------------------------------*/        \r
+/*-----------------------------------------------------------*/\r
 \r
 /* Scheduler utilities. */\r
 extern void vPortYield( void );\r
-#define portNVIC_INT_CTRL_REG          ( * ( ( volatile unsigned long * ) 0xe000ed04 ) )\r
+#define portNVIC_INT_CTRL_REG          ( * ( ( volatile unsigned long * ) 0xe000ed04UL ) )\r
 #define portNVIC_PENDSVSET_BIT         ( 1UL << 28UL )\r
 #define portYIELD()                                    vPortYield()\r
 #define portEND_SWITCHING_ISR( xSwitchRequired ) if( xSwitchRequired ) portNVIC_INT_CTRL_REG = portNVIC_PENDSVSET_BIT\r
+#define portYIELD_FROM_ISR( x ) portEND_SWITCHING_ISR( x )\r
 /*-----------------------------------------------------------*/\r
 \r
 /* Architecture specific optimisations. */\r
@@ -131,8 +132,8 @@ extern void vPortYield( void );
        #endif\r
 \r
        /* Store/clear the ready priorities in a bit map. */\r
-       #define portRECORD_READY_PRIORITY( uxPriority, uxReadyPriorities ) ( uxReadyPriorities ) |= ( 1UL << ( uxPriority ) )\r
-       #define portRESET_READY_PRIORITY( uxPriority, uxReadyPriorities ) ( uxReadyPriorities ) &= ~( 1UL << ( uxPriority ) )\r
+       #define portRECORD_READY_PRIORITY( uxPriority, uxReadyPriorities ) ( ( uxReadyPriorities ) |= ( 1UL << ( uxPriority ) ) )\r
+       #define portRESET_READY_PRIORITY( uxPriority, uxReadyPriorities ) ( ( uxReadyPriorities ) &= ~( 1UL << ( uxPriority ) ) )\r
 \r
        /*-----------------------------------------------------------*/\r
 \r
@@ -170,6 +171,11 @@ not necessary for to use this port.  They are defined so the common demo files
 #define portTASK_FUNCTION( vFunction, pvParameters ) void vFunction( void *pvParameters )\r
 /*-----------------------------------------------------------*/\r
 \r
+#ifdef configASSERT\r
+       void vPortValidateInterruptPriority( void );\r
+       #define portASSERT_IF_INTERRUPT_PRIORITY_INVALID()      vPortValidateInterruptPriority()\r
+#endif\r
+\r
 /* portNOP() is not required by this port. */\r
 #define portNOP()\r
 \r