]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS/Demo/lwIP_Demo_Rowley_ARM7/main.c
Update version number to 8.1.2 after moving the defaulting of configUSE_PORT_OPTIMISE...
[freertos] / FreeRTOS / Demo / lwIP_Demo_Rowley_ARM7 / main.c
index aa61a874d195667f57f59da7eb89b98b02a9a0d3..fa0fec1f2f8e21ac48dde74ac1863a3fc2110e03 100644 (file)
@@ -1,5 +1,5 @@
 /*\r
-    FreeRTOS V7.5.3 - Copyright (C) 2013 Real Time Engineers Ltd. \r
+    FreeRTOS V8.1.2 - Copyright (C) 2014 Real Time Engineers Ltd.\r
     All rights reserved\r
 \r
     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
     the terms of the GNU General Public License (version 2) as published by the\r
     Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.\r
 \r
-    >>! NOTE: The modification to the GPL is included to allow you to distribute\r
-    >>! a combined work that includes FreeRTOS without being obliged to provide\r
-    >>! the source code for proprietary components outside of the FreeRTOS\r
-    >>! kernel.\r
+    >>!   NOTE: The modification to the GPL is included to allow you to     !<<\r
+    >>!   distribute a combined work that includes FreeRTOS without being   !<<\r
+    >>!   obliged to provide the source code for proprietary components     !<<\r
+    >>!   outside of the FreeRTOS kernel.                                   !<<\r
 \r
     FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY\r
     WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\r
@@ -63,9 +63,9 @@
     1 tab == 4 spaces!\r
 */\r
 \r
-/* \r
+/*\r
        NOTE : Tasks run in system mode and the scheduler runs in Supervisor mode.\r
-       The processor MUST be in supervisor mode when vTaskStartScheduler is \r
+       The processor MUST be in supervisor mode when vTaskStartScheduler is\r
        called.  The demo applications included in the FreeRTOS.org download switch\r
        to supervisor mode prior to main being called.  If you are not using one of\r
        these demo application projects then ensure Supervisor mode is used.\r
 /*\r
  * Creates all the application tasks, then starts the scheduler.\r
  *\r
- * A task defined by the function vBasicWEBServer is created.  This executes \r
+ * A task defined by the function vBasicWEBServer is created.  This executes\r
  * the lwIP stack and basic WEB server sample.  A task defined by the function\r
- * vUSBCDCTask.  This executes the USB to serial CDC example.  All the other \r
- * tasks are from the set of standard demo tasks.  The WEB documentation \r
+ * vUSBCDCTask.  This executes the USB to serial CDC example.  All the other\r
+ * tasks are from the set of standard demo tasks.  The WEB documentation\r
  * provides more details of the standard demo application tasks.\r
  *\r
  * Main.c also creates a task called "Check".  This only executes every three\r
@@ -96,7 +96,7 @@
 /*\r
        Changes from V3.2.2\r
 \r
-       + Modified the stack sizes used by some tasks to permit use of the \r
+       + Modified the stack sizes used by some tasks to permit use of the\r
          command line GCC tools.\r
 */\r
 \r
 #include "USB-CDC.h"\r
 \r
 /* lwIP includes. */\r
-#include "lwip/api.h" \r
+#include "lwip/api.h"\r
 \r
 /* Hardware specific headers. */\r
 #include "Board.h"\r
 \r
 /* The rate at which the on board LED will toggle when there is/is not an\r
 error. */\r
-#define mainNO_ERROR_FLASH_PERIOD      ( ( portTickType ) 3000 / portTICK_RATE_MS  )\r
-#define mainERROR_FLASH_PERIOD         ( ( portTickType ) 500 / portTICK_RATE_MS  )\r
+#define mainNO_ERROR_FLASH_PERIOD      ( ( TickType_t ) 3000 / portTICK_PERIOD_MS  )\r
+#define mainERROR_FLASH_PERIOD         ( ( TickType_t ) 500 / portTICK_PERIOD_MS  )\r
 \r
 /* The rate at which the idle hook sends data to the USB port. */\r
