]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS/Demo/MB96350_Softune_Dice_Kit/main.c
Update version number to 8.1.2 after moving the defaulting of configUSE_PORT_OPTIMISE...
[freertos] / FreeRTOS / Demo / MB96350_Softune_Dice_Kit / main.c
index 7be5228f36a9ffa95c516cfbcc74f9fbc24eaf4f..8e9b3efc1d69052be07702f269beb77ecb23d916 100644 (file)
@@ -1,5 +1,5 @@
 /*\r
-    FreeRTOS V7.6.0 - 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
 /*****\r
  *\r
  * See http://www.freertos.org/Documentation/FreeRTOS-documentation-and-book.html\r
- * for an introductory guide to using real time kernels, and FreeRTOS in \r
- * particular. \r
+ * for an introductory guide to using real time kernels, and FreeRTOS in\r
+ * particular.\r
  *\r
  *****\r
- *  \r
+ *\r
  * The DICE-KIT-16FX has two 7 segment displays and two buttons that can\r
  * generate interrupts.  This example uses this IO as follows:\r
  *\r
  *\r
- * - Left 7 segment display - \r
+ * - Left 7 segment display -\r
  *\r
- * 7 'flash' tasks are created, each of which toggles a single segment of the \r
- * left display.  Each task executes at a fixed frequency, with a different \r
+ * 7 'flash' tasks are created, each of which toggles a single segment of the\r
+ * left display.  Each task executes at a fixed frequency, with a different\r
  * frequency being used by each task.\r
  *\r
  * When button SW2 is pressed an interrupt is generated that wakes up a 'dice'\r
  * task.  The dice task suspends the 7 tasks that are accessing the left display\r
  * before simulating a dice being thrown by generating a random number between\r
  * 1 and 6.  After the number has been generated the task sleeps for 5 seconds,\r
- * if SW2 is pressed again within the 5 seconds another random number is \r
+ * if SW2 is pressed again within the 5 seconds another random number is\r
  * generated, if SW2 is not pressed within the 5 seconds then the 7 tasks are\r
  * un-suspended and will once again toggle the segments of the left hand display.\r
  *\r
  * Only one dice task is actually defined.  Two instances of this single\r
  * definition are created, the first to simulate a dice being thrown on the left\r
  * display, and the other to simulate a dice being thrown on the right display.\r
- * The task parameter is used to let the dice tasks know which display to \r
+ * The task parameter is used to let the dice tasks know which display to\r
  * control.\r
  *\r
  * Both dice tasks and the flash tasks operate completely independently under\r
  * the control of FreeRTOS.  11 tasks and 7 co-routines are created in total,\r
- * including the idle task. \r
+ * including the idle task.\r
  *\r
  * The co-routines all execute within a single low priority task.\r
  *\r
@@ -160,10 +160,10 @@ void main( void )
        vCreateFlashTasksAndCoRoutines();\r
 \r
        /* Create a 'dice' task to control the left hand display. */\r
-       xTaskCreate( vDiceTask, ( signed char * ) "Dice1", configMINIMAL_STACK_SIZE, ( void * ) configLEFT_DISPLAY, mainDICE_PRIORITY, NULL );\r
+       xTaskCreate( vDiceTask, "Dice1", configMINIMAL_STACK_SIZE, ( void * ) configLEFT_DISPLAY, mainDICE_PRIORITY, NULL );\r
 \r
        /* Create a 'dice' task to control the right hand display. */\r
-       xTaskCreate( vDiceTask, ( signed char * ) "Dice2", configMINIMAL_STACK_SIZE, ( void * ) configRIGHT_DISPLAY, mainDICE_PRIORITY, NULL );\r
+       xTaskCreate( vDiceTask, "Dice2", configMINIMAL_STACK_SIZE, ( void * ) configRIGHT_DISPLAY, mainDICE_PRIORITY, NULL );\r
 \r
        /* Start the scheduler running. */\r
        vTaskStartScheduler();\r
@@ -181,7 +181,7 @@ static void prvSetupHardware( void )
        scheduler has been started. */\r
        InitIrqLevels();\r
        portDISABLE_INTERRUPTS();\r
-       __set_il( 7 );  \r
+       __set_il( 7 );\r
 \r
        /* Set Port3 as output (7Segment Display). */\r
        DDR03  = 0xff;\r
@@ -210,7 +210,7 @@ static void prvSetupHardware( void )
 \r
        /* Enable external interrupt 8. */\r
        PIER00_IE0 = 1;\r
-       \r
+\r
        /* LB0, LA0 = 11 -> falling edge. */\r
        ELVRL1_LB8 = 1;\r
        ELVRL1_LA8 = 1;\r
@@ -221,13 +221,13 @@ static void prvSetupHardware( void )
 \r
        /* Enable external interrupt 9. */\r
        PIER00_IE1 = 1;\r
-       \r
+\r
        /* LB1, LA1 = 11 -> falling edge. */\r
        ELVRL1_LB9 = 1;\r
        ELVRL1_LA9 = 1;\r
 \r
        /* Reset and enable the interrupt request. */\r
        EIRR1_ER9 = 0;\r
-       ENIR1_EN9 = 1;  \r
+       ENIR1_EN9 = 1;\r
 }\r
 \r