]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS/Demo/Common/Minimal/TimerDemo.c
Allow the size of the stack used by many of the standard demo/test tasks to be overri...
[freertos] / FreeRTOS / Demo / Common / Minimal / TimerDemo.c
index 66481414835b5b1ccd22441f86b519a4db6c3e7f..1e980b05819ef342277bd331efc6def848a71f5d 100644 (file)
@@ -1,6 +1,6 @@
 /*\r
- * FreeRTOS Kernel V10.0.0\r
- * Copyright (C) 2017 Amazon.com, Inc. or its affiliates.  All Rights Reserved.\r
+ * FreeRTOS Kernel V10.1.1\r
+ * Copyright (C) 2018 Amazon.com, Inc. or its affiliates.  All Rights Reserved.\r
  *\r
  * Permission is hereby granted, free of charge, to any person obtaining a copy of\r
  * this software and associated documentation files (the "Software"), to deal in\r
@@ -10,8 +10,7 @@
  * subject to the following conditions:\r
  *\r
  * The above copyright notice and this permission notice shall be included in all\r
- * copies or substantial portions of the Software. If you wish to use our Amazon\r
- * FreeRTOS name, please do so in a fair use way that does not cause confusion.\r
+ * copies or substantial portions of the Software.\r
  *\r
  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r
  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\r
 \r
 #define tmrdemoDONT_BLOCK                              ( ( TickType_t ) 0 )\r
 #define tmrdemoONE_SHOT_TIMER_PERIOD   ( xBasePeriod * ( TickType_t ) 3 )\r
-#define trmdemoNUM_TIMER_RESETS                        ( ( uint8_t ) 10 )\r
+#define tmrdemoNUM_TIMER_RESETS                        ( ( uint8_t ) 10 )\r
+\r
+#ifndef tmrTIMER_TEST_TASK_STACK_SIZE\r
+       #define tmrTIMER_TEST_TASK_STACK_SIZE configMINIMAL_STACK_SIZE\r
+#endif\r
 \r
 /*-----------------------------------------------------------*/\r
 \r
@@ -138,7 +141,7 @@ void vStartTimerDemoTask( TickType_t xBasePeriodIn )
        task, which will then preempt this task). */\r
        if( xTestStatus != pdFAIL )\r
        {\r
-               xTaskCreate( prvTimerTestTask, "Tmr Tst", configMINIMAL_STACK_SIZE, NULL, configTIMER_TASK_PRIORITY - 1, NULL );\r
+               xTaskCreate( prvTimerTestTask, "Tmr Tst", tmrTIMER_TEST_TASK_STACK_SIZE, NULL, configTIMER_TASK_PRIORITY - 1, NULL );\r
        }\r
 }\r
 /*-----------------------------------------------------------*/\r
@@ -219,7 +222,6 @@ static TickType_t xIterationsWithoutCounterIncrement = ( TickType_t ) 0, xLastCy
                {\r
                        /* The tests appear to be no longer running (stalled). */\r
                        xTestStatus = pdFAIL;\r
-                       configASSERT( xTestStatus );\r
                }\r
        }\r
        else\r
@@ -548,7 +550,7 @@ uint8_t ucTimer;
                configASSERT( xTestStatus );\r
        }\r
 \r
-       for( ucTimer = 0; ucTimer < trmdemoNUM_TIMER_RESETS; ucTimer++ )\r
+       for( ucTimer = 0; ucTimer < tmrdemoNUM_TIMER_RESETS; ucTimer++ )\r
        {\r
                /* Delay for half as long as the one shot timer period, then reset it.\r
                It should never expire while this is done, so its callback count should\r