\r
-#ifndef STDINT_INC\r
-#define STDINT_INC\r
+#ifndef FREERTOS_STDINT\r
+#define FREERTOS_STDINT\r
\r
-/* This file will get picked up when stdint.h does not appear in the default\r
-include path (which it doesn't seem to be - even though the file exists). */\r
+/*******************************************************************************\r
+ * THIS IS NOT A FULL stdint.h IMPLEMENTATION - It only contains the definitions\r
+ * necessary to build the FreeRTOS code. It is provided to allow FreeRTOS to be\r
+ * built using compilers that do not provide their own stdint.h definition.\r
+ *\r
+ * To use this file:\r
+ *\r
+ * 1) Copy this file into the directory that contains your FreeRTOSConfig.h\r
+ * header file, as that directory will already be in the compilers include\r
+ * path.\r
+ *\r
+ * 2) Rename the copied file stdint.h.\r
+ *\r
+ */\r
\r
typedef signed char int8_t;\r
typedef unsigned char uint8_t;\r
typedef long int32_t;\r
typedef unsigned long uint32_t;\r
\r
-#endif /* STDINT_INC */\r
+#endif /* FREERTOS_STDINT */\r
\r
-#ifndef STDINT_INC\r
-#define STDINT_INC\r
+#ifndef FREERTOS_STDINT\r
+#define FREERTOS_STDINT\r
\r
-/* This file will get picked up when stdint.h does not appear in the default\r
-include path (which it doesn't seem to be - even though the file exists). */\r
+/*******************************************************************************\r
+ * THIS IS NOT A FULL stdint.h IMPLEMENTATION - It only contains the definitions\r
+ * necessary to build the FreeRTOS code. It is provided to allow FreeRTOS to be\r
+ * built using compilers that do not provide their own stdint.h definition.\r
+ *\r
+ * To use this file:\r
+ *\r
+ * 1) Copy this file into the directory that contains your FreeRTOSConfig.h\r
+ * header file, as that directory will already be in the compilers include\r
+ * path.\r
+ *\r
+ * 2) Rename the copied file stdint.h.\r
+ *\r
+ */\r
\r
typedef signed char int8_t;\r
typedef unsigned char uint8_t;\r
typedef long int32_t;\r
typedef unsigned long uint32_t;\r
\r
-#endif /* STDINT_INC */\r
+#endif /* FREERTOS_STDINT */\r
\r
-#ifndef STDINT_INC\r
-#define STDINT_INC\r
+#ifndef FREERTOS_STDINT\r
+#define FREERTOS_STDINT\r
\r
-/* This file will get picked up when stdint.h does not appear in the default\r
-include path (which it doesn't seem to be - even though the file exists). */\r
+/*******************************************************************************\r
+ * THIS IS NOT A FULL stdint.h IMPLEMENTATION - It only contains the definitions\r
+ * necessary to build the FreeRTOS code. It is provided to allow FreeRTOS to be\r
+ * built using compilers that do not provide their own stdint.h definition.\r
+ *\r
+ * To use this file:\r
+ *\r
+ * 1) Copy this file into the directory that contains your FreeRTOSConfig.h\r
+ * header file, as that directory will already be in the compilers include\r
+ * path.\r
+ *\r
+ * 2) Rename the copied file stdint.h.\r
+ *\r
+ */\r
\r
typedef signed char int8_t;\r
typedef unsigned char uint8_t;\r
typedef long int32_t;\r
typedef unsigned long uint32_t;\r
\r
-#endif /* STDINT_INC */\r
+#endif /* FREERTOS_STDINT */\r
\r
-#ifndef STDINT_INC\r
-#define STDINT_INC\r
+#ifndef FREERTOS_STDINT\r
+#define FREERTOS_STDINT\r
\r
-/* This file will get picked up when stdint.h does not appear in the default\r
-include path (which it doesn't seem to be - even though the file exists). */\r
+/*******************************************************************************\r
+ * THIS IS NOT A FULL stdint.h IMPLEMENTATION - It only contains the definitions\r
+ * necessary to build the FreeRTOS code. It is provided to allow FreeRTOS to be\r
+ * built using compilers that do not provide their own stdint.h definition.\r
+ *\r
+ * To use this file:\r
+ *\r
+ * 1) Copy this file into the directory that contains your FreeRTOSConfig.h\r
+ * header file, as that directory will already be in the compilers include\r
+ * path.\r
+ *\r
+ * 2) Rename the copied file stdint.h.\r
+ *\r
+ */\r
\r
typedef signed char int8_t;\r
typedef unsigned char uint8_t;\r
typedef long int32_t;\r
typedef unsigned long uint32_t;\r
\r
-#endif /* STDINT_INC */\r
+#endif /* FREERTOS_STDINT */\r
#include <stddef.h>\r
#include <stdint.h>\r
\r
+/* Check stdint.h was included. */\r
+#ifndef UINT32_MAX\r
+ /* Check if the FreeRTOS stdint subset has been included. */\r
+ #ifndef FREERTOS_STDINT\r
+ #error Read the instructions in FreeRTOS/source/stdint.readme if stdint.h is not provided with your compiler.\r
+ #endif /* FREERTOS_STDINT */\r
+#endif /* UINT32_MAX */\r
+\r
/* Basic FreeRTOS definitions. */\r
#include "projdefs.h"\r
\r
#define mtCOVERAGE_TEST_MARKER()\r
#endif\r
\r
-/* For backward compatibility. */\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
+/* 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
#endif /* INC_FREERTOS_H */\r
\r
--- /dev/null
+\r
+#ifndef FREERTOS_STDINT\r
+#define FREERTOS_STDINT\r
+\r
+/*******************************************************************************\r
+ * THIS IS NOT A FULL stdint.h IMPLEMENTATION - It only contains the definitions\r
+ * necessary to build the FreeRTOS code. It is provided to allow FreeRTOS to be\r
+ * built using compilers that do not provide their own stdint.h definition.\r
+ *\r
+ * To use this file:\r
+ *\r
+ * 1) Copy this file into the directory that contains your FreeRTOSConfig.h\r
+ * header file, as that directory will already be in the compilers include\r
+ * path.\r
+ *\r
+ * 2) Rename the copied file stdint.h.\r
+ *\r
+ */\r
+\r
+typedef signed char int8_t;\r
+typedef unsigned char uint8_t;\r
+typedef short int16_t;\r
+typedef unsigned short uint16_t;\r
+typedef long int32_t;\r
+typedef unsigned long uint32_t;\r
+\r
+#endif /* FREERTOS_STDINT */\r
#define portSTACK_TYPE uint32_t\r
#define portBASE_TYPE long\r
\r
-typedef portSTACK_TYPE StackType_t;\r
-typedef long BaseType_t;\r
-typedef unsigned long UBaseType_t;\r
+ typedef portSTACK_TYPE StackType_t;\r
+ typedef long BaseType_t;\r
+ typedef unsigned long UBaseType_t;\r
\r
typedef uint32_t TickType_t;\r
#define portMAX_DELAY ( TickType_t ) 0xffffffffUL\r
/* Called at the end of an ISR that can cause a context switch. */\r
#define portEND_SWITCHING_ISR( xSwitchRequired )\\r
{ \\r
- extern uint32_t ulPortYieldRequired; \\r
+ extern uint32_t ulPortYieldRequired; \\r
\\r
if( xSwitchRequired != pdFALSE ) \\r
{ \\r
/* Called at the end of an ISR that can cause a context switch. */\r
#define portEND_SWITCHING_ISR( xSwitchRequired )\\r
{ \\r
-extern uint32_t ulPortYieldRequired; \\r
+extern uint32_t ulPortYieldRequired; \\r
\\r
if( xSwitchRequired != pdFALSE ) \\r
{ \\r