-#define mainUSB_TX_FREQUENCY           ( 100 / portTICK_RATE_MS )\r
+#define mainUSB_TX_FREQUENCY           ( 100 / portTICK_PERIOD_MS )\r
 \r
 /* The string that is transmitted down the USB port. */\r
 #define mainFIRST_TX_CHAR                      'a'\r
@@ -194,7 +194,7 @@ int main( void )
     sys_thread_new( vBasicWEBServer, ( void * ) NULL, mainWEBSERVER_PRIORITY );\r
 \r
        /* Create the demo USB CDC task. */\r
-       xTaskCreate( vUSBCDCTask, ( signed char * ) "USB", mainUSB_TASK_STACK, NULL, mainUSB_PRIORITY, NULL );\r
+       xTaskCreate( vUSBCDCTask, "USB", mainUSB_TASK_STACK, NULL, mainUSB_PRIORITY, NULL );\r
 \r
        /* Create the standard demo application tasks. */\r
        vStartPolledQueueTasks( mainQUEUE_POLL_PRIORITY );\r
@@ -203,13 +203,13 @@ int main( void )
        vStartIntegerMathTasks( tskIDLE_PRIORITY );\r
        vStartBlockingQueueTasks( mainBLOCK_Q_PRIORITY );\r
 \r
-       /* Start the check task - which is defined in this file. */     \r
-    xTaskCreate( vErrorChecks, ( signed char * ) "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );\r
+       /* Start the check task - which is defined in this file. */\r
+    xTaskCreate( vErrorChecks, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );\r
 \r
-       /* Finally, start the scheduler. \r
+       /* Finally, start the scheduler.\r
 \r
        NOTE : Tasks run in system mode and the scheduler runs in Supervisor mode.\r
-       The processor MUST be in supervisor mode when vTaskStartScheduler is \r
+       The processor MUST be in supervisor mode when vTaskStartScheduler is\r
        called.  The demo applications included in the FreeRTOS.org download switch\r
        to supervisor mode prior to main being called.  If you are not using one of\r
        these demo application projects then ensure Supervisor mode is used here. */\r
@@ -227,7 +227,7 @@ static void prvSetupHardware( void )
        the correct default state.  This line just ensures that this does not\r
        cause all interrupts to be masked at the start. */\r
        AT91C_BASE_AIC->AIC_EOICR = 0;\r
-       \r
+\r
        /* Most setup is performed by the low level init function called from the\r
        startup asm file.\r
 \r
@@ -246,8 +246,8 @@ static void prvSetupHardware( void )
 \r
 static void vErrorChecks( void *pvParameters )\r
 {\r
-portTickType xDelayPeriod = mainNO_ERROR_FLASH_PERIOD;\r
-portTickType xLastWakeTime;\r
+TickType_t xDelayPeriod = mainNO_ERROR_FLASH_PERIOD;\r
+TickType_t xLastWakeTime;\r
 \r
        /* The parameters are not used. */\r
        ( void ) pvParameters;\r
@@ -265,7 +265,7 @@ portTickType xLastWakeTime;
                /* Delay until it is time to execute again.  The delay period is\r
                shorter following an error. */\r
                vTaskDelayUntil( &xLastWakeTime, xDelayPeriod );\r
-       \r
+\r
                /* Check all the standard demo application tasks are executing without\r
                error.  */\r
                if( prvCheckOtherTasksAreStillRunning() != pdPASS )\r
@@ -313,7 +313,7 @@ long lReturn = ( long ) pdPASS;
 \r
 void vApplicationIdleHook( void )\r
 {\r
-static portTickType xLastTx = 0;\r
+static TickType_t xLastTx = 0;\r
 char cTxByte;\r
 \r
        /* The idle hook simply sends a string of characters to the USB port.\r
@@ -324,7 +324,7 @@ char cTxByte;
                for( cTxByte = mainFIRST_TX_CHAR; cTxByte <= mainLAST_TX_CHAR; cTxByte++ )\r
                {\r
                        vUSBSendByte( cTxByte );\r
-               }               \r
+               }\r
        }\r
 }\r
 \r