]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS/Source/include/portable.h
Update version number to 8.1.2 after moving the defaulting of configUSE_PORT_OPTIMISE...
[freertos] / FreeRTOS / Source / include / portable.h
index f803df7230dd03759b3e00d5e098b8b42c4093d8..0fbaa51e16ef2012bf95e516477834e9f23141b3 100644 (file)
@@ -1,5 +1,5 @@
 /*\r
-    FreeRTOS V7.5.3 - Copyright (C) 2013 Real Time Engineers Ltd. \r
+    FreeRTOS V8.1.2 - Copyright (C) 2014 Real Time Engineers Ltd.\r
     All rights reserved\r
 \r
     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
     the terms of the GNU General Public License (version 2) as published by the\r
     Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.\r
 \r
-    >>! NOTE: The modification to the GPL is included to allow you to distribute\r
-    >>! a combined work that includes FreeRTOS without being obliged to provide\r
-    >>! the source code for proprietary components outside of the FreeRTOS\r
-    >>! kernel.\r
+    >>!   NOTE: The modification to the GPL is included to allow you to     !<<\r
+    >>!   distribute a combined work that includes FreeRTOS without being   !<<\r
+    >>!   obliged to provide the source code for proprietary components     !<<\r
+    >>!   outside of the FreeRTOS kernel.                                   !<<\r
 \r
     FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY\r
     WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\r
 #ifndef PORTABLE_H\r
 #define PORTABLE_H\r
 \r
-/* Include the macro file relevant to the port being used. */\r
-\r
+/* Include the macro file relevant to the port being used.\r
+NOTE:  The following definitions are *DEPRECATED* as it is preferred to instead\r
+just add the path to the correct portmacro.h header file to the compiler's\r
+include path. */\r
 #ifdef OPEN_WATCOM_INDUSTRIAL_PC_PORT\r
        #include "..\..\Source\portable\owatcom\16bitdos\pc\portmacro.h"\r
        typedef void ( __interrupt __far *pxISR )();\r
 #endif\r
 \r
 #ifdef MPLAB_PIC24_PORT\r
-       #include "..\..\Source\portable\MPLAB\PIC24_dsPIC\portmacro.h"\r
+       #include "../../Source/portable/MPLAB/PIC24_dsPIC/portmacro.h"\r
 #endif\r
 \r
 #ifdef MPLAB_DSPIC_PORT\r
-       #include "..\..\Source\portable\MPLAB\PIC24_dsPIC\portmacro.h"\r
+       #include "../../Source/portable/MPLAB/PIC24_dsPIC/portmacro.h"\r
 #endif\r
 \r
 #ifdef MPLAB_PIC18F_PORT\r
-       #include "..\..\Source\portable\MPLAB\PIC18F\portmacro.h"\r
+       #include "../../Source/portable/MPLAB/PIC18F/portmacro.h"\r
 #endif\r
 \r
 #ifdef MPLAB_PIC32MX_PORT\r
-       #include "..\..\Source\portable\MPLAB\PIC32MX\portmacro.h"\r
+       #include "../../Source/portable/MPLAB/PIC32MX/portmacro.h"\r
 #endif\r
 \r
 #ifdef _FEDPICC\r
@@ -320,7 +322,7 @@ to find the path to the correct portmacro.h file. */
 #endif\r
 \r
 #if portBYTE_ALIGNMENT == 8\r
-       #define portBYTE_ALIGNMENT_MASK ( 0x0007 )\r
+       #define portBYTE_ALIGNMENT_MASK ( 0x0007U )\r
 #endif\r
 \r
 #if portBYTE_ALIGNMENT == 4\r
@@ -356,11 +358,32 @@ extern "C" {
  *\r
  */\r
 #if( portUSING_MPU_WRAPPERS == 1 )\r
-       portSTACK_TYPE *pxPortInitialiseStack( portSTACK_TYPE *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters, portBASE_TYPE xRunPrivileged ) PRIVILEGED_FUNCTION;\r
+       StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters, BaseType_t xRunPrivileged ) PRIVILEGED_FUNCTION;\r
 #else\r
-       portSTACK_TYPE *pxPortInitialiseStack( portSTACK_TYPE *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters ) PRIVILEGED_FUNCTION;\r
+       StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters ) PRIVILEGED_FUNCTION;\r
 #endif\r
 \r
+/* Used by heap_5.c. */\r
+typedef struct HeapRegion\r
+{\r
+       uint8_t *pucStartAddress;\r
+       size_t xSizeInBytes;\r
+} HeapRegion_t;\r
+\r
+/* \r
+ * Used to define multiple heap regions for use by heap_5.c.  This function\r
+ * must be called before any calls to pvPortMalloc() - not creating a task,\r
+ * queue, semaphore, mutex, software timer, event group, etc. will result in\r
+ * pvPortMalloc being called.\r
+ *\r
+ * pxHeapRegions passes in an array of HeapRegion_t structures - each of which\r
+ * defines a region of memory that can be used as the heap.  The array is \r
+ * terminated by a HeapRegions_t structure that has a size of 0.  The region \r
+ * with the lowest start address must appear first in the array.\r
+ */\r
+void vPortDefineHeapRegions( const HeapRegion_t * const pxHeapRegions );\r
+\r
+\r
 /*\r
  * Map to the memory management routines required for the port.\r
  */\r
@@ -368,12 +391,13 @@ void *pvPortMalloc( size_t xSize ) PRIVILEGED_FUNCTION;
 void vPortFree( void *pv ) PRIVILEGED_FUNCTION;\r
 void vPortInitialiseBlocks( void ) PRIVILEGED_FUNCTION;\r
 size_t xPortGetFreeHeapSize( void ) PRIVILEGED_FUNCTION;\r
+size_t xPortGetMinimumEverFreeHeapSize( void ) PRIVILEGED_FUNCTION;\r
 \r
 /*\r
  * Setup the hardware ready for the scheduler to take control.  This generally\r
  * sets up a tick interrupt and sets timers for the correct tick frequency.\r
  */\r
-portBASE_TYPE xPortStartScheduler( void ) PRIVILEGED_FUNCTION;\r
+BaseType_t xPortStartScheduler( void ) PRIVILEGED_FUNCTION;\r
 \r
 /*\r
  * Undo any hardware/ISR setup that was performed by xPortStartScheduler() so\r
@@ -391,7 +415,7 @@ void vPortEndScheduler( void ) PRIVILEGED_FUNCTION;
  */\r
 #if( portUSING_MPU_WRAPPERS == 1 )\r
        struct xMEMORY_REGION;\r
-       void vPortStoreTaskMPUSettings( xMPU_SETTINGS *xMPUSettings, const struct xMEMORY_REGION * const xRegions, portSTACK_TYPE *pxBottomOfStack, unsigned short usStackDepth ) PRIVILEGED_FUNCTION;\r
+       void vPortStoreTaskMPUSettings( xMPU_SETTINGS *xMPUSettings, const struct xMEMORY_REGION * const xRegions, StackType_t *pxBottomOfStack, uint16_t usStackDepth ) PRIVILEGED_FUNCTION;\r
 #endif\r
 \r
 #ifdef __cplusplus\r