]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS/Demo/MB96350_Softune_Dice_Kit/main.c
Update version number to 9.0.0rc2.
[freertos] / FreeRTOS / Demo / MB96350_Softune_Dice_Kit / main.c
index 7be5228f36a9ffa95c516cfbcc74f9fbc24eaf4f..19e7b086c7cdab70e9f2223332f453adb196ee97 100644 (file)
@@ -1,60 +1,64 @@
 /*\r
-    FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. \r
+    FreeRTOS V9.0.0rc2 - Copyright (C) 2016 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
-     *                                                                       *\r
-     *    FreeRTOS provides completely free yet professionally developed,    *\r
-     *    robust, strictly quality controlled, supported, and cross          *\r
-     *    platform software that has become a de facto standard.             *\r
-     *                                                                       *\r
-     *    Help yourself get started quickly and support the FreeRTOS         *\r
-     *    project by purchasing a FreeRTOS tutorial book, reference          *\r
-     *    manual, or both from: http://www.FreeRTOS.org/Documentation        *\r
-     *                                                                       *\r
-     *    Thank you!                                                         *\r
-     *                                                                       *\r
-    ***************************************************************************\r
-\r
     This file is part of the FreeRTOS distribution.\r
 \r
     FreeRTOS is free software; you can redistribute it and/or modify it under\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
+    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
+    ***************************************************************************\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
 \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
-    FOR A PARTICULAR PURPOSE.  Full license text is available from the following\r
+    FOR A PARTICULAR PURPOSE.  Full license text is available on the following\r
     link: http://www.freertos.org/a00114.html\r
 \r
-    1 tab == 4 spaces!\r
-\r
     ***************************************************************************\r
      *                                                                       *\r
-     *    Having a problem?  Start by reading the FAQ "My application does   *\r
-     *    not run, what could be wrong?"                                     *\r
+     *    FreeRTOS provides completely free yet professionally developed,    *\r
+     *    robust, strictly quality controlled, supported, and cross          *\r
+     *    platform software that is more than just the market leader, it     *\r
+     *    is the industry's de facto standard.                               *\r
      *                                                                       *\r
-     *    http://www.FreeRTOS.org/FAQHelp.html                               *\r
+     *    Help yourself get started quickly while simultaneously helping     *\r
+     *    to support the FreeRTOS project by purchasing a FreeRTOS           *\r
+     *    tutorial book, reference manual, or both:                          *\r
+     *    http://www.FreeRTOS.org/Documentation                              *\r
      *                                                                       *\r
     ***************************************************************************\r
 \r
-    http://www.FreeRTOS.org - Documentation, books, training, latest versions,\r
-    license and Real Time Engineers Ltd. contact details.\r
+    http://www.FreeRTOS.org/FAQHelp.html - Having a problem?  Start by reading\r
+    the FAQ page "My application does not run, what could be wrong?".  Have you\r
+    defined configASSERT()?\r
+\r
+    http://www.FreeRTOS.org/support - In return for receiving this top quality\r
+    embedded software for free we request you assist our global community by\r
+    participating in the support forum.\r
+\r
+    http://www.FreeRTOS.org/training - Investing in training allows your team to\r
+    be as productive as possible as early as possible.  Now you can receive\r
+    FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers\r
+    Ltd, and the world's leading authority on the world's leading RTOS.\r
 \r
     http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,\r
     including FreeRTOS+Trace - an indispensable productivity tool, a DOS\r
     compatible FAT file system, and our tiny thread aware UDP/IP stack.\r
 \r
-    http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High\r
-    Integrity Systems to sell under the OpenRTOS brand.  Low cost OpenRTOS\r
-    licenses offer ticketed support, indemnification and middleware.\r
+    http://www.FreeRTOS.org/labs - Where new FreeRTOS products go to incubate.\r
+    Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS.\r
+\r
+    http://www.OpenRTOS.com - Real Time Engineers ltd. license FreeRTOS to High\r
+    Integrity Systems ltd. to sell under the OpenRTOS brand.  Low cost OpenRTOS\r
+    licenses offer ticketed support, indemnification and commercial middleware.\r
 \r
     http://www.SafeRTOS.com - High Integrity Systems also provide a safety\r
     engineered and independently SIL3 certified version for use in safety and\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
 \r
 /* Kernel includes. */\r
 #include "FreeRTOS.h"\r
-#include "Task.h"\r
+#include "task.h"\r
 \r
 /* Demo includes. */\r
 #include "DiceTask.h"\r
@@ -160,10 +164,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 +185,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 +214,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 +225,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