]> git.sur5r.net Git - freertos/blob - FreeRTOS/Demo/PC/main.c
Prepare for V7.2.0 release.
[freertos] / FreeRTOS / Demo / PC / main.c
1 /*\r
2     FreeRTOS V7.2.0 - Copyright (C) 2012 Real Time Engineers Ltd.\r
3         \r
4 \r
5     ***************************************************************************\r
6      *                                                                       *\r
7      *    FreeRTOS tutorial books are available in pdf and paperback.        *\r
8      *    Complete, revised, and edited pdf reference manuals are also       *\r
9      *    available.                                                         *\r
10      *                                                                       *\r
11      *    Purchasing FreeRTOS documentation will not only help you, by       *\r
12      *    ensuring you get running as quickly as possible and with an        *\r
13      *    in-depth knowledge of how to use FreeRTOS, it will also help       *\r
14      *    the FreeRTOS project to continue with its mission of providing     *\r
15      *    professional grade, cross platform, de facto standard solutions    *\r
16      *    for microcontrollers - completely free of charge!                  *\r
17      *                                                                       *\r
18      *    >>> See http://www.FreeRTOS.org/Documentation for details. <<<     *\r
19      *                                                                       *\r
20      *    Thank you for using FreeRTOS, and thank you for your support!      *\r
21      *                                                                       *\r
22     ***************************************************************************\r
23 \r
24 \r
25     This file is part of the FreeRTOS distribution.\r
26 \r
27     FreeRTOS is free software; you can redistribute it and/or modify it under\r
28     the terms of the GNU General Public License (version 2) as published by the\r
29     Free Software Foundation AND MODIFIED BY the FreeRTOS exception.\r
30     >>>NOTE<<< The modification to the GPL is included to allow you to\r
31     distribute a combined work that includes FreeRTOS without being obliged to\r
32     provide the source code for proprietary components outside of the FreeRTOS\r
33     kernel.  FreeRTOS is distributed in the hope that it will be useful, but\r
34     WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY\r
35     or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for\r
36     more details. You should have received a copy of the GNU General Public\r
37     License and the FreeRTOS license exception along with FreeRTOS; if not it\r
38     can be viewed here: http://www.freertos.org/a00114.html and also obtained\r
39     by writing to Richard Barry, contact details for whom are available on the\r
40     FreeRTOS WEB site.\r
41 \r
42     1 tab == 4 spaces!\r
43     \r
44     ***************************************************************************\r
45      *                                                                       *\r
46      *    Having a problem?  Start by reading the FAQ "My application does   *\r
47      *    not run, what could be wrong?                                      *\r
48      *                                                                       *\r
49      *    http://www.FreeRTOS.org/FAQHelp.html                               *\r
50      *                                                                       *\r
51     ***************************************************************************\r
52 \r
53     \r
54     http://www.FreeRTOS.org - Documentation, training, latest information, \r
55     license and contact details.\r
56     \r
57     http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,\r
58     including FreeRTOS+Trace - an indispensable productivity tool.\r
59 \r
60     Real Time Engineers ltd license FreeRTOS to High Integrity Systems, who sell \r
61     the code with commercial support, indemnification, and middleware, under \r
62     the OpenRTOS brand: http://www.OpenRTOS.com.  High Integrity Systems also\r
63     provide a safety engineered and independently SIL3 certified version under \r
64     the SafeRTOS brand: http://www.SafeRTOS.com.\r
65 */\r
66 \r
67 /**\r
68  * Creates all the demo application tasks and co-routines, then starts the \r
69  * scheduler.\r
70  *\r
71  * Main. c also creates a task called "Print".  This only executes every \r
72  * five seconds but has the highest priority so is guaranteed to get \r
73  * processor time.  Its main function is to check that all the other tasks \r
74  * are still operational.  Nearly all the tasks in the demo application \r
75  * maintain a unique count that is incremented each time the task successfully \r
76  * completes its function.  Should any error occur within the task the count is \r
77  * permanently halted.  The print task checks the count of each task to ensure \r
78  * it has changed since the last time the print task executed.  If any count is \r
79  * found not to have changed the print task displays an appropriate message.  \r
80  * If all the tasks are still incrementing their unique counts the print task \r
81  * displays an "OK" message.\r
82  *\r
83  * The LED flash tasks do not maintain a count as they already provide visual \r
84  * feedback of their status.\r
85  *\r
86  * The print task blocks on the queue into which messages that require \r
87  * displaying are posted.  It will therefore only block for the full 5 seconds\r
88  * if no messages are posted onto the queue.\r
89  *\r
90  * Main. c also provides a demonstration of how the trace visualisation utility\r
91  * can be used, and how the scheduler can be stopped.\r
92  *\r
93  * \page MainC main.c\r
94  * \ingroup DemoFiles\r
95  * <HR>\r
96  */\r
97 \r
98 #include <stdlib.h>\r
99 #include <conio.h>\r
100 #include "FreeRTOS.h"\r
101 #include "task.h"\r
102 #include "croutine.h"\r
103 #include "partest.h"\r
104 #include "serial.h"\r
105 \r
106 /* Demo file headers. */\r
107 #include "BlockQ.h"\r
108 #include "PollQ.h"\r
109 #include "death.h"\r
110 #include "crflash.h"\r
111 #include "flop.h"\r
112 #include "print.h"\r
113 #include "comtest.h"\r
114 #include "fileio.h"\r
115 #include "semtest.h"\r
116 #include "integer.h"\r
117 #include "dynamic.h"\r
118 #include "mevents.h"\r
119 #include "crhook.h"\r
120 #include "blocktim.h"\r
121 #include "AltBlock.h"\r
122 #include "GenQTest.h"\r
123 #include "QPeek.h"\r
124 #include "countsem.h"\r
125 #include "AltQTest.h"\r
126 #include "AltPollQ.h"\r
127 #include "AltBlckQ.h"\r
128 #include "RecMutex.h"\r
129 \r
130 /* Priority definitions for the tasks in the demo application. */\r
131 #define mainLED_TASK_PRIORITY           ( tskIDLE_PRIORITY + 1 )\r
132 #define mainCREATOR_TASK_PRIORITY       ( tskIDLE_PRIORITY + 3 )\r
133 #define mainPRINT_TASK_PRIORITY         ( tskIDLE_PRIORITY + 4 )\r
134 #define mainQUEUE_POLL_PRIORITY         ( tskIDLE_PRIORITY + 2 )\r
135 #define mainQUEUE_BLOCK_PRIORITY        ( tskIDLE_PRIORITY + 3 )\r
136 #define mainCOM_TEST_PRIORITY           ( tskIDLE_PRIORITY + 2 )\r
137 #define mainSEMAPHORE_TASK_PRIORITY     ( tskIDLE_PRIORITY + 1 )\r
138 #define mainGENERIC_QUEUE_PRIORITY      ( tskIDLE_PRIORITY )\r
139 \r
140 #define mainPRINT_STACK_SIZE            ( ( unsigned short ) 512 )\r
141 #define mainDEBUG_LOG_BUFFER_SIZE       ( ( unsigned short ) 20480 )\r
142 \r
143 /* The number of flash co-routines to create. */\r
144 #define mainNUM_FLASH_CO_ROUTINES       ( 8 )\r
145 \r
146 /* Task function for the "Print" task as described at the top of the file. */\r
147 static void vErrorChecks( void *pvParameters );\r
148 \r
149 /* Function that checks the unique count of all the other tasks as described at\r
150 the top of the file. */\r
151 static void prvCheckOtherTasksAreStillRunning( void );\r
152 \r
153 /* Key presses can be used to start/stop the trace visualisation utility or stop\r
154 the scheduler. */\r
155 static void     prvCheckForKeyPresses( void );\r
156 \r
157 /* Buffer used by the trace visualisation utility so only needed if the trace\r
158 being used. */\r
159 #if configUSE_TRACE_FACILITY == 1\r
160         static char pcWriteBuffer[ mainDEBUG_LOG_BUFFER_SIZE ];\r
161 #endif\r
162 \r
163 /* Constant definition used to turn on/off the pre-emptive scheduler. */\r
164 static const short sUsingPreemption = configUSE_PREEMPTION;\r
165 \r
166 /* Start the math tasks appropriate to the build.  The Borland port does\r
167 not yet support floating point so uses the integer equivalent. */\r
168 static void prvStartMathTasks( void );\r
169 \r
170 /* Check which ever tasks are relevant to this build. */\r
171 static portBASE_TYPE prvCheckMathTasksAreStillRunning( void );\r
172 \r
173 /* Used to demonstrate the "task switched in" callback function. */\r
174 static portBASE_TYPE prvExampleTaskHook( void * pvParameter );\r
175 \r
176 /* Just used to count the number of times the example task callback function is\r
177 called, and the number of times a queue send passes. */\r
178 static unsigned long long uxCheckTaskHookCallCount = 0;\r
179 static unsigned long long uxQueueSendPassedCount = 0;\r
180 \r
181 /*-----------------------------------------------------------*/\r
182 \r
183 short main( void )\r
184 {\r
185         /* Initialise hardware and utilities. */\r
186         vParTestInitialise();\r
187         vPrintInitialise();\r
188         \r
189         /* CREATE ALL THE DEMO APPLICATION TASKS. */\r
190         prvStartMathTasks();\r
191         vStartComTestTasks( mainCOM_TEST_PRIORITY, serCOM1, ser115200 );\r
192         vStartPolledQueueTasks( mainQUEUE_POLL_PRIORITY );\r
193         vStartBlockingQueueTasks( mainQUEUE_BLOCK_PRIORITY );\r
194         vCreateBlockTimeTasks();\r
195         vStartGenericQueueTasks( mainGENERIC_QUEUE_PRIORITY );\r
196         vStartSemaphoreTasks( mainSEMAPHORE_TASK_PRIORITY );\r
197         vStartDynamicPriorityTasks();\r
198         vStartMultiEventTasks();\r
199         vStartQueuePeekTasks();\r
200         vStartCountingSemaphoreTasks();\r
201         vStartAltGenericQueueTasks( mainGENERIC_QUEUE_PRIORITY );\r
202         vCreateAltBlockTimeTasks();\r
203         vStartAltBlockingQueueTasks( mainQUEUE_BLOCK_PRIORITY );        \r
204         vStartAltPolledQueueTasks( mainQUEUE_POLL_PRIORITY );\r
205         vStartRecursiveMutexTasks();\r
206                 \r
207         /* Create the "Print" task as described at the top of the file. */\r
208         xTaskCreate( vErrorChecks, "Print", mainPRINT_STACK_SIZE, NULL, mainPRINT_TASK_PRIORITY, NULL );\r
209 \r
210         /* This task has to be created last as it keeps account of the number of tasks\r
211         it expects to see running. */\r
212         vCreateSuicidalTasks( mainCREATOR_TASK_PRIORITY );\r
213 \r
214         /* Create the co-routines that flash the LED's. */\r
215         vStartFlashCoRoutines( mainNUM_FLASH_CO_ROUTINES );\r
216 \r
217         /* Create the co-routines that communicate with the tick hook. */\r
218         vStartHookCoRoutines();\r
219 \r
220         /* Set the scheduler running.  This function will not return unless a task\r
221         calls vTaskEndScheduler(). */\r
222         vTaskStartScheduler();\r
223 \r
224         return 1;\r
225 }\r
226 /*-----------------------------------------------------------*/\r
227 \r
228 static portBASE_TYPE prvExampleTaskHook( void * pvParameter )\r
229 {\r
230         if( pvParameter != ( void * ) 0xabcd )\r
231         {\r
232                 /* The parameter did not contain the value we expected, so cause an\r
233                 error to be detected by setting the call count back to zero. */\r
234                 uxCheckTaskHookCallCount = 0;\r
235         }\r
236         else\r
237         {\r
238                 /* Simply increment a number so we know the callback has been executed. */\r
239                 uxCheckTaskHookCallCount++;\r
240         }\r
241 \r
242         return 0;\r
243 }\r
244 /*-----------------------------------------------------------*/\r
245 \r
246 void vMainQueueSendPassed( void )\r
247 {\r
248         /* This is just an example implementation of the "queue send" trace hook. */\r
249         uxQueueSendPassedCount++;\r
250 }\r
251 /*-----------------------------------------------------------*/\r
252 \r
253 static void vErrorChecks( void *pvParameters )\r
254 {\r
255 portTickType xExpectedWakeTime;\r
256 const portTickType xPrintRate = ( portTickType ) 5000 / portTICK_RATE_MS;\r
257 const long lMaxAllowableTimeDifference = ( long ) 0;\r
258 portTickType xWakeTime;\r
259 long lTimeDifference;\r
260 const char *pcReceivedMessage;\r
261 const char * const pcTaskBlockedTooLongMsg = "Print task blocked too long!\r\n";\r
262 const char * const pcUnexpectedHookValueMsg = "Task hook has unexpected value!\r\n";\r
263 \r
264         ( void ) pvParameters;\r
265 \r
266         /* Register our callback function. */\r
267         vTaskSetApplicationTaskTag( NULL, prvExampleTaskHook );\r
268         \r
269         /* Just for test purposes. */\r
270         if( xTaskGetApplicationTaskTag( NULL ) != prvExampleTaskHook )\r
271         {\r
272                 vPrintDisplayMessage( &pcUnexpectedHookValueMsg );\r
273         }\r
274 \r
275         /* Loop continuously, blocking, then checking all the other tasks are still\r
276         running, before blocking once again.  This task blocks on the queue of\r
277         messages that require displaying so will wake either by its time out expiring,\r
278         or a message becoming available. */\r
279         for( ;; )\r
280         {\r
281                 /* Calculate the time we will unblock if no messages are received\r
282                 on the queue.  This is used to check that we have not blocked for too long. */\r
283                 xExpectedWakeTime = xTaskGetTickCount();\r
284                 xExpectedWakeTime += xPrintRate;\r
285 \r
286                 /* Block waiting for either a time out or a message to be posted that\r
287                 required displaying. */\r
288                 pcReceivedMessage = pcPrintGetNextMessage( xPrintRate );\r
289 \r
290                 /* Was a message received? */\r
291                 if( pcReceivedMessage == NULL )\r
292                 {\r
293                         /* A message was not received so we timed out, did we unblock at the\r
294                         expected time? */\r
295                         xWakeTime = xTaskGetTickCount();\r
296 \r
297                         /* Calculate the difference between the time we unblocked and the\r
298                         time we should have unblocked. */\r
299                         if( xWakeTime > xExpectedWakeTime )\r
300                         {\r
301                                 lTimeDifference = ( long ) ( xWakeTime - xExpectedWakeTime );\r
302                         }\r
303                         else\r
304                         {\r
305                                 lTimeDifference = ( long ) ( xExpectedWakeTime - xWakeTime );\r
306                         }\r
307 \r
308                         if( lTimeDifference > lMaxAllowableTimeDifference )\r
309                         {\r
310                                 /* We blocked too long - create a message that will get\r
311                                 printed out the next time around.  If we are not using\r
312                                 preemption then we won't expect the timing to be so\r
313                                 accurate. */\r
314                                 if( sUsingPreemption == pdTRUE )\r
315                                 {\r
316                                         vPrintDisplayMessage( &pcTaskBlockedTooLongMsg );\r
317                                 }\r
318                         }\r
319 \r
320                         /* Check the other tasks are still running, just in case. */\r
321                         prvCheckOtherTasksAreStillRunning();\r
322                 }\r
323                 else\r
324                 {\r
325                         /* We unblocked due to a message becoming available.  Send the message\r
326                         for printing. */\r
327                         vDisplayMessage( pcReceivedMessage );\r
328                 }\r
329 \r
330                 /* Key presses are used to invoke the trace visualisation utility, or end\r
331                 the program. */\r
332                 prvCheckForKeyPresses();\r
333         }\r
334 }\r
335 /*-----------------------------------------------------------*/\r
336 \r
337 static void     prvCheckForKeyPresses( void )\r
338 {\r
339 short sIn;\r
340 \r
341         taskENTER_CRITICAL();\r
342                 #ifdef DEBUG_BUILD\r
343                         /* kbhit can be used in .exe's that are executed from the command\r
344                         line, but not if executed through the debugger. */\r
345                         sIn = 0;\r
346                 #else\r
347                         sIn = kbhit();\r
348                 #endif\r
349         taskEXIT_CRITICAL();\r
350 \r
351         if( sIn )\r
352         {\r
353                 /* Key presses can be used to start/stop the trace utility, or end the \r
354                 program. */\r
355                 sIn = getch();\r
356                 switch( sIn )\r
357                 {\r
358                         /* Only define keys for turning on and off the trace if the trace\r
359                         is being used. */\r
360                         #if configUSE_TRACE_FACILITY == 1\r
361                                 case 't' :      vTaskList( pcWriteBuffer );\r
362                                                         vWriteMessageToDisk( pcWriteBuffer );\r
363                                                         break;\r
364                                 /* The legacy trace is no longer supported.  Use FreeRTOS+Trace instead\r
365                                 case 's' :      vTaskStartTrace( pcWriteBuffer, mainDEBUG_LOG_BUFFER_SIZE );\r
366                                                         break;\r
367 \r
368                                 case 'e' :      {\r
369                                                                 unsigned long ulBufferLength;\r
370                                                                 ulBufferLength = ulTaskEndTrace();\r
371                                                                 vWriteBufferToDisk( pcWriteBuffer, ulBufferLength );\r
372                                                         }\r
373                                                         break;\r
374                                 */\r
375                         #endif\r
376 \r
377                         default  :      vTaskEndScheduler();\r
378                                                 break;\r
379                 }\r
380         }\r
381 }\r
382 /*-----------------------------------------------------------*/\r
383 \r
384 static void prvCheckOtherTasksAreStillRunning( void )\r
385 {\r
386 static short sErrorHasOccurred = pdFALSE;\r
387 static unsigned long long uxLastHookCallCount = 0, uxLastQueueSendCount = 0;\r
388 \r
389         if( prvCheckMathTasksAreStillRunning() != pdTRUE )\r
390         {\r
391                 vDisplayMessage( "Maths task count unchanged!\r\n" );\r
392                 sErrorHasOccurred = pdTRUE;\r
393         }\r
394 \r
395         if( xAreComTestTasksStillRunning() != pdTRUE )\r
396         {\r
397                 vDisplayMessage( "Com test count unchanged!\r\n" );\r
398                 sErrorHasOccurred = pdTRUE;\r
399         }\r
400 \r
401         if( xAreBlockingQueuesStillRunning() != pdTRUE )\r
402         {\r
403                 vDisplayMessage( "Blocking queues count unchanged!\r\n" );\r
404                 sErrorHasOccurred = pdTRUE;\r
405         }\r
406 \r
407         if( xAreAltBlockingQueuesStillRunning() != pdTRUE )\r
408         {\r
409                 vDisplayMessage( "Alt blocking queues count unchanged!\r\n" );\r
410                 sErrorHasOccurred = pdTRUE;\r
411         }\r
412 \r
413         if( xArePollingQueuesStillRunning() != pdTRUE )\r
414         {\r
415                 vDisplayMessage( "Polling queue count unchanged!\r\n" );\r
416                 sErrorHasOccurred = pdTRUE;\r
417         }\r
418 \r
419         if( xAreAltPollingQueuesStillRunning() != pdTRUE )\r
420         {\r
421                 vDisplayMessage( "Alt polling queue count unchanged!\r\n" );\r
422                 sErrorHasOccurred = pdTRUE;\r
423         }\r
424 \r
425         if( xIsCreateTaskStillRunning() != pdTRUE )\r
426         {\r
427                 vDisplayMessage( "Incorrect number of tasks running!\r\n" );\r
428                 sErrorHasOccurred = pdTRUE;\r
429         }\r
430 \r
431         if( xAreSemaphoreTasksStillRunning() != pdTRUE )\r
432         {\r
433                 vDisplayMessage( "Semaphore take count unchanged!\r\n" );\r
434                 sErrorHasOccurred = pdTRUE;\r
435         }\r
436 \r
437         if( xAreDynamicPriorityTasksStillRunning() != pdTRUE )\r
438         {\r
439                 vDisplayMessage( "Dynamic priority count unchanged!\r\n" );\r
440                 sErrorHasOccurred = pdTRUE;\r
441         }\r
442         \r
443         if( xAreMultiEventTasksStillRunning() != pdTRUE )\r
444         {\r
445                 vDisplayMessage( "Error in multi events tasks!\r\n" );\r
446                 sErrorHasOccurred = pdTRUE;\r
447         }\r
448 \r
449         if( xAreFlashCoRoutinesStillRunning() != pdTRUE )\r
450         {\r
451                 vDisplayMessage( "Error in co-routine flash tasks!\r\n" );\r
452                 sErrorHasOccurred = pdTRUE;\r
453         }\r
454 \r
455         if( xAreHookCoRoutinesStillRunning() != pdTRUE )\r
456         {\r
457                 vDisplayMessage( "Error in tick hook to co-routine communications!\r\n" );\r
458                 sErrorHasOccurred = pdTRUE;\r
459         }\r
460 \r
461         if( xAreBlockTimeTestTasksStillRunning() != pdTRUE )\r
462         {\r
463                 vDisplayMessage( "Error in block time test tasks!\r\n" );\r
464                 sErrorHasOccurred = pdTRUE;\r
465         }\r
466 \r
467         if( xAreAltBlockTimeTestTasksStillRunning() != pdTRUE )\r
468         {\r
469                 vDisplayMessage( "Error in fast block time test tasks!\r\n" );\r
470                 sErrorHasOccurred = pdTRUE;\r
471         }\r
472 \r
473         if( xAreGenericQueueTasksStillRunning() != pdTRUE )\r
474         {\r
475                 vDisplayMessage( "Error in generic queue test task!\r\n" );\r
476                 sErrorHasOccurred = pdTRUE;             \r
477         }\r
478 \r
479         if( xAreAltGenericQueueTasksStillRunning() != pdTRUE )\r
480         {\r
481                 vDisplayMessage( "Error in fast generic queue test task!\r\n" );\r
482                 sErrorHasOccurred = pdTRUE;             \r
483         }\r
484 \r
485         if( xAreQueuePeekTasksStillRunning() != pdTRUE )\r
486         {\r
487                 vDisplayMessage( "Error in queue peek test task!\r\n" );\r
488                 sErrorHasOccurred = pdTRUE;\r
489         }\r
490 \r
491         if( xAreCountingSemaphoreTasksStillRunning() != pdTRUE )\r
492         {\r
493                 vDisplayMessage( "Error in counting semaphore demo task!\r\n" );\r
494                 sErrorHasOccurred = pdTRUE;\r
495         }\r
496 \r
497         if( xAreRecursiveMutexTasksStillRunning() != pdTRUE )\r
498         {\r
499                 vDisplayMessage( "Error in recursive mutex tasks!\r\n" );\r
500                 sErrorHasOccurred = pdTRUE;\r
501         }\r
502 \r
503         /* The hook function associated with this task is called each time the task\r
504         is switched in.  We therefore expect the number of times the callback \r
505         function has been executed to have increrment since the last time this \r
506         function executed. */\r
507         if( uxCheckTaskHookCallCount <= uxLastHookCallCount )\r
508         {\r
509                 vDisplayMessage( "Error in task hook call count!\r\n" );\r
510                 sErrorHasOccurred = pdTRUE;\r
511         }\r
512         else\r
513         {\r
514                 uxLastHookCallCount = uxCheckTaskHookCallCount;\r
515         }\r
516 \r
517         /* We would expect some queue sending to occur between calls of this \r
518         function. */\r
519         if( uxQueueSendPassedCount <= uxLastQueueSendCount )\r
520         {\r
521                 vDisplayMessage( "Error in queue send hook call count!\r\n" );\r
522                 sErrorHasOccurred = pdTRUE;\r
523         }\r
524         else\r
525         {\r
526                 uxLastQueueSendCount = uxQueueSendPassedCount;\r
527         }\r
528 \r
529         if( sErrorHasOccurred == pdFALSE )\r
530         {\r
531                 vDisplayMessage( "OK " );\r
532         }\r
533 }\r
534 /*-----------------------------------------------------------*/\r
535 \r
536 static void prvStartMathTasks( void )\r
537 {\r
538         #ifdef BCC_INDUSTRIAL_PC_PORT\r
539                 /* The Borland project does not yet support floating point. */\r
540                 vStartIntegerMathTasks( tskIDLE_PRIORITY );\r
541         #else\r
542                 vStartMathTasks( tskIDLE_PRIORITY );\r
543         #endif\r
544 }\r
545 /*-----------------------------------------------------------*/\r
546 \r
547 static portBASE_TYPE prvCheckMathTasksAreStillRunning( void )\r
548 {\r
549         #ifdef BCC_INDUSTRIAL_PC_PORT\r
550                 /* The Borland project does not yet support floating point. */\r
551                 return xAreIntegerMathsTaskStillRunning();\r
552         #else\r
553                 return xAreMathsTaskStillRunning();\r
554         #endif\r
555 }\r
556 /*-----------------------------------------------------------*/\r
557 \r
558 void vApplicationIdleHook( void )\r
559 {\r
560         /* The co-routines are executed in the idle task using the idle task \r
561         hook. */\r
562         vCoRoutineSchedule();\r
563 }\r
564 /*-----------------------------------------------------------*/\r
565 \r