+#if( configSUPPORT_DYNAMIC_ALLOCATION == 1 )\r
+ TimerHandle_t xTimerCreate( const char * const pcTimerName, const TickType_t xTimerPeriodInTicks, const UBaseType_t uxAutoReload, void * const pvTimerID, TimerCallbackFunction_t pxCallbackFunction ) PRIVILEGED_FUNCTION; /*lint !e971 Unqualified char types are allowed for strings and single characters only. */\r
+#endif\r
+\r
+/**\r
+ * TimerHandle_t xTimerCreateStatic(const char * const pcTimerName,\r
+ * TickType_t xTimerPeriodInTicks,\r
+ * UBaseType_t uxAutoReload,\r
+ * void * pvTimerID,\r
+ * TimerCallbackFunction_t pxCallbackFunction,\r
+ * StaticTimer_t *pxTimerBuffer );\r
+ *\r
+ * Creates a new software timer instance, and returns a handle by which the\r
+ * created software timer can be referenced.\r
+ *\r
+ * Internally, within the FreeRTOS implementation, software timers use a block\r
+ * of memory, in which the timer data structure is stored. If a software timer\r
+ * is created using xTimerCreate() then the required memory is automatically\r
+ * dynamically allocated inside the xTimerCreate() function. (see\r
+ * http://www.freertos.org/a00111.html). If a software timer is created using\r
+ * xTimerCreateStatic() then the application writer must provide the memory that\r
+ * will get used by the software timer. xTimerCreateStatic() therefore allows a\r
+ * software timer to be created without using any dynamic memory allocation.\r
+ *\r
+ * Timers are created in the dormant state. The xTimerStart(), xTimerReset(),\r
+ * xTimerStartFromISR(), xTimerResetFromISR(), xTimerChangePeriod() and\r
+ * xTimerChangePeriodFromISR() API functions can all be used to transition a\r
+ * timer into the active state.\r
+ *\r
+ * @param pcTimerName A text name that is assigned to the timer. This is done\r
+ * purely to assist debugging. The kernel itself only ever references a timer\r
+ * by its handle, and never by its name.\r
+ *\r
+ * @param xTimerPeriodInTicks The timer period. The time is defined in tick\r
+ * periods so the constant portTICK_PERIOD_MS can be used to convert a time that\r
+ * has been specified in milliseconds. For example, if the timer must expire\r
+ * after 100 ticks, then xTimerPeriodInTicks should be set to 100.\r
+ * Alternatively, if the timer must expire after 500ms, then xPeriod can be set\r
+ * to ( 500 / portTICK_PERIOD_MS ) provided configTICK_RATE_HZ is less than or\r
+ * equal to 1000.\r
+ *\r
+ * @param uxAutoReload If uxAutoReload is set to pdTRUE then the timer will\r
+ * expire repeatedly with a frequency set by the xTimerPeriodInTicks parameter.\r
+ * If uxAutoReload is set to pdFALSE then the timer will be a one-shot timer and\r
+ * enter the dormant state after it expires.\r
+ *\r
+ * @param pvTimerID An identifier that is assigned to the timer being created.\r
+ * Typically this would be used in the timer callback function to identify which\r
+ * timer expired when the same callback function is assigned to more than one\r
+ * timer.\r
+ *\r
+ * @param pxCallbackFunction The function to call when the timer expires.\r
+ * Callback functions must have the prototype defined by TimerCallbackFunction_t,\r
+ * which is "void vCallbackFunction( TimerHandle_t xTimer );".\r
+ *\r
+ * @param pxTimerBuffer Must point to a variable of type StaticTimer_t, which\r
+ * will be then be used to hold the software timer's data structures, removing\r
+ * the need for the memory to be allocated dynamically.\r
+ *\r
+ * @return If the timer is created then a handle to the created timer is\r
+ * returned. If pxTimerBuffer was NULL then NULL is returned.\r
+ *\r
+ * Example usage:\r
+ * @verbatim\r
+ *\r
+ * // The buffer used to hold the software timer's data structure.\r
+ * static StaticTimer_t xTimerBuffer;\r
+ *\r
+ * // A variable that will be incremented by the software timer's callback\r
+ * // function.\r
+ * UBaseType_t uxVariableToIncrement = 0;\r
+ *\r
+ * // A software timer callback function that increments a variable passed to\r
+ * // it when the software timer was created. After the 5th increment the\r
+ * // callback function stops the software timer.\r
+ * static void prvTimerCallback( TimerHandle_t xExpiredTimer )\r
+ * {\r
+ * UBaseType_t *puxVariableToIncrement;\r
+ * BaseType_t xReturned;\r
+ *\r
+ * // Obtain the address of the variable to increment from the timer ID.\r
+ * puxVariableToIncrement = ( UBaseType_t * ) pvTimerGetTimerID( xExpiredTimer );\r
+ *\r
+ * // Increment the variable to show the timer callback has executed.\r
+ * ( *puxVariableToIncrement )++;\r
+ *\r
+ * // If this callback has executed the required number of times, stop the\r
+ * // timer.\r
+ * if( *puxVariableToIncrement == 5 )\r
+ * {\r
+ * // This is called from a timer callback so must not block.\r
+ * xTimerStop( xExpiredTimer, staticDONT_BLOCK );\r
+ * }\r
+ * }\r
+ *\r
+ *\r
+ * void main( void )\r
+ * {\r
+ * // Create the software time. xTimerCreateStatic() has an extra parameter\r
+ * // than the normal xTimerCreate() API function. The parameter is a pointer\r
+ * // to the StaticTimer_t structure that will hold the software timer\r
+ * // structure. If the parameter is passed as NULL then the structure will be\r
+ * // allocated dynamically, just as if xTimerCreate() had been called.\r
+ * xTimer = xTimerCreateStatic( "T1", // Text name for the task. Helps debugging only. Not used by FreeRTOS.\r
+ * xTimerPeriod, // The period of the timer in ticks.\r
+ * pdTRUE, // This is an auto-reload timer.\r
+ * ( void * ) &uxVariableToIncrement, // A variable incremented by the software timer's callback function\r
+ * prvTimerCallback, // The function to execute when the timer expires.\r
+ * &xTimerBuffer ); // The buffer that will hold the software timer structure.\r
+ *\r
+ * // The scheduler has not started yet so a block time is not used.\r
+ * xReturned = xTimerStart( xTimer, 0 );\r
+ *\r
+ * // ...\r
+ * // Create tasks here.\r
+ * // ...\r
+ *\r
+ * // Starting the scheduler will start the timers running as they have already\r
+ * // been set into the active state.\r
+ * xTaskStartScheduler();\r
+ *\r
+ * // Should not reach here.\r
+ * for( ;; );\r
+ * }\r
+ * @endverbatim\r
+ */\r
+#if( configSUPPORT_STATIC_ALLOCATION == 1 )\r
+ TimerHandle_t xTimerCreateStatic( const char * const pcTimerName, const TickType_t xTimerPeriodInTicks, const UBaseType_t uxAutoReload, void * const pvTimerID, TimerCallbackFunction_t pxCallbackFunction, StaticTimer_t *pxTimerBuffer ) PRIVILEGED_FUNCTION; /*lint !e971 Unqualified char types are allowed for strings and single characters only. */\r
+#endif /* configSUPPORT_STATIC_ALLOCATION */\r