]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS/Source/include/FreeRTOS.h
Update version number to 8.1.2 after moving the defaulting of configUSE_PORT_OPTIMISE...
[freertos] / FreeRTOS / Source / include / FreeRTOS.h
index 5956500cc5016d8aa81735466c4eb07d528743e5..6c77ba2cff36c73aa6cca761563eb8ee224a4b7b 100644 (file)
@@ -1,5 +1,5 @@
 /*\r
-    FreeRTOS V7.6.0 - 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 INC_FREERTOS_H\r
 #define INC_FREERTOS_H\r
 \r
-\r
 /*\r
  * Include the generic headers required for the FreeRTOS port being used.\r
  */\r
 #include <stddef.h>\r
 \r
-/* Basic FreeRTOS definitions. */\r
-#include "projdefs.h"\r
+/*\r
+ * If stdint.h cannot be located then:\r
+ *   + If using GCC ensure the -nostdint options is *not* being used.\r
+ *   + Ensure the project's include path includes the directory in which your\r
+ *     compiler stores stdint.h.\r
+ *   + Set any compiler options necessary for it to support C99, as technically\r
+ *     stdint.h is only mandatory with C99 (FreeRTOS does not require C99 in any\r
+ *     other way).\r
+ *   + The FreeRTOS download includes a simple stdint.h definition that can be\r
+ *     used in cases where none is provided by the compiler.  The files only\r
+ *     contains the typedefs required to build FreeRTOS.  Read the instructions\r
+ *     in FreeRTOS/source/stdint.readme for more information.\r
+ */\r
+#include <stdint.h> /* READ COMMENT ABOVE. */\r
+\r
+#ifdef __cplusplus\r
+extern "C" {\r
+#endif\r
 \r
 /* Application specific configuration options. */\r
 #include "FreeRTOSConfig.h"\r
 \r
-/* configUSE_PORT_OPTIMISED_TASK_SELECTION must be defined before portable.h\r
-is included as it is used by the port layer. */\r
-#ifndef configUSE_PORT_OPTIMISED_TASK_SELECTION\r
-       #define configUSE_PORT_OPTIMISED_TASK_SELECTION 0\r
-#endif\r
+/* Basic FreeRTOS definitions. */\r
+#include "projdefs.h"\r
 \r
 /* Definitions specific to the port being used. */\r
 #include "portable.h"\r
 \r
-\r
-/* Defines the prototype to which the application task hook function must\r
-conform. */\r
-typedef portBASE_TYPE (*pdTASK_HOOK_CODE)( void * );\r
-\r
-\r
-\r
-\r
-\r
 /*\r
  * Check all the required application specific macros have been defined.\r
  * These macros are application specific and (as downloaded) are defined\r
  * within FreeRTOSConfig.h.\r
  */\r
 \r
+#ifndef configMINIMAL_STACK_SIZE\r
+       #error Missing definition:  configMINIMAL_STACK_SIZE must be defined in FreeRTOSConfig.h.  configMINIMAL_STACK_SIZE defines the size (in words) of the stack allocated to the idle task.  Refer to the demo project provided for your port for a suitable value.\r
+#endif\r
+\r
+#ifndef configMAX_PRIORITIES\r
+       #error Missing definition:  configMAX_PRIORITIES must be defined in FreeRTOSConfig.h.  See the Configuration section of the FreeRTOS API documentation for details.\r
+#endif\r
+\r
 #ifndef configUSE_PREEMPTION\r
-       #error Missing definition:  configUSE_PREEMPTION should be defined in FreeRTOSConfig.h as either 1 or 0.  See the Configuration section of the FreeRTOS API documentation for details.\r
+       #error Missing definition:  configUSE_PREEMPTION must be defined in FreeRTOSConfig.h as either 1 or 0.  See the Configuration section of the FreeRTOS API documentation for details.\r
 #endif\r
 \r
 #ifndef configUSE_IDLE_HOOK\r
-       #error Missing definition:  configUSE_IDLE_HOOK should be defined in FreeRTOSConfig.h as either 1 or 0.  See the Configuration section of the FreeRTOS API documentation for details.\r
+       #error Missing definition:  configUSE_IDLE_HOOK must be defined in FreeRTOSConfig.h as either 1 or 0.  See the Configuration section of the FreeRTOS API documentation for details.\r
 #endif\r
 \r
 #ifndef configUSE_TICK_HOOK\r
-       #error Missing definition:  configUSE_TICK_HOOK should be defined in FreeRTOSConfig.h as either 1 or 0.  See the Configuration section of the FreeRTOS API documentation for details.\r
+       #error Missing definition:  configUSE_TICK_HOOK must be defined in FreeRTOSConfig.h as either 1 or 0.  See the Configuration section of the FreeRTOS API documentation for details.\r
 #endif\r
 \r
 #ifndef configUSE_CO_ROUTINES\r
-       #error  Missing definition:  configUSE_CO_ROUTINES should be defined in FreeRTOSConfig.h as either 1 or 0.  See the Configuration section of the FreeRTOS API documentation for details.\r
+       #error  Missing definition:  configUSE_CO_ROUTINES must be defined in FreeRTOSConfig.h as either 1 or 0.  See the Configuration section of the FreeRTOS API documentation for details.\r
 #endif\r
 \r
 #ifndef INCLUDE_vTaskPrioritySet\r
-       #error Missing definition:  INCLUDE_vTaskPrioritySet should be defined in FreeRTOSConfig.h as either 1 or 0.  See the Configuration section of the FreeRTOS API documentation for details.\r
+       #error Missing definition:  INCLUDE_vTaskPrioritySet must be defined in FreeRTOSConfig.h as either 1 or 0.  See the Configuration section of the FreeRTOS API documentation for details.\r
 #endif\r
 \r
 #ifndef INCLUDE_uxTaskPriorityGet\r
-       #error Missing definition:  INCLUDE_uxTaskPriorityGet should be defined in FreeRTOSConfig.h as either 1 or 0.  See the Configuration section of the FreeRTOS API documentation for details.\r
+       #error Missing definition:  INCLUDE_uxTaskPriorityGet must be defined in FreeRTOSConfig.h as either 1 or 0.  See the Configuration section of the FreeRTOS API documentation for details.\r
 #endif\r
 \r
 #ifndef INCLUDE_vTaskDelete\r
-       #error Missing definition:  INCLUDE_vTaskDelete          should be defined in FreeRTOSConfig.h as either 1 or 0.  See the Configuration section of the FreeRTOS API documentation for details.\r
+       #error Missing definition:  INCLUDE_vTaskDelete must be defined in FreeRTOSConfig.h as either 1 or 0.  See the Configuration section of the FreeRTOS API documentation for details.\r
 #endif\r
 \r
 #ifndef INCLUDE_vTaskSuspend\r
-       #error Missing definition:  INCLUDE_vTaskSuspend         should be defined in FreeRTOSConfig.h as either 1 or 0.  See the Configuration section of the FreeRTOS API documentation for details.\r
+       #error Missing definition:  INCLUDE_vTaskSuspend must be defined in FreeRTOSConfig.h as either 1 or 0.  See the Configuration section of the FreeRTOS API documentation for details.\r
 #endif\r
 \r
 #ifndef INCLUDE_vTaskDelayUntil\r
-       #error Missing definition:  INCLUDE_vTaskDelayUntil should be defined in FreeRTOSConfig.h as either 1 or 0.  See the Configuration section of the FreeRTOS API documentation for details.\r
+       #error Missing definition:  INCLUDE_vTaskDelayUntil must be defined in FreeRTOSConfig.h as either 1 or 0.  See the Configuration section of the FreeRTOS API documentation for details.\r
 #endif\r
 \r
 #ifndef INCLUDE_vTaskDelay\r
-       #error Missing definition:  INCLUDE_vTaskDelay should be defined in FreeRTOSConfig.h as either 1 or 0.  See the Configuration section of the FreeRTOS API documentation for details.\r
+       #error Missing definition:  INCLUDE_vTaskDelay must be defined in FreeRTOSConfig.h as either 1 or 0.  See the Configuration section of the FreeRTOS API documentation for details.\r
 #endif\r
 \r
 #ifndef configUSE_16_BIT_TICKS\r
-       #error Missing definition:  configUSE_16_BIT_TICKS should be defined in FreeRTOSConfig.h as either 1 or 0.  See the Configuration section of the FreeRTOS API documentation for details.\r
+       #error Missing definition:  configUSE_16_BIT_TICKS must be defined in FreeRTOSConfig.h as either 1 or 0.  See the Configuration section of the FreeRTOS API documentation for details.\r
+#endif\r
+\r
+#if configUSE_CO_ROUTINES != 0\r
+       #ifndef configMAX_CO_ROUTINE_PRIORITIES\r
+               #error configMAX_CO_ROUTINE_PRIORITIES must be greater than or equal to 1.\r
+       #endif\r
+#endif\r
+\r
+#ifndef configMAX_PRIORITIES\r
+       #error configMAX_PRIORITIES must be defined to be greater than or equal to 1.\r
 #endif\r
 \r
 #ifndef INCLUDE_xTaskGetIdleTaskHandle\r
@@ -218,6 +239,14 @@ typedef portBASE_TYPE (*pdTASK_HOOK_CODE)( void * );
        #define INCLUDE_xTaskResumeFromISR 1\r
 #endif\r
 \r
+#ifndef INCLUDE_xEventGroupSetBitFromISR\r
+       #define INCLUDE_xEventGroupSetBitFromISR 0\r
+#endif\r
+\r
+#ifndef INCLUDE_xTimerPendFunctionCall\r
+       #define INCLUDE_xTimerPendFunctionCall 0\r
+#endif\r
+\r
 #ifndef configASSERT\r
        #define configASSERT( x )\r
        #define configASSERT_DEFINED 0\r
@@ -263,6 +292,10 @@ typedef portBASE_TYPE (*pdTASK_HOOK_CODE)( void * );
        #define portCLEAN_UP_TCB( pxTCB ) ( void ) pxTCB\r
 #endif\r
 \r
+#ifndef portPRE_TASK_DELETE_HOOK\r
+       #define portPRE_TASK_DELETE_HOOK( pvTaskToDelete, pxYieldPending )\r
+#endif\r
+\r
 #ifndef portSETUP_TCB\r
        #define portSETUP_TCB( pxTCB ) ( void ) pxTCB\r
 #endif\r
@@ -277,7 +310,7 @@ typedef portBASE_TYPE (*pdTASK_HOOK_CODE)( void * );
 #endif\r
 \r
 #ifndef portPOINTER_SIZE_TYPE\r
-       #define portPOINTER_SIZE_TYPE unsigned long\r
+       #define portPOINTER_SIZE_TYPE uint32_t\r
 #endif\r
 \r
 /* Remove any unused trace macros. */\r
@@ -520,6 +553,62 @@ typedef portBASE_TYPE (*pdTASK_HOOK_CODE)( void * );
     #define traceFREE( pvAddress, uiSize )\r
 #endif\r
 \r
+#ifndef traceEVENT_GROUP_CREATE\r
+       #define traceEVENT_GROUP_CREATE( xEventGroup )\r
+#endif\r
+\r
+#ifndef traceEVENT_GROUP_CREATE_FAILED\r
+       #define traceEVENT_GROUP_CREATE_FAILED()\r
+#endif\r
+\r
+#ifndef traceEVENT_GROUP_SYNC_BLOCK\r
+       #define traceEVENT_GROUP_SYNC_BLOCK( xEventGroup, uxBitsToSet, uxBitsToWaitFor )\r
+#endif\r
+\r
+#ifndef traceEVENT_GROUP_SYNC_END\r
+       #define traceEVENT_GROUP_SYNC_END( xEventGroup, uxBitsToSet, uxBitsToWaitFor, xTimeoutOccurred ) ( void ) xTimeoutOccurred\r
+#endif\r
+\r
+#ifndef traceEVENT_GROUP_WAIT_BITS_BLOCK\r
+       #define traceEVENT_GROUP_WAIT_BITS_BLOCK( xEventGroup, uxBitsToWaitFor )\r
+#endif\r
+\r
+#ifndef traceEVENT_GROUP_WAIT_BITS_END\r
+       #define traceEVENT_GROUP_WAIT_BITS_END( xEventGroup, uxBitsToWaitFor, xTimeoutOccurred ) ( void ) xTimeoutOccurred\r
+#endif\r
+\r
+#ifndef traceEVENT_GROUP_CLEAR_BITS\r
+       #define traceEVENT_GROUP_CLEAR_BITS( xEventGroup, uxBitsToClear )\r
+#endif\r
+\r
+#ifndef traceEVENT_GROUP_CLEAR_BITS_FROM_ISR\r
+       #define traceEVENT_GROUP_CLEAR_BITS_FROM_ISR( xEventGroup, uxBitsToClear )\r
+#endif\r
+\r
+#ifndef traceEVENT_GROUP_SET_BITS\r
+       #define traceEVENT_GROUP_SET_BITS( xEventGroup, uxBitsToSet )\r
+#endif\r
+\r
+#ifndef traceEVENT_GROUP_SET_BITS_FROM_ISR\r
+       #define traceEVENT_GROUP_SET_BITS_FROM_ISR( xEventGroup, uxBitsToSet )\r
+#endif\r
+\r
+#ifndef traceEVENT_GROUP_DELETE\r
+       #define traceEVENT_GROUP_DELETE( xEventGroup )\r
+#endif\r
+\r
+#ifndef tracePEND_FUNC_CALL\r
+       #define tracePEND_FUNC_CALL(xFunctionToPend, pvParameter1, ulParameter2, ret)\r
+#endif\r
+\r
+#ifndef tracePEND_FUNC_CALL_FROM_ISR\r
+       #define tracePEND_FUNC_CALL_FROM_ISR(xFunctionToPend, pvParameter1, ulParameter2, ret)\r
+#endif\r
+\r
+#ifndef traceQUEUE_REGISTRY_ADD\r
+       #define traceQUEUE_REGISTRY_ADD(xQueue, pcQueueName)\r
+#endif\r
+\r
 #ifndef configGENERATE_RUN_TIME_STATS\r
        #define configGENERATE_RUN_TIME_STATS 0\r
 #endif\r
@@ -547,7 +636,7 @@ typedef portBASE_TYPE (*pdTASK_HOOK_CODE)( void * );
 #endif\r
 \r
 #ifndef portPRIVILEGE_BIT\r
-       #define portPRIVILEGE_BIT ( ( unsigned portBASE_TYPE ) 0x00 )\r
+       #define portPRIVILEGE_BIT ( ( UBaseType_t ) 0x00 )\r
 #endif\r
 \r
 #ifndef portYIELD_WITHIN_API\r
@@ -614,8 +703,56 @@ typedef portBASE_TYPE (*pdTASK_HOOK_CODE)( void * );
        #define portASSERT_IF_INTERRUPT_PRIORITY_INVALID()\r
 #endif\r
 \r
-/* For backward compatability. */\r
-#define eTaskStateGet eTaskGetState\r
+#ifndef configUSE_TRACE_FACILITY\r
+       #define configUSE_TRACE_FACILITY 0\r
+#endif\r
+\r
+#ifndef mtCOVERAGE_TEST_MARKER\r
+       #define mtCOVERAGE_TEST_MARKER()\r
+#endif\r
+\r
+#ifndef portASSERT_IF_IN_ISR\r
+       #define portASSERT_IF_IN_ISR()\r
+#endif\r
+\r
+#ifndef configUSE_PORT_OPTIMISED_TASK_SELECTION\r
+       #define configUSE_PORT_OPTIMISED_TASK_SELECTION 0\r
+#endif\r
+\r
+/* Definitions to allow backward compatibility with FreeRTOS versions prior to\r
+V8 if desired. */\r
+#ifndef configENABLE_BACKWARD_COMPATIBILITY\r
+       #define configENABLE_BACKWARD_COMPATIBILITY 1\r
+#endif\r
+\r
+#if configENABLE_BACKWARD_COMPATIBILITY == 1\r
+       #define eTaskStateGet eTaskGetState\r
+       #define portTickType TickType_t\r
+       #define xTaskHandle TaskHandle_t\r
+       #define xQueueHandle QueueHandle_t\r
+       #define xSemaphoreHandle SemaphoreHandle_t\r
+       #define xQueueSetHandle QueueSetHandle_t\r
+       #define xQueueSetMemberHandle QueueSetMemberHandle_t\r
+       #define xTimeOutType TimeOut_t\r
+       #define xMemoryRegion MemoryRegion_t\r
+       #define xTaskParameters TaskParameters_t\r
+       #define xTaskStatusType TaskStatus_t\r
+       #define xTimerHandle TimerHandle_t\r
+       #define xCoRoutineHandle CoRoutineHandle_t\r
+       #define pdTASK_HOOK_CODE TaskHookFunction_t\r
+       #define portTICK_RATE_MS portTICK_PERIOD_MS\r
+\r
+       /* Backward compatibility within the scheduler code only - these definitions\r
+       are not really required but are included for completeness. */\r
+       #define tmrTIMER_CALLBACK TimerCallbackFunction_t\r
+       #define pdTASK_CODE TaskFunction_t\r
+       #define xListItem ListItem_t\r
+       #define xList List_t\r
+#endif /* configENABLE_BACKWARD_COMPATIBILITY */\r
+\r
+#ifdef __cplusplus\r
+}\r
+#endif\r
 \r
 #endif /* INC_FREERTOS_H */\r
 \r