+#ifndef configUSE_STATS_FORMATTING_FUNCTIONS\r
+ #define configUSE_STATS_FORMATTING_FUNCTIONS 0\r
+#endif\r
+\r
+#ifndef portASSERT_IF_INTERRUPT_PRIORITY_INVALID\r
+ #define portASSERT_IF_INTERRUPT_PRIORITY_INVALID()\r
+#endif\r
+\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 mtCOVERAGE_TEST_DELAY\r
+ #define mtCOVERAGE_TEST_DELAY()\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
+#ifndef configAPPLICATION_ALLOCATED_HEAP\r
+ #define configAPPLICATION_ALLOCATED_HEAP 0\r
+#endif\r
+\r
+#ifndef configUSE_TASK_NOTIFICATIONS\r
+ #define configUSE_TASK_NOTIFICATIONS 1\r
+#endif\r
+\r
+#ifndef configUSE_POSIX_ERRNO\r
+ #define configUSE_POSIX_ERRNO 0\r
+#endif\r
+\r
+#ifndef portTICK_TYPE_IS_ATOMIC\r
+ #define portTICK_TYPE_IS_ATOMIC 0\r
+#endif\r
+\r
+#ifndef configSUPPORT_STATIC_ALLOCATION\r
+ /* Defaults to 0 for backward compatibility. */\r
+ #define configSUPPORT_STATIC_ALLOCATION 0\r
+#endif\r
+\r
+#ifndef configSUPPORT_DYNAMIC_ALLOCATION\r
+ /* Defaults to 1 for backward compatibility. */\r
+ #define configSUPPORT_DYNAMIC_ALLOCATION 1\r
+#endif\r
+\r
+#ifndef configSTACK_DEPTH_TYPE\r
+ /* Defaults to uint16_t for backward compatibility, but can be overridden\r
+ in FreeRTOSConfig.h if uint16_t is too restrictive. */\r
+ #define configSTACK_DEPTH_TYPE uint16_t\r
+#endif\r
+\r
+#ifndef configMESSAGE_BUFFER_LENGTH_TYPE\r
+ /* Defaults to size_t for backward compatibility, but can be overridden\r
+ in FreeRTOSConfig.h if lengths will always be less than the number of bytes\r
+ in a size_t. */\r
+ #define configMESSAGE_BUFFER_LENGTH_TYPE size_t\r
+#endif\r
+\r
+/* Sanity check the configuration. */\r
+#if( configUSE_TICKLESS_IDLE != 0 )\r
+ #if( INCLUDE_vTaskSuspend != 1 )\r
+ #error INCLUDE_vTaskSuspend must be set to 1 if configUSE_TICKLESS_IDLE is not set to 0\r
+ #endif /* INCLUDE_vTaskSuspend */\r
+#endif /* configUSE_TICKLESS_IDLE */\r
+\r
+#if( ( configSUPPORT_STATIC_ALLOCATION == 0 ) && ( configSUPPORT_DYNAMIC_ALLOCATION == 0 ) )\r
+ #error configSUPPORT_STATIC_ALLOCATION and configSUPPORT_DYNAMIC_ALLOCATION cannot both be 0, but can both be 1.\r
+#endif\r
+\r
+#if( ( configUSE_RECURSIVE_MUTEXES == 1 ) && ( configUSE_MUTEXES != 1 ) )\r
+ #error configUSE_MUTEXES must be set to 1 to use recursive mutexes\r
+#endif\r
+\r
+#ifndef configINITIAL_TICK_COUNT\r
+ #define configINITIAL_TICK_COUNT 0\r
+#endif\r
+\r
+#if( portTICK_TYPE_IS_ATOMIC == 0 )\r
+ /* Either variables of tick type cannot be read atomically, or\r
+ portTICK_TYPE_IS_ATOMIC was not set - map the critical sections used when\r
+ the tick count is returned to the standard critical section macros. */\r
+ #define portTICK_TYPE_ENTER_CRITICAL() portENTER_CRITICAL()\r
+ #define portTICK_TYPE_EXIT_CRITICAL() portEXIT_CRITICAL()\r
+ #define portTICK_TYPE_SET_INTERRUPT_MASK_FROM_ISR() portSET_INTERRUPT_MASK_FROM_ISR()\r
+ #define portTICK_TYPE_CLEAR_INTERRUPT_MASK_FROM_ISR( x ) portCLEAR_INTERRUPT_MASK_FROM_ISR( ( x ) )\r
+#else\r
+ /* The tick type can be read atomically, so critical sections used when the\r
+ tick count is returned can be defined away. */\r
+ #define portTICK_TYPE_ENTER_CRITICAL()\r
+ #define portTICK_TYPE_EXIT_CRITICAL()\r
+ #define portTICK_TYPE_SET_INTERRUPT_MASK_FROM_ISR() 0\r
+ #define portTICK_TYPE_CLEAR_INTERRUPT_MASK_FROM_ISR( x ) ( void ) x\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
+#ifndef configPRINTF\r
+ /* configPRINTF() was not defined, so define it away to nothing. To use\r
+ configPRINTF() then define it as follows (where MyPrintFunction() is\r
+ provided by the application writer):\r
+\r
+ void MyPrintFunction(const char *pcFormat, ... );\r
+ #define configPRINTF( X ) MyPrintFunction X\r
+\r
+ Then call like a standard printf() function, but placing brackets around\r
+ all parameters so they are passed as a single parameter. For example:\r
+ configPRINTF( ("Value = %d", MyVariable) ); */\r
+ #define configPRINTF( X )\r
+#endif\r
+\r
+#ifndef configMAX\r
+ /* The application writer has not provided their own MAX macro, so define\r
+ the following generic implementation. */\r
+ #define configMAX( a, b ) ( ( ( a ) > ( b ) ) ? ( a ) : ( b ) )\r
+#endif\r
+\r
+#ifndef configMIN\r
+ /* The application writer has not provided their own MAX macro, so define\r
+ the following generic implementation. */\r
+ #define configMIN( a, b ) ( ( ( a ) < ( b ) ) ? ( a ) : ( b ) )\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
+ #define pcTaskGetTaskName pcTaskGetName\r
+ #define pcTimerGetTimerName pcTimerGetName\r
+ #define pcQueueGetQueueName pcQueueGetName\r
+ #define vTaskGetTaskInfo vTaskGetInfo\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
+\r
+ /* For libraries that break the list data hiding, and access list structure\r
+ members directly (which is not supposed to be done). */\r
+ #define pxContainer pvContainer\r
+#endif /* configENABLE_BACKWARD_COMPATIBILITY */\r
+\r
+#if( configUSE_ALTERNATIVE_API != 0 )\r
+ #error The alternative API was deprecated some time ago, and was removed in FreeRTOS V9.0 0\r
+#endif\r
+\r
+/* Set configUSE_TASK_FPU_SUPPORT to 0 to omit floating point support even\r
+if floating point hardware is otherwise supported by the FreeRTOS port in use.\r
+This constant is not supported by all FreeRTOS ports that include floating\r
+point support. */\r
+#ifndef configUSE_TASK_FPU_SUPPORT\r
+ #define configUSE_TASK_FPU_SUPPORT 1\r
+#endif\r
+\r
+/*\r
+ * In line with software engineering best practice, FreeRTOS implements a strict\r
+ * data hiding policy, so the real structures used by FreeRTOS to maintain the\r
+ * state of tasks, queues, semaphores, etc. are not accessible to the application\r
+ * code. However, if the application writer wants to statically allocate such\r
+ * an object then the size of the object needs to be know. Dummy structures\r
+ * that are guaranteed to have the same size and alignment requirements of the\r
+ * real objects are used for this purpose. The dummy list and list item\r
+ * structures below are used for inclusion in such a dummy structure.\r
+ */\r
+struct xSTATIC_LIST_ITEM\r
+{\r
+ TickType_t xDummy1;\r
+ void *pvDummy2[ 4 ];\r
+};\r
+typedef struct xSTATIC_LIST_ITEM StaticListItem_t;\r
+\r
+/* See the comments above the struct xSTATIC_LIST_ITEM definition. */\r
+struct xSTATIC_MINI_LIST_ITEM\r
+{\r
+ TickType_t xDummy1;\r
+ void *pvDummy2[ 2 ];\r
+};\r
+typedef struct xSTATIC_MINI_LIST_ITEM StaticMiniListItem_t;\r
+\r
+/* See the comments above the struct xSTATIC_LIST_ITEM definition. */\r
+typedef struct xSTATIC_LIST\r
+{\r
+ UBaseType_t uxDummy1;\r
+ void *pvDummy2;\r
+ StaticMiniListItem_t xDummy3;\r
+} StaticList_t;\r
+\r
+/*\r
+ * In line with software engineering best practice, especially when supplying a\r
+ * library that is likely to change in future versions, FreeRTOS implements a\r
+ * strict data hiding policy. This means the Task structure used internally by\r
+ * FreeRTOS is not accessible to application code. However, if the application\r
+ * writer wants to statically allocate the memory required to create a task then\r
+ * the size of the task object needs to be know. The StaticTask_t structure\r
+ * below is provided for this purpose. Its sizes and alignment requirements are\r
+ * guaranteed to match those of the genuine structure, no matter which\r
+ * architecture is being used, and no matter how the values in FreeRTOSConfig.h\r
+ * are set. Its contents are somewhat obfuscated in the hope users will\r
+ * recognise that it would be unwise to make direct use of the structure members.\r
+ */\r
+typedef struct xSTATIC_TCB\r
+{\r
+ void *pxDummy1;\r
+ #if ( portUSING_MPU_WRAPPERS == 1 )\r
+ xMPU_SETTINGS xDummy2;\r
+ #endif\r
+ StaticListItem_t xDummy3[ 2 ];\r
+ UBaseType_t uxDummy5;\r
+ void *pxDummy6;\r
+ uint8_t ucDummy7[ configMAX_TASK_NAME_LEN ];\r
+ #if ( ( portSTACK_GROWTH > 0 ) || ( configRECORD_STACK_HIGH_ADDRESS == 1 ) )\r
+ void *pxDummy8;\r
+ #endif\r
+ #if ( portCRITICAL_NESTING_IN_TCB == 1 )\r
+ UBaseType_t uxDummy9;\r
+ #endif\r
+ #if ( configUSE_TRACE_FACILITY == 1 )\r
+ UBaseType_t uxDummy10[ 2 ];\r
+ #endif\r
+ #if ( configUSE_MUTEXES == 1 )\r
+ UBaseType_t uxDummy12[ 2 ];\r
+ #endif\r
+ #if ( configUSE_APPLICATION_TASK_TAG == 1 )\r
+ void *pxDummy14;\r
+ #endif\r
+ #if( configNUM_THREAD_LOCAL_STORAGE_POINTERS > 0 )\r
+ void *pvDummy15[ configNUM_THREAD_LOCAL_STORAGE_POINTERS ];\r
+ #endif\r
+ #if ( configGENERATE_RUN_TIME_STATS == 1 )\r
+ uint32_t ulDummy16;\r
+ #endif\r
+ #if ( configUSE_NEWLIB_REENTRANT == 1 )\r
+ struct _reent xDummy17;\r
+ #endif\r
+ #if ( configUSE_TASK_NOTIFICATIONS == 1 )\r
+ uint32_t ulDummy18;\r
+ uint8_t ucDummy19;\r
+ #endif\r
+ #if( ( configSUPPORT_STATIC_ALLOCATION == 1 ) && ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) )\r
+ uint8_t uxDummy20;\r
+ #endif\r
+\r
+ #if( INCLUDE_xTaskAbortDelay == 1 )\r
+ uint8_t ucDummy21;\r
+ #endif\r
+ #if ( configUSE_POSIX_ERRNO == 1 )\r
+ int iDummy22;\r
+ #endif\r
+} StaticTask_t;\r
+\r
+/*\r
+ * In line with software engineering best practice, especially when supplying a\r
+ * library that is likely to change in future versions, FreeRTOS implements a\r
+ * strict data hiding policy. This means the Queue structure used internally by\r
+ * FreeRTOS is not accessible to application code. However, if the application\r
+ * writer wants to statically allocate the memory required to create a queue\r
+ * then the size of the queue object needs to be know. The StaticQueue_t\r
+ * structure below is provided for this purpose. Its sizes and alignment\r
+ * requirements are guaranteed to match those of the genuine structure, no\r
+ * matter which architecture is being used, and no matter how the values in\r
+ * FreeRTOSConfig.h are set. Its contents are somewhat obfuscated in the hope\r
+ * users will recognise that it would be unwise to make direct use of the\r
+ * structure members.\r
+ */\r
+typedef struct xSTATIC_QUEUE\r
+{\r
+ void *pvDummy1[ 3 ];\r
+\r
+ union\r
+ {\r
+ void *pvDummy2;\r
+ UBaseType_t uxDummy2;\r
+ } u;\r
+\r
+ StaticList_t xDummy3[ 2 ];\r
+ UBaseType_t uxDummy4[ 3 ];\r
+ uint8_t ucDummy5[ 2 ];\r
+\r
+ #if( ( configSUPPORT_STATIC_ALLOCATION == 1 ) && ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) )\r
+ uint8_t ucDummy6;\r
+ #endif\r
+\r
+ #if ( configUSE_QUEUE_SETS == 1 )\r
+ void *pvDummy7;\r
+ #endif\r
+\r
+ #if ( configUSE_TRACE_FACILITY == 1 )\r
+ UBaseType_t uxDummy8;\r
+ uint8_t ucDummy9;\r
+ #endif\r
+\r
+} StaticQueue_t;\r
+typedef StaticQueue_t StaticSemaphore_t;\r
+\r
+/*\r
+ * In line with software engineering best practice, especially when supplying a\r
+ * library that is likely to change in future versions, FreeRTOS implements a\r
+ * strict data hiding policy. This means the event group structure used\r
+ * internally by FreeRTOS is not accessible to application code. However, if\r
+ * the application writer wants to statically allocate the memory required to\r
+ * create an event group then the size of the event group object needs to be\r
+ * know. The StaticEventGroup_t structure below is provided for this purpose.\r
+ * Its sizes and alignment requirements are guaranteed to match those of the\r
+ * genuine structure, no matter which architecture is being used, and no matter\r
+ * how the values in FreeRTOSConfig.h are set. Its contents are somewhat\r
+ * obfuscated in the hope users will recognise that it would be unwise to make\r
+ * direct use of the structure members.\r
+ */\r
+typedef struct xSTATIC_EVENT_GROUP\r
+{\r
+ TickType_t xDummy1;\r
+ StaticList_t xDummy2;\r
+\r
+ #if( configUSE_TRACE_FACILITY == 1 )\r
+ UBaseType_t uxDummy3;\r
+ #endif\r
+\r
+ #if( ( configSUPPORT_STATIC_ALLOCATION == 1 ) && ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) )\r
+ uint8_t ucDummy4;\r
+ #endif\r
+\r
+} StaticEventGroup_t;\r
+\r
+/*\r
+ * In line with software engineering best practice, especially when supplying a\r
+ * library that is likely to change in future versions, FreeRTOS implements a\r
+ * strict data hiding policy. This means the software timer structure used\r
+ * internally by FreeRTOS is not accessible to application code. However, if\r
+ * the application writer wants to statically allocate the memory required to\r
+ * create a software timer then the size of the queue object needs to be know.\r
+ * The StaticTimer_t structure below is provided for this purpose. Its sizes\r
+ * and alignment requirements are guaranteed to match those of the genuine\r
+ * structure, no matter which architecture is being used, and no matter how the\r
+ * values in FreeRTOSConfig.h are set. Its contents are somewhat obfuscated in\r
+ * the hope users will recognise that it would be unwise to make direct use of\r
+ * the structure members.\r
+ */\r
+typedef struct xSTATIC_TIMER\r
+{\r
+ void *pvDummy1;\r
+ StaticListItem_t xDummy2;\r
+ TickType_t xDummy3;\r
+ UBaseType_t uxDummy4;\r
+ void *pvDummy5;\r
+ TaskFunction_t pvDummy6;\r
+ #if( configUSE_TRACE_FACILITY == 1 )\r
+ UBaseType_t uxDummy7;\r
+ #endif\r
+\r
+ #if( ( configSUPPORT_STATIC_ALLOCATION == 1 ) && ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) )\r
+ uint8_t ucDummy8;\r
+ #endif\r
+\r
+} StaticTimer_t;\r
+\r
+/*\r
+* In line with software engineering best practice, especially when supplying a\r
+* library that is likely to change in future versions, FreeRTOS implements a\r
+* strict data hiding policy. This means the stream buffer structure used\r
+* internally by FreeRTOS is not accessible to application code. However, if\r
+* the application writer wants to statically allocate the memory required to\r
+* create a stream buffer then the size of the stream buffer object needs to be\r
+* know. The StaticStreamBuffer_t structure below is provided for this purpose.\r
+* Its size and alignment requirements are guaranteed to match those of the\r
+* genuine structure, no matter which architecture is being used, and no matter\r
+* how the values in FreeRTOSConfig.h are set. Its contents are somewhat\r
+* obfuscated in the hope users will recognise that it would be unwise to make\r
+* direct use of the structure members.\r
+*/\r
+typedef struct xSTATIC_STREAM_BUFFER\r
+{\r
+ size_t uxDummy1[ 4 ];\r
+ void * pvDummy2[ 3 ];\r
+ uint8_t ucDummy3;\r
+ #if ( configUSE_TRACE_FACILITY == 1 )\r
+ UBaseType_t uxDummy4;\r
+ #endif\r
+} StaticStreamBuffer_t;\r
+\r
+/* Message buffers are built on stream buffers. */\r
+typedef StaticStreamBuffer_t StaticMessageBuffer_t;\r
+\r
+#ifdef __cplusplus\r
+}\r
+#endif\r