]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS/Demo/CORTEX_M4F_M0_LPC43xx_Keil/M4/main.c
Update version number to V8.0.0 (without the release candidate number).
[freertos] / FreeRTOS / Demo / CORTEX_M4F_M0_LPC43xx_Keil / M4 / main.c
index 9871fb4b45b818fdb413ba62dc88882f9feca8af..494d9fb800c96749696fbe293b6268e549480433 100644 (file)
@@ -1,5 +1,6 @@
 /*\r
-    FreeRTOS V7.5.0 - Copyright (C) 2013 Real Time Engineers Ltd.\r
+    FreeRTOS V8.0.0 - 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
 \r
 \r
 /* The period after which the check timer will expire, in ms, provided no errors\r
 have been reported by any of the standard demo tasks.  ms are converted to the\r
-equivalent in ticks using the portTICK_RATE_MS constant. */\r
-#define mainCHECK_TIMER_PERIOD_MS                      ( 3000UL / portTICK_RATE_MS )\r
+equivalent in ticks using the portTICK_PERIOD_MS constant. */\r
+#define mainCHECK_TIMER_PERIOD_MS                      ( 3000UL / portTICK_PERIOD_MS )\r
 \r
 /* The period at which the check timer will expire, in ms, if an error has been\r
 reported in one of the standard demo tasks.  ms are converted to the equivalent\r
-in ticks using the portTICK_RATE_MS constant. */\r
-#define mainERROR_CHECK_TIMER_PERIOD_MS        ( 200UL / portTICK_RATE_MS )\r
+in ticks using the portTICK_PERIOD_MS constant. */\r
+#define mainERROR_CHECK_TIMER_PERIOD_MS        ( 200UL / portTICK_PERIOD_MS )\r
 \r
 /* Set mainCREATE_SIMPLE_LED_FLASHER_DEMO_ONLY to 1 to create a simple demo.\r
 Set mainCREATE_SIMPLE_LED_FLASHER_DEMO_ONLY to 0 to create a much more\r
@@ -174,7 +175,7 @@ static void prvSetupHardware( void );
 /*\r
  * The check timer callback function, as described at the top of this file.\r
  */\r
-static void prvCheckTimerCallback( xTimerHandle xTimer );\r
+static void prvCheckTimerCallback( TimerHandle_t xTimer );\r
 \r
 /*\r
  * Register check tasks, and the tasks used to write over and check the contents\r
@@ -226,13 +227,13 @@ int main( void )
 \r
        /* Start the scheduler. */\r
        vTaskStartScheduler();\r
-       \r
+\r
        /* Infinite loop */\r
-       for( ;; );      \r
+       for( ;; );\r
 }\r
 /*-----------------------------------------------------------*/\r
 \r
-static void prvCheckTimerCallback( xTimerHandle xTimer )\r
+static void prvCheckTimerCallback( TimerHandle_t xTimer )\r
 {\r
 static long lChangedTimerPeriodAlready = pdFALSE;\r
 static unsigned long ulLastRegTest1Value = 0, ulLastRegTest2Value = 0;\r
@@ -290,7 +291,7 @@ unsigned long ulErrorFound = pdFALSE;
        {\r
                ulErrorFound |= 0x01UL << 9UL;\r
        }\r
-       \r
+\r
        /* Check that the register test 1 task is still running. */\r
        if( ulLastRegTest1Value == ulRegTest1LoopCounter )\r
        {\r
@@ -308,8 +309,8 @@ unsigned long ulErrorFound = pdFALSE;
        /* Toggle the check LED to give an indication of the system status.  If\r
        the LED toggles every mainCHECK_TIMER_PERIOD_MS milliseconds then\r
        everything is ok.  A faster toggle indicates an error. */\r
-       vParTestToggleLED( mainCHECK_LED );     \r
-       \r
+       vParTestToggleLED( mainCHECK_LED );\r
+\r
        /* Have any errors been latch in ulErrorFound?  If so, shorten the\r
        period of the check timer to mainERROR_CHECK_TIMER_PERIOD_MS milliseconds.\r
        This will result in an increase in the rate at which mainCHECK_LED\r
@@ -319,7 +320,7 @@ unsigned long ulErrorFound = pdFALSE;
                if( lChangedTimerPeriodAlready == pdFALSE )\r
                {\r
                        lChangedTimerPeriodAlready = pdTRUE;\r
-                       \r
+\r
                        /* This call to xTimerChangePeriod() uses a zero block time.\r
                        Functions called from inside of a timer callback function must\r
                        *never* attempt to block. */\r
@@ -338,10 +339,10 @@ extern void Hitex_CGU_Init( void );
 \r
        /* Wind the clock speed up in steps to its maximum. */\r
        Hitex_CGU_Init();\r
-       \r
+\r
        /* Ensure all priority bits are assigned as preemption priority bits. */\r
        NVIC_SetPriorityGrouping( 0 );\r
-       \r
+\r
        /* Setup the LED outputs. */\r
        vParTestInitialise();\r
 }\r
@@ -351,7 +352,7 @@ static void prvOptionallyCreateComprehensveTestApplication( void )
 {\r
        #if ( mainCREATE_SIMPLE_LED_FLASHER_DEMO_ONLY == 0 )\r
        {\r
-       xTimerHandle xCheckTimer = NULL;\r
+       TimerHandle_t xCheckTimer = NULL;\r
 \r
                /* Start all the other standard demo/test tasks. */\r
                vStartIntegerMathTasks( tskIDLE_PRIORITY );\r
@@ -366,21 +367,21 @@ static void prvOptionallyCreateComprehensveTestApplication( void )
 \r
                /* Most importantly, start the tasks that use the FPU. */\r
                vStartMathTasks( mainFLOP_TASK_PRIORITY );\r
-               \r
+\r
                /* Create the register check tasks, as described at the top of this\r
                file */\r
-               xTaskCreate( vRegTest1Task, ( signed char * ) "Reg1", configMINIMAL_STACK_SIZE, ( void * ) NULL, tskIDLE_PRIORITY, NULL );\r
-               xTaskCreate( vRegTest2Task, ( signed char * ) "Reg2", configMINIMAL_STACK_SIZE, ( void * ) NULL, tskIDLE_PRIORITY, NULL );\r
+               xTaskCreate( vRegTest1Task, "Reg1", configMINIMAL_STACK_SIZE, ( void * ) NULL, tskIDLE_PRIORITY, NULL );\r
+               xTaskCreate( vRegTest2Task, "Reg2", configMINIMAL_STACK_SIZE, ( void * ) NULL, tskIDLE_PRIORITY, NULL );\r
 \r
                /* Create the software timer that performs the 'check' functionality,\r
                as described at the top of this file. */\r
-               xCheckTimer = xTimerCreate( ( const signed char * ) "CheckTimer",/* A text name, purely to help debugging. */\r
-                                                                       ( mainCHECK_TIMER_PERIOD_MS ),          /* The timer period, in this case 3000ms (3s). */\r
-                                                                       pdTRUE,                                                         /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */\r
-                                                                       ( void * ) 0,                                           /* The ID is not used, so can be set to anything. */\r
-                                                                       prvCheckTimerCallback                           /* The callback function that inspects the status of all the other tasks. */\r
-                                                                 );    \r
-               \r
+               xCheckTimer = xTimerCreate( "CheckTimer",                                       /* A text name, purely to help debugging. */\r
+                                                                       ( mainCHECK_TIMER_PERIOD_MS ),  /* The timer period, in this case 3000ms (3s). */\r
+                                                                       pdTRUE,                                                 /* This is an auto-reload timer, so xAutoReload is set to pdTRUE. */\r
+                                                                       ( void * ) 0,                                   /* The ID is not used, so can be set to anything. */\r
+                                                                       prvCheckTimerCallback                   /* The callback function that inspects the status of all the other tasks. */\r
+                                                                 );\r
+\r
                if( xCheckTimer != NULL )\r
                {\r
                        xTimerStart( xCheckTimer, mainDONT_BLOCK );\r
@@ -434,7 +435,7 @@ void vApplicationIdleHook( void )
 }\r
 /*-----------------------------------------------------------*/\r
 \r
-void vApplicationStackOverflowHook( xTaskHandle pxTask, signed char *pcTaskName )\r
+void vApplicationStackOverflowHook( TaskHandle_t pxTask, char *pcTaskName )\r
 {\r
        ( void ) pcTaskName;\r
        ( void ) pxTask;\r
@@ -449,7 +450,7 @@ void vApplicationStackOverflowHook( xTaskHandle pxTask, signed char *pcTaskName
 \r
 void vApplicationTickHook( void )\r
 {\r
-       /* This function will be called by each tick interrupt if \r
+       /* This function will be called by each tick interrupt if\r
        configUSE_TICK_HOOK is set to 1 in FreeRTOSConfig.h.  User code can be\r
        added here, but the tick hook is called from an interrupt context, so\r
        code must not attempt to block, and only the interrupt safe FreeRTOS API\r