This file is part of the FreeRTOS distribution.\r
\r
FreeRTOS is free software; you can redistribute it and/or modify\r
- it under the terms of the GNU General Public License as published by\r
+ it under the terms of the GNU General Public License** as published by\r
the Free Software Foundation; either version 2 of the License, or\r
(at your option) any later version.\r
\r
of http://www.FreeRTOS.org for full details of how and when the exception\r
can be applied.\r
\r
- ***************************************************************************\r
-\r
- Please ensure to read the configuration and relevant port sections of the \r
+ ***************************************************************************\r
+ ***************************************************************************\r
+ * *\r
+ * Get the FreeRTOS eBook! See http://www.FreeRTOS.org/Documentation *\r
+ * *\r
+ * This is a concise, step by step, 'hands on' guide that describes both *\r
+ * general multitasking concepts and FreeRTOS specifics. It presents and *\r
+ * explains numerous examples that are written using the FreeRTOS API. *\r
+ * Full source code for all the examples is provided in an accompanying *\r
+ * .zip file. *\r
+ * *\r
+ ***************************************************************************\r
+ ***************************************************************************\r
+\r
+ Please ensure to read the configuration and relevant port sections of the\r
online documentation.\r
\r
- +++ http://www.FreeRTOS.org +++\r
- Documentation, latest information, license and contact details. \r
-\r
- +++ http://www.SafeRTOS.com +++\r
- A version that is certified for use in safety critical systems.\r
+ http://www.FreeRTOS.org - Documentation, latest information, license and \r
+ contact details.\r
\r
- +++ http://www.OpenRTOS.com +++\r
- Commercial support, development, porting, licensing and training services.\r
+ http://www.SafeRTOS.com - A version that is certified for use in safety \r
+ critical systems.\r
\r
- ***************************************************************************\r
+ http://www.OpenRTOS.com - Commercial support, development, porting, \r
+ licensing and training services.\r
*/\r
\r
/* ------------------------ System includes ------------------------------- */\r
#include "flop.h"\r
\r
/* ------------------------ Defines --------------------------------------- */\r
-#define mainCOM_TEST_BAUD_RATE ( ( unsigned portLONG ) 38400 )\r
+#define mainCOM_TEST_BAUD_RATE ( ( unsigned long ) 38400 )\r
\r
/* Priorities for the demo application tasks. */\r
#define mainLED_TASK_PRIORITY ( tskIDLE_PRIORITY + 3 )\r
#define mainCHECK_PERIOD ( ( portTickType ) 2000 / portTICK_RATE_MS )\r
\r
/* Constants used by the vMemCheckTask() task. */\r
-#define mainCOUNT_INITIAL_VALUE ( ( unsigned portLONG ) 0 )\r
+#define mainCOUNT_INITIAL_VALUE ( ( unsigned long ) 0 )\r
#define mainNO_TASK ( 0 )\r
\r
/* The size of the memory blocks allocated by the vMemCheckTask() task. */\r
\r
/* ------------------------ Static functions ------------------------------ */\r
static portTASK_FUNCTION( vErrorChecks, pvParameters );\r
-static portLONG prvCheckOtherTasksAreStillRunning( unsigned portLONG\r
+static long prvCheckOtherTasksAreStillRunning( unsigned long\r
ulMemCheckTaskCount );\r
static portTASK_FUNCTION( vMemCheckTask, pvParameters );\r
\r
( void )sys_thread_new( vBasicWEBServer, NULL, mainWEB_TASK_PRIORITY );\r
\r
/* Start the check task - which is defined in this file. */\r
- xTaskCreate( vErrorChecks, ( signed portCHAR * )"Check", 512, NULL,\r
+ xTaskCreate( vErrorChecks, ( signed char * )"Check", 512, NULL,\r
mainCHECK_TASK_PRIORITY, NULL );\r
/* Now all the tasks have been started - start the scheduler. */\r
vTaskStartScheduler( );\r
static\r
portTASK_FUNCTION( vErrorChecks, pvParameters )\r
{\r
- unsigned portLONG ulMemCheckTaskRunningCount;\r
+ unsigned long ulMemCheckTaskRunningCount;\r
xTaskHandle xCreatedTask;\r
\r
/* The parameters are not used in this function. */\r
{\r
ulMemCheckTaskRunningCount = mainCOUNT_INITIAL_VALUE;\r
xCreatedTask = mainNO_TASK;\r
- if( xTaskCreate( vMemCheckTask, ( signed portCHAR * )"MEM",\r
+ if( xTaskCreate( vMemCheckTask, ( signed char * )"MEM",\r
configMINIMAL_STACK_SIZE, ( void * )&ulMemCheckTaskRunningCount,\r
tskIDLE_PRIORITY, &xCreatedTask ) != pdPASS )\r
{\r
}\r
}\r
\r
-static portLONG\r
-prvCheckOtherTasksAreStillRunning( unsigned portLONG ulMemCheckTaskCount )\r
+static long\r
+prvCheckOtherTasksAreStillRunning( unsigned long ulMemCheckTaskCount )\r
{\r
- portLONG lReturn = ( portLONG ) pdPASS;\r
+ long lReturn = ( long ) pdPASS;\r
\r
/* Check all the demo tasks (other than the flash tasks) to ensure\r
* that they are all still running, and that none of them have detected\r
*/\r
if( xAreIntegerMathsTaskStillRunning( ) != pdTRUE )\r
{\r
- lReturn = ( portLONG ) pdFAIL;\r
+ lReturn = ( long ) pdFAIL;\r
}\r
\r
if( xArePollingQueuesStillRunning( ) != pdTRUE )\r
{\r
- lReturn = ( portLONG ) pdFAIL;\r
+ lReturn = ( long ) pdFAIL;\r
}\r
\r
if( xAreSemaphoreTasksStillRunning( ) != pdTRUE )\r
{\r
- lReturn = ( portLONG ) pdFAIL;\r
+ lReturn = ( long ) pdFAIL;\r
}\r
\r
if( xAreDynamicPriorityTasksStillRunning( ) != pdTRUE )\r
{\r
- lReturn = ( portLONG ) pdFAIL;\r
+ lReturn = ( long ) pdFAIL;\r
}\r
\r
if( xAreBlockingQueuesStillRunning( ) != pdTRUE )\r
{\r
- lReturn = ( portLONG ) pdFAIL;\r
+ lReturn = ( long ) pdFAIL;\r
}\r
\r
if( ulMemCheckTaskCount == mainCOUNT_INITIAL_VALUE )\r
/* The vMemCheckTask did not increment the counter - it must\r
* have failed.\r
*/\r
- lReturn = ( portLONG ) pdFAIL;\r
+ lReturn = ( long ) pdFAIL;\r
}\r
return lReturn;\r
}\r
static void\r
vMemCheckTask( void *pvParameters )\r
{\r
- unsigned portLONG *pulMemCheckTaskRunningCounter;\r
+ unsigned long *pulMemCheckTaskRunningCounter;\r
void *pvMem1, *pvMem2, *pvMem3;\r
- static portLONG lErrorOccurred = pdFALSE;\r
+ static long lErrorOccurred = pdFALSE;\r
\r
/* This task is dynamically created then deleted during each cycle of the\r
vErrorChecks task to check the operation of the memory allocator. Each time\r
pulMemCheckTaskRunningCounter is incremented each cycle to indicate to the\r
vErrorChecks() task that this task is still executing without error. */\r
\r
- pulMemCheckTaskRunningCounter = ( unsigned portLONG * )pvParameters;\r
+ pulMemCheckTaskRunningCounter = ( unsigned long * )pvParameters;\r
\r
for( ;; )\r
{\r