Changes to the AVR demo's. IAR demo updated with new critical section method.

This commit is contained in:
Richard Barry 2006-08-28 09:35:31 +00:00
parent 41b142bae4
commit 97a570fa10
17 changed files with 866 additions and 318 deletions

View file

@ -19,13 +19,13 @@
A special exception to the GPL can be applied should you wish to distribute
a combined work that includes FreeRTOS.org, without being obliged to provide
the source code for any proprietary components. See the licensing section
the source code for any proprietary components. See the licensing section
of http://www.FreeRTOS.org for full details of how and when the exception
can be applied.
***************************************************************************
See http://www.FreeRTOS.org for documentation, latest information, license
and contact details. Please ensure to read the configuration and relevant
See http://www.FreeRTOS.org for documentation, latest information, license
and contact details. Please ensure to read the configuration and relevant
port sections of the online documentation.
***************************************************************************
*/
@ -44,11 +44,11 @@
* application requirements.
*
* THESE PARAMETERS ARE DESCRIBED WITHIN THE 'CONFIGURATION' SECTION OF THE
* FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE.
* FreeRTOS API DOCUMENTATION AVAILABLE ON THE FreeRTOS.org WEB SITE.
*----------------------------------------------------------*/
#define configUSE_PREEMPTION 1
#define configUSE_IDLE_HOOK 0
#define configUSE_IDLE_HOOK 1
#define configUSE_TICK_HOOK 0
#define configCPU_CLOCK_HZ ( ( unsigned portLONG ) 8000000 )
#define configTICK_RATE_HZ ( ( portTickType ) 1000 )
@ -61,7 +61,7 @@
#define configIDLE_SHOULD_YIELD 1
/* Co-routine definitions. */
#define configUSE_CO_ROUTINES 0
#define configUSE_CO_ROUTINES 1
#define configMAX_CO_ROUTINE_PRIORITIES ( 2 )
/* Set the following definitions to 1 to include the API function, or zero

View file

@ -90,15 +90,17 @@ Changes from V2.6.1
/* Scheduler include files. */
#include "FreeRTOS.h"
#include "task.h"
#include "croutine.h"
/* Demo file headers. */
#include "PollQ.h"
#include "integer.h"
#include "serial.h"
#include "comtest.h"
#include "flash.h"
#include "crflash.h"
#include "print.h"
#include "partest.h"
#include "regtest.h"
/* Priority definitions for most of the tasks in the demo application. Some
tasks just use the idle priority. */
@ -127,6 +129,9 @@ again. */
the demo application is not unexpectedly resetting. */
#define mainRESET_COUNT_ADDRESS ( ( void * ) 0x50 )
/* The number of coroutines to create. */
#define mainNUM_FLASH_COROUTINES ( 3 )
/*
* The task function for the "Check" task.
*/
@ -144,6 +149,11 @@ static void prvCheckOtherTasksAreStillRunning( void );
*/
static void prvIncrementResetCount( void );
/*
* Idle hook is used to scheduler co-routines.
*/
void vApplicationIdleHook( void );
portSHORT main( void )
{
prvIncrementResetCount();
@ -151,13 +161,18 @@ portSHORT main( void )
/* Setup the LED's for output. */
vParTestInitialise();
/* Create the standard demo tasks. */
vStartIntegerMathTasks( tskIDLE_PRIORITY );
vAltStartComTestTasks( mainCOM_TEST_PRIORITY, mainCOM_TEST_BAUD_RATE, mainCOM_TEST_LED );
vStartLEDFlashTasks( mainLED_TASK_PRIORITY );
vStartPolledQueueTasks( mainQUEUE_POLL_PRIORITY );
vStartRegTestTasks();
/* Create the tasks defined within this file. */
xTaskCreate( vErrorChecks, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );
/* Create the co-routines that flash the LED's. */
vStartFlashCoRoutines( mainNUM_FLASH_COROUTINES );
/* In this port, to use preemptive scheduler define configUSE_PREEMPTION
as 1 in portmacro.h. To use the cooperative scheduler define
configUSE_PREEMPTION as 0. */
@ -209,6 +224,11 @@ static portBASE_TYPE xErrorHasOccurred = pdFALSE;
xErrorHasOccurred = pdTRUE;
}
if( xAreRegTestTasksStillRunning() != pdTRUE )
{
xErrorHasOccurred = pdTRUE;
}
if( xErrorHasOccurred == pdFALSE )
{
/* Toggle the LED if everything is okay so we know if an error occurs even if not
@ -246,4 +266,10 @@ const unsigned portCHAR ucWrite2 = ( unsigned portCHAR ) 0x02;
EECR = ucWrite1;
EECR = ( ucWrite1 | ucWrite2 );
}
/*-----------------------------------------------------------*/
void vApplicationIdleHook( void )
{
vCoRoutineSchedule();
}

View file

@ -1,96 +1,130 @@
<?xml version="1.0" encoding="iso-8859-1"?>
<project>
<fileVersion>1</fileVersion>
<fileVersion>2</fileVersion>
<configuration>
<name>Debug</name>
<outputs>
<file>$PROJ_DIR$\..\Common\Minimal\flash.c</file>
<file>$PROJ_DIR$\Output\Obj\flash.pbi</file>
<file>$TOOLKIT_DIR$\inc\clib\sysmac.h</file>
<file>$TOOLKIT_DIR$\inc\clib\stdarg.h</file>
<file>$PROJ_DIR$\Output\Obj\regtest.pbi</file>
<file>$PROJ_DIR$\..\..\Source\include\FreeRTOS.h</file>
<file>$PROJ_DIR$\..\Common\include\PollQ.h</file>
<file>$TOOLKIT_DIR$\inc\clib\stddef.h</file>
<file>$TOOLKIT_DIR$\inc\iomacro.h</file>
<file>$PROJ_DIR$\Output\List\PollQ.lst</file>
<file>$PROJ_DIR$\..\Common\include\partest.h</file>
<file>$PROJ_DIR$\Output\Obj\queue.pbi</file>
<file>$PROJ_DIR$\..\Common\include\flash.h</file>
<file>$TOOLKIT_DIR$\inc\clib\string.h</file>
<file>$TOOLKIT_DIR$\inc\clib\stdlib.h</file>
<file>$PROJ_DIR$\..\..\Source\include\queue.h</file>
<file>$PROJ_DIR$\..\..\Source\include\croutine.h</file>
<file>$PROJ_DIR$\..\Common\include\print.h</file>
<file>$PROJ_DIR$\Output\Obj\ParTest.r90</file>
<file>$PROJ_DIR$\..\Common\include\serial.h</file>
<file>$PROJ_DIR$\Output\Obj\main.r90</file>
<file>$PROJ_DIR$\Output\Obj\PollQ.r90</file>
<file>$PROJ_DIR$\FreeRTOSConfig.h</file>
<file>$PROJ_DIR$\Output\Obj\heap_1.r90</file>
<file>$PROJ_DIR$\Output\Obj\integer.r90</file>
<file>$TOOLKIT_DIR$\inc\clib\stdio.h</file>
<file>$PROJ_DIR$\Output\List\tasks.s90</file>
<file>$PROJ_DIR$\Output\List\queue.lst</file>
<file>$PROJ_DIR$\..\Common\include\integer.h</file>
<file>$TOOLKIT_DIR$\src\template\cfgm323.xcl</file>
<file>$PROJ_DIR$\Output\List\ParTest.lst</file>
<file>$PROJ_DIR$\Output\List\comtest.lst</file>
<file>$PROJ_DIR$\Output\List\tasks.lst</file>
<file>$TOOLKIT_DIR$\inc\iom323.h</file>
<file>$PROJ_DIR$\Output\Obj\comtest.r90</file>
<file>$PROJ_DIR$\Output\Obj\list.pbi</file>
<file>$PROJ_DIR$\Output\Obj\serial.r90</file>
<file>$PROJ_DIR$\..\..\Source\portable\IAR\ATMega323\portmacro.h</file>
<file>$PROJ_DIR$\regtest.c</file>
<file>$PROJ_DIR$\Output\Obj\crflash.r90</file>
<file>$PROJ_DIR$\Output\Obj\rtosdemo.pbd</file>
<file>$PROJ_DIR$\Output\Obj\heap_1.pbi</file>
<file>$PROJ_DIR$\Output\Exe\rtosdemo.d90</file>
<file>$TOOLKIT_DIR$\lib\clib\cl3s-ec-sf.r90</file>
<file>$PROJ_DIR$\Output\List\integer.s90</file>
<file>$PROJ_DIR$\Output\List\serial.lst</file>
<file>$PROJ_DIR$\Output\Obj\integer.pbi</file>
<file>$PROJ_DIR$\Output\Exe\rtosdemo.a90</file>
<file>$PROJ_DIR$\Output\Obj\main.pbi</file>
<file>$PROJ_DIR$\..\..\Source\include\projdefs.h</file>
<file>$PROJ_DIR$\Output\List\regtest.lst</file>
<file>$PROJ_DIR$\Output\Obj\flash.r90</file>
<file>$PROJ_DIR$\Output\Obj\list.r90</file>
<file>$PROJ_DIR$\..\..\Source\include\list.h</file>
<file>$PROJ_DIR$\Output\Obj\tasks.r90</file>
<file>$PROJ_DIR$\Output\Obj\ParTest.pbi</file>
<file>$PROJ_DIR$\..\Common\include\comtest.h</file>
<file>$PROJ_DIR$\Output\List\main.s90</file>
<file>$PROJ_DIR$\Output\List\serial.s90</file>
<file>$PROJ_DIR$\Output\List\port.s90</file>
<file>$PROJ_DIR$\Output\List\heap_1.lst</file>
<file>$PROJ_DIR$\Output\Exe\rtosdemo.cof</file>
<file>$PROJ_DIR$\Output\List\queue.s90</file>
<file>$PROJ_DIR$\Output\List\PollQ.s90</file>
<file>$PROJ_DIR$\Output\Obj\port.pbi</file>
<file>$PROJ_DIR$\Output\List\ParTest.s90</file>
<file>$PROJ_DIR$\Output\List\integer.lst</file>
<file>$PROJ_DIR$\Output\Obj\port.r90</file>
<file>$PROJ_DIR$\Output\Obj\comtest.pbi</file>
<file>$PROJ_DIR$\..\..\Source\include\task.h</file>
<file>$TOOLKIT_DIR$\src\template\cfg3soim.xcl</file>
<file>$PROJ_DIR$\Output\List\comtest.s90</file>
<file>$PROJ_DIR$\Output\List\main.lst</file>
<file>$PROJ_DIR$\Output\List\flash.lst</file>
<file>$PROJ_DIR$\Output\List\flash.s90</file>
<file>$PROJ_DIR$\Output\List\port.lst</file>
<file>$PROJ_DIR$\Output\List\heap_1.s90</file>
<file>$PROJ_DIR$\Output\List\list.lst</file>
<file>$PROJ_DIR$\Output\List\rtosdemo.map</file>
<file>$PROJ_DIR$\Output\Obj\tasks.pbi</file>
<file>$PROJ_DIR$\Output\Obj\serial.pbi</file>
<file>$PROJ_DIR$\Output\List\list.s90</file>
<file>$PROJ_DIR$\Output\Obj\PollQ.pbi</file>
<file>$PROJ_DIR$\Output\List\regtest.s90</file>
<file>$PROJ_DIR$\Output\List\crflash.s90</file>
<file>$PROJ_DIR$\..\..\Source\list.c</file>
<file>$PROJ_DIR$\..\..\Source\portable\IAR\ATMega323\portmacro.s90</file>
<file>$PROJ_DIR$\..\Common\Minimal\PollQ.c</file>
<file>$PROJ_DIR$\ParTest\ParTest.c</file>
<file>$PROJ_DIR$\..\..\Source\portable\IAR\ATMega323\port.c</file>
<file>$PROJ_DIR$\..\..\Source\queue.c</file>
<file>$PROJ_DIR$\Output\Obj\portmacro.r90</file>
<file>$PROJ_DIR$\..\..\Source\tasks.c</file>
<file>$PROJ_DIR$\serial\serial.c</file>
<file>$PROJ_DIR$\..\..\Source\include\portable.h</file>
<file>$PROJ_DIR$\..\..\Source\portable\MemMang\heap_1.c</file>
<file>$PROJ_DIR$\main.c</file>
<file>$PROJ_DIR$\Output\Exe\rtosdemo.elf</file>
<file>$PROJ_DIR$\..\Common\Minimal\comtest.c</file>
<file>$PROJ_DIR$\Output\Exe\rtosdemo.dbg</file>
<file>$PROJ_DIR$\..\Common\include\crflash.h</file>
<file>$PROJ_DIR$\Output\Obj\queue.r90</file>
<file>$PROJ_DIR$\Output\List\croutine.lst</file>
<file>$PROJ_DIR$\..\Common\Minimal\integer.c</file>
<file>$PROJ_DIR$\Output\Obj\croutine.r90</file>
<file>$PROJ_DIR$\Output\List\croutine.s90</file>
<file>$PROJ_DIR$\regtest.h</file>
<file>$PROJ_DIR$\..\..\Source\croutine.c</file>
<file>$PROJ_DIR$\Output\List\crflash.lst</file>
<file>$PROJ_DIR$\Output\Obj\croutine.pbi</file>
<file>$PROJ_DIR$\..\Common\Minimal\crflash.c</file>
<file>$PROJ_DIR$\Output\Obj\regtest.r90</file>
<file>$PROJ_DIR$\Output\Obj\crflash.pbi</file>
</outputs>
<file>
<name>$PROJ_DIR$\ParTest\ParTest.c</name>
<name>[ROOT_NODE]</name>
<outputs>
<tool>
<name>ICCAVR</name>
<file>$PROJ_DIR$\Output\Obj\ParTest.r90</file>
</tool>
</outputs>
</file>
<file>
<name>$PROJ_DIR$\serial\serial.c</name>
<outputs>
<tool>
<name>ICCAVR</name>
<file>$PROJ_DIR$\Output\Obj\serial.r90</file>
</tool>
</outputs>
</file>
<file>
<name>$PROJ_DIR$\..\..\Source\portable\IAR\ATMega323\portmacro.s90</name>
<outputs>
<tool>
<name>AAVR</name>
<file>$PROJ_DIR$\Output\Obj\portmacro.r90</file>
</tool>
</outputs>
</file>
<file>
<name>$PROJ_DIR$\..\Common\Minimal\comtest.c</name>
<outputs>
<tool>
<name>ICCAVR</name>
<file>$PROJ_DIR$\Output\Obj\comtest.r90</file>
</tool>
</outputs>
</file>
<file>
<name>$PROJ_DIR$\..\..\Source\tasks.c</name>
<outputs>
<tool>
<name>ICCAVR</name>
<file>$PROJ_DIR$\Output\Obj\tasks.r90</file>
</tool>
</outputs>
</file>
<file>
<name>$PROJ_DIR$\..\Common\Minimal\integer.c</name>
<outputs>
<tool>
<name>ICCAVR</name>
<file>$PROJ_DIR$\Output\Obj\integer.r90</file>
</tool>
</outputs>
</file>
<file>
<name>$PROJ_DIR$\..\..\Source\portable\MemMang\heap_1.c</name>
<outputs>
<tool>
<name>ICCAVR</name>
<file>$PROJ_DIR$\Output\Obj\heap_1.r90</file>
</tool>
</outputs>
</file>
<file>
<name>$PROJ_DIR$\..\..\Source\portable\IAR\ATMega323\port.c</name>
<outputs>
<tool>
<name>ICCAVR</name>
<file>$PROJ_DIR$\Output\Obj\port.r90</file>
</tool>
</outputs>
</file>
<file>
<name>$PROJ_DIR$\..\Common\Minimal\PollQ.c</name>
<outputs>
<tool>
<name>ICCAVR</name>
<file>$PROJ_DIR$\Output\Obj\PollQ.r90</file>
</tool>
</outputs>
</file>
<file>
<name>$PROJ_DIR$\..\..\Source\queue.c</name>
<outputs>
<tool>
<name>ICCAVR</name>
<file>$PROJ_DIR$\Output\Obj\queue.r90</file>
<name>XLINK</name>
<file> 47 78</file>
</tool>
</outputs>
</file>
@ -99,42 +133,421 @@
<outputs>
<tool>
<name>ICCAVR</name>
<file>$PROJ_DIR$\Output\Obj\flash.r90</file>
<file> 51 74 73</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 1</file>
</tool>
</outputs>
<inputs>
<tool>
<name>ICCAVR</name>
<file> 14 2 5 7 49 22 33 8 94 37 69 53 10 12</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 14 2 5 7 49 22 33 8 94 37 69 53 10 12</file>
</tool>
</inputs>
</file>
<file>
<name>$PROJ_DIR$\main.c</name>
<name>$PROJ_DIR$\regtest.c</name>
<outputs>
<tool>
<name>ICCAVR</name>
<file>$PROJ_DIR$\Output\Obj\main.r90</file>
<file> 111 83 50</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 4</file>
</tool>
</outputs>
<inputs>
<tool>
<name>ICCAVR</name>
<file> 5 7 2 49 22 33 8 94 37 69 53 106</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 5 7 2 49 22 33 8 94 37 69 53 106</file>
</tool>
</inputs>
</file>
<file>
<name>$PROJ_DIR$\Output\Obj\rtosdemo.pbd</name>
<inputs>
<tool>
<name>BILINK</name>
<file> 55 82 68 112 109 41 46 35 48 64 11 4 80 79</file>
</tool>
</inputs>
</file>
<file>
<name>$PROJ_DIR$\Output\Exe\rtosdemo.d90</name>
<inputs>
<tool>
<name>XLINK</name>
<file> 29 70 18 21 34 51 23 24 52 20 67 91 101 36 54 43</file>
</tool>
</inputs>
</file>
<file>
<name>$PROJ_DIR$\Output\Exe\rtosdemo.a90</name>
<outputs>
<tool>
<name>XLINK</name>
<file> 78</file>
</tool>
</outputs>
<inputs>
<tool>
<name>XLINK</name>
<file> 29 70 18 21 34 39 104 23 24 52 20 67 91 101 111 36 54 43</file>
</tool>
</inputs>
</file>
<file>
<name>$PROJ_DIR$\Output\Exe\rtosdemo.cof</name>
<inputs>
<tool>
<name>XLINK</name>
<file> 29 70 18 21 34 51 23 24 52 20 67 91 101 36 54 43</file>
</tool>
</inputs>
</file>
<file>
<name>$PROJ_DIR$\..\..\Source\list.c</name>
<outputs>
<tool>
<name>ICCAVR</name>
<file>$PROJ_DIR$\Output\Obj\list.r90</file>
<file> 52 81 77</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 35</file>
</tool>
</outputs>
<inputs>
<tool>
<name>ICCAVR</name>
<file> 14 2 5 7 49 22 33 8 94 37 53</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 14 2 5 7 49 22 33 8 94 37 53</file>
</tool>
</inputs>
</file>
<file>
<name>[ROOT_NODE]</name>
<name>$PROJ_DIR$\..\..\Source\portable\IAR\ATMega323\portmacro.s90</name>
<outputs>
<tool>
<name>XLINK</name>
<file>$PROJ_DIR$\Output\Exe\rtosdemo.a90</file>
<file>$PROJ_DIR$\Output\Exe\rtosdemo.d90</file>
<name>AAVR</name>
<file> 91</file>
</tool>
</outputs>
<inputs>
<tool>
<name>AAVR</name>
<file> 33 8</file>
</tool>
</inputs>
</file>
<file>
<name>$PROJ_DIR$\..\Common\Minimal\PollQ.c</name>
<outputs>
<tool>
<name>ICCAVR</name>
<file> 21 63 9</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 82</file>
</tool>
</outputs>
<inputs>
<tool>
<name>ICCAVR</name>
<file> 14 2 5 7 49 22 33 8 94 37 69 53 15 6</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 14 2 5 7 49 22 33 8 94 37 69 53 15 6</file>
</tool>
</inputs>
</file>
<file>
<name>$PROJ_DIR$\ParTest\ParTest.c</name>
<outputs>
<tool>
<name>ICCAVR</name>
<file> 18 65 30</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 55</file>
</tool>
</outputs>
<inputs>
<tool>
<name>ICCAVR</name>
<file> 5 7 2 49 22 33 8 94 37 69 53 10</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 5 7 2 49 22 33 8 94 37 69 53 10</file>
</tool>
</inputs>
</file>
<file>
<name>$PROJ_DIR$\..\..\Source\portable\IAR\ATMega323\port.c</name>
<outputs>
<tool>
<name>ICCAVR</name>
<file> 67 59 75</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 64</file>
</tool>
</outputs>
<inputs>
<tool>
<name>ICCAVR</name>
<file> 14 2 5 7 49 22 33 8 94 37 69 53</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 14 2 5 7 49 22 33 8 94 37 69 53</file>
</tool>
</inputs>
</file>
<file>
<name>$PROJ_DIR$\..\..\Source\queue.c</name>
<outputs>
<tool>
<name>ICCAVR</name>
<file> 101 62 27</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 11</file>
</tool>
</outputs>
<inputs>
<tool>
<name>ICCAVR</name>
<file> 14 2 13 5 7 49 22 33 8 94 37 69 53 16</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 14 2 13 5 7 49 22 33 8 94 37 69 53 16</file>
</tool>
</inputs>
</file>
<file>
<name>$PROJ_DIR$\..\..\Source\tasks.c</name>
<outputs>
<tool>
<name>ICCAVR</name>
<file> 54 26 32</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 79</file>
</tool>
</outputs>
<inputs>
<tool>
<name>ICCAVR</name>
<file> 25 3 2 14 13 5 7 49 22 33 8 94 37 69 53</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 25 3 2 14 13 5 7 49 22 33 8 94 37 69 53</file>
</tool>
</inputs>
</file>
<file>
<name>$PROJ_DIR$\serial\serial.c</name>
<outputs>
<tool>
<name>ICCAVR</name>
<file> 36 58 45</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 80</file>
</tool>
</outputs>
<inputs>
<tool>
<name>ICCAVR</name>
<file> 14 2 5 7 49 22 33 8 94 37 15 69 53 19</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 14 2 5 7 49 22 33 8 94 37 15 69 53 19</file>
</tool>
</inputs>
</file>
<file>
<name>$PROJ_DIR$\..\..\Source\portable\MemMang\heap_1.c</name>
<outputs>
<tool>
<name>ICCAVR</name>
<file> 23 76 60</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 41</file>
</tool>
</outputs>
<inputs>
<tool>
<name>ICCAVR</name>
<file> 14 2 5 7 49 22 33 8 94 37 69 53</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 14 2 5 7 49 22 33 8 94 37 69 53</file>
</tool>
</inputs>
</file>
<file>
<name>$PROJ_DIR$\main.c</name>
<outputs>
<tool>
<name>ICCAVR</name>
<file> 20 57 72</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 48</file>
</tool>
</outputs>
<inputs>
<tool>
<name>ICCAVR</name>
<file> 14 2 13 5 7 49 22 33 8 94 37 69 53 16 6 28 19 56 100 17 10 106</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 14 2 13 5 7 49 22 33 8 94 37 69 53 16 6 28 19 56 100 17 10 106</file>
</tool>
</inputs>
</file>
<file>
<name>$PROJ_DIR$\Output\Exe\rtosdemo.elf</name>
<inputs>
<tool>
<name>XLINK</name>
<file> 29 70 18 21 34 51 23 24 52 20 67 91 101 36 54 43</file>
</tool>
</inputs>
</file>
<file>
<name>$PROJ_DIR$\..\Common\Minimal\comtest.c</name>
<outputs>
<tool>
<name>ICCAVR</name>
<file> 34 71 31</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 68</file>
</tool>
</outputs>
<inputs>
<tool>
<name>ICCAVR</name>
<file> 14 2 5 7 49 22 33 8 94 37 69 53 19 56 10</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 14 2 5 7 49 22 33 8 94 37 69 53 19 56 10</file>
</tool>
</inputs>
</file>
<file>
<name>$PROJ_DIR$\Output\Exe\rtosdemo.dbg</name>
<inputs>
<tool>
<name>XLINK</name>
<file> 29 70 18 21 34 39 104 23 24 52 20 67 91 101 36 54 43</file>
</tool>
</inputs>
</file>
<file>
<name>$PROJ_DIR$\..\Common\Minimal\integer.c</name>
<outputs>
<tool>
<name>ICCAVR</name>
<file> 24 44 66</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 46</file>
</tool>
</outputs>
<inputs>
<tool>
<name>ICCAVR</name>
<file> 14 2 5 7 49 22 33 8 94 37 69 53 28</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 14 2 5 7 49 22 33 8 94 37 69 53 28</file>
</tool>
</inputs>
</file>
<file>
<name>$PROJ_DIR$\..\..\Source\croutine.c</name>
<outputs>
<tool>
<name>ICCAVR</name>
<file> 104 105 102</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 109</file>
</tool>
</outputs>
<inputs>
<tool>
<name>ICCAVR</name>
<file> 5 7 2 49 22 33 8 94 37 69 53 16</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 5 7 2 49 22 33 8 94 37 69 53 16</file>
</tool>
</inputs>
</file>
<file>
<name>$PROJ_DIR$\..\Common\Minimal\crflash.c</name>
<outputs>
<tool>
<name>ICCAVR</name>
<file> 39 84 108</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 112</file>
</tool>
</outputs>
<inputs>
<tool>
<name>ICCAVR</name>
<file> 5 7 2 49 22 33 8 94 37 16 53 15 10 100</file>
</tool>
<tool>
<name>BICOMP</name>
<file> 5 7 2 49 22 33 8 94 37 16 53 15 10 100</file>
</tool>
</inputs>
</file>
<forcedrebuild>
<name>[MULTI_TOOL]</name>
<tool>XLINK</tool>
</forcedrebuild>
</configuration>
</project>

View file

@ -10,9 +10,9 @@
<debug>1</debug>
<settings>
<name>C-SPY</name>
<archiveVersion>2</archiveVersion>
<archiveVersion>3</archiveVersion>
<data>
<version>11</version>
<version>12</version>
<wantNonLocal>1</wantNonLocal>
<debug>1</debug>
<option>
@ -75,6 +75,10 @@
<name>CDynDriver</name>
<state>SIMAVR</state>
</option>
<option>
<name>DebuggerUseUbrofResetVector</name>
<state>0</state>
</option>
</data>
</settings>
<settings>
@ -255,9 +259,9 @@
</settings>
<settings>
<name>JTAGICEAVR</name>
<archiveVersion>2</archiveVersion>
<archiveVersion>3</archiveVersion>
<data>
<version>1</version>
<version>2</version>
<wantNonLocal>1</wantNonLocal>
<debug>1</debug>
<option>
@ -384,13 +388,25 @@
<name>OJTAGICEAVRJtagIcedownloadToData</name>
<state>0</state>
</option>
<option>
<name>ExitBreakpointP7</name>
<state>0</state>
</option>
<option>
<name>PutcharBreakpointP7</name>
<state>1</state>
</option>
<option>
<name>GetcharBreakpointP7</name>
<state>1</state>
</option>
</data>
</settings>
<settings>
<name>JTAGICEMKIIAVR</name>
<archiveVersion>1</archiveVersion>
<archiveVersion>2</archiveVersion>
<data>
<version>3</version>
<version>4</version>
<wantNonLocal>1</wantNonLocal>
<debug>1</debug>
<option>
@ -525,6 +541,18 @@
<name>OJTAGICEMKIIAVRJtagSoftwareBreak</name>
<state>0</state>
</option>
<option>
<name>ExitBreakpointP7</name>
<state>0</state>
</option>
<option>
<name>PutcharBreakpointP7</name>
<state>1</state>
</option>
<option>
<name>GetcharBreakpointP7</name>
<state>1</state>
</option>
</data>
</settings>
<settings>
@ -594,18 +622,18 @@
<file>$EW_DIR$\common\plugins\CodeCoverage\CodeCoverage.ewplugin</file>
<loadFlag>1</loadFlag>
</plugin>
<plugin>
<file>$EW_DIR$\common\plugins\Orti\Orti.ewplugin</file>
<loadFlag>0</loadFlag>
</plugin>
<plugin>
<file>$EW_DIR$\common\plugins\Profiling\Profiling.ewplugin</file>
<loadFlag>1</loadFlag>
</plugin>
<plugin>
<file>$EW_DIR$\common\plugins\Trace\Trace.ewplugin</file>
<file>$EW_DIR$\common\plugins\Stack\stack.ewplugin</file>
<loadFlag>1</loadFlag>
</plugin>
<plugin>
<file>$EW_DIR$\common\plugins\Orti\Orti.ewplugin</file>
<loadFlag>0</loadFlag>
</plugin>
</debuggerPlugins>
</configuration>
</project>

View file

@ -127,8 +127,8 @@
</option>
<option>
<name>New Variant Processor</name>
<version>13</version>
<state>41</state>
<version>15</version>
<state>47</state>
</option>
<option>
<name>GRuntimeLibSelect</name>
@ -682,7 +682,7 @@
<name>XLINK</name>
<archiveVersion>2</archiveVersion>
<data>
<version>12</version>
<version>13</version>
<wantNonLocal>1</wantNonLocal>
<debug>1</debug>
<option>
@ -691,16 +691,16 @@
</option>
<option>
<name>OutputFile</name>
<state>rtosdemo.d90</state>
<state>rtosdemo.a90</state>
</option>
<option>
<name>OutputFormat</name>
<version>10</version>
<version>11</version>
<state>23</state>
</option>
<option>
<name>FormatVariant</name>
<version>6</version>
<version>7</version>
<state>2</state>
</option>
<option>
@ -849,7 +849,7 @@
</option>
<option>
<name>DebugInformation</name>
<state>0</state>
<state>1</state>
</option>
<option>
<name>RuntimeControl</name>
@ -873,16 +873,16 @@
</option>
<option>
<name>ExtraOutputFile</name>
<state>rtosdemo.a90</state>
<state>rtosdemo.elf</state>
</option>
<option>
<name>ExtraOutputFormat</name>
<version>10</version>
<state>25</state>
<version>11</version>
<state>16</state>
</option>
<option>
<name>ExtraFormatVariant</name>
<version>6</version>
<version>7</version>
<state>2</state>
</option>
<option>
@ -933,6 +933,14 @@
<name>RawBinaryAlign</name>
<state></state>
</option>
<option>
<name>CrcAlign</name>
<state>1</state>
</option>
<option>
<name>CrcInitialValue</name>
<state>0x00</state>
</option>
</data>
</settings>
<settings>
@ -962,45 +970,57 @@
<data/>
</settings>
</configuration>
<file>
<name>$PROJ_DIR$\..\Common\Minimal\comtest.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\Common\Minimal\flash.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\Source\portable\MemMang\heap_1.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\Common\Minimal\integer.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\Source\list.c</name>
</file>
<file>
<name>$PROJ_DIR$\main.c</name>
</file>
<file>
<name>$PROJ_DIR$\ParTest\ParTest.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\Common\Minimal\PollQ.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\Source\portable\IAR\ATMega323\port.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\Source\portable\IAR\ATMega323\portmacro.s90</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\Source\queue.c</name>
</file>
<file>
<name>$PROJ_DIR$\serial\serial.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\Source\tasks.c</name>
</file>
<group>
<name>Demo Source</name>
<file>
<name>$PROJ_DIR$\..\Common\Minimal\comtest.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\Common\Minimal\crflash.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\Source\portable\MemMang\heap_1.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\Common\Minimal\integer.c</name>
</file>
<file>
<name>$PROJ_DIR$\main.c</name>
</file>
<file>
<name>$PROJ_DIR$\ParTest\ParTest.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\Common\Minimal\PollQ.c</name>
</file>
<file>
<name>$PROJ_DIR$\regtest.c</name>
</file>
<file>
<name>$PROJ_DIR$\serial\serial.c</name>
</file>
</group>
<group>
<name>Kernel Source</name>
<file>
<name>$PROJ_DIR$\..\..\Source\croutine.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\Source\list.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\Source\portable\IAR\ATMega323\port.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\Source\portable\IAR\ATMega323\portmacro.s90</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\Source\queue.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\..\Source\tasks.c</name>
</file>
</group>
</project>

View file

@ -27,12 +27,15 @@ Wnd8=_ "Locals" "closed" 44 0 1 -1 -1 -1 -1 1139 0 1595 276 100 100 100 100
Wnd9=_ "Terminal I/O" "closed" 44 0 1 -1 -1 -1 -1 1138 522 1595 826
Maximized=_ 0
Count=_ 10
[TermIOLog]
LoggingEnabled=_ 0
LogFile=_ ""
[Log file]
LoggingEnabled=_ 0
LogFile=_ ""
Category=_ 0
[TermIOLog]
LoggingEnabled=_ 0
LogFile=_ ""
[Breakpoints]
Count=0
[TraceHelper]
Enabled=0
ShowSource=1

View file

@ -12,12 +12,12 @@
<Column0>109</Column0><Column1>27</Column1><Column2>27</Column2><Column3>27</Column3></ColumnWidths>
<Column0>246</Column0><Column1>27</Column1><Column2>27</Column2><Column3>27</Column3></ColumnWidths>
</Workspace>
<Build><ColumnWidth0>20</ColumnWidth0><ColumnWidth1>1153</ColumnWidth1><ColumnWidth2>307</ColumnWidth2><ColumnWidth3>76</ColumnWidth3></Build></Static>
<Build><ColumnWidth0>20</ColumnWidth0><ColumnWidth1>1153</ColumnWidth1><ColumnWidth2>307</ColumnWidth2><ColumnWidth3>76</ColumnWidth3></Build><Debug-Log/></Static>
<Windows>
<Wnd0>
<Wnd2>
<Tabs>
<Tab>
<Identity>TabID-12388-19520</Identity>
@ -25,24 +25,24 @@
<Factory>Workspace</Factory>
<Session>
<NodeDict><ExpandedNode>rtosdemo</ExpandedNode><ExpandedNode>rtosdemo/portheap.c</ExpandedNode></NodeDict></Session>
<NodeDict><ExpandedNode>rtosdemo</ExpandedNode><ExpandedNode>rtosdemo/Demo Source</ExpandedNode><ExpandedNode>rtosdemo/Kernel Source</ExpandedNode><ExpandedNode>rtosdemo/portheap.c</ExpandedNode></NodeDict></Session>
</Tab>
</Tabs>
<SelectedTab>0</SelectedTab></Wnd0><Wnd1><Tabs><Tab><Identity>TabID-19172-8303</Identity><TabName>Build</TabName><Factory>Build</Factory><Session/></Tab></Tabs><SelectedTab>0</SelectedTab></Wnd1></Windows>
<SelectedTab>0</SelectedTab></Wnd2><Wnd3><Tabs><Tab><Identity>TabID-19172-8303</Identity><TabName>Build</TabName><Factory>Build</Factory><Session/></Tab><Tab><Identity>TabID-954-28216</Identity><TabName>Debug Log</TabName><Factory>Debug-Log</Factory><Session/></Tab></Tabs><SelectedTab>0</SelectedTab></Wnd3></Windows>
<Editor>
<Pane/><ActivePane>0</ActivePane><Sizes><Pane><X>1000000</X><Y>1000000</Y></Pane></Sizes><SplitMode>1</SplitMode></Editor>
<Pane><Tab><Factory>TextEditor</Factory><Filename>C:\E\Dev\FreeRTOS\Demo\AVR_ATMega323_IAR\regtest.c</Filename><XPos>0</XPos><YPos>190</YPos><SelStart>6619</SelStart><SelEnd>6619</SelEnd></Tab><ActiveTab>0</ActiveTab><Tab><Factory>TextEditor</Factory><Filename>C:\E\Dev\FreeRTOS\Demo\AVR_ATMega323_IAR\main.c</Filename><XPos>0</XPos><YPos>123</YPos><SelStart>5500</SelStart><SelEnd>5500</SelEnd></Tab><Tab><Factory>TextEditor</Factory><Filename>C:\E\Dev\FreeRTOS\Demo\Common\Minimal\crflash.c</Filename><XPos>0</XPos><YPos>170</YPos><SelStart>6807</SelStart><SelEnd>6807</SelEnd></Tab></Pane><ActivePane>0</ActivePane><Sizes><Pane><X>1000000</X><Y>1000000</Y></Pane></Sizes><SplitMode>1</SplitMode></Editor>
<Positions>
<Top><Row0><Sizes><Toolbar-0084f828><key>iaridepm1</key></Toolbar-0084f828></Sizes></Row0></Top><Left><Row0><Sizes><Wnd0><Rect><Top>-2</Top><Left>-2</Left><Bottom>718</Bottom><Right>183</Right><x>-2</x><y>-2</y><xscreen>185</xscreen><yscreen>185</yscreen><sizeHorzCX>115625</sizeHorzCX><sizeHorzCY>165326</sizeHorzCY><sizeVertCX>115625</sizeVertCX><sizeVertCY>643431</sizeVertCY></Rect></Wnd0></Sizes></Row0></Left><Right><Row0><Sizes/></Row0></Right><Bottom><Row0><Sizes><Wnd1><Rect><Top>-2</Top><Left>-2</Left><Bottom>354</Bottom><Right>1602</Right><x>-2</x><y>-2</y><xscreen>1604</xscreen><yscreen>356</yscreen><sizeHorzCX>1002500</sizeHorzCX><sizeHorzCY>318141</sizeHorzCY><sizeVertCX>116250</sizeVertCX><sizeVertCY>166219</sizeVertCY></Rect></Wnd1></Sizes></Row0></Bottom><Float><Sizes/></Float></Positions>
<Top><Row0><Sizes><Toolbar-00a0bb70><key>iaridepm1</key></Toolbar-00a0bb70></Sizes></Row0></Top><Left><Row0><Sizes><Wnd2><Rect><Top>-2</Top><Left>-2</Left><Bottom>619</Bottom><Right>320</Right><x>-2</x><y>-2</y><xscreen>162</xscreen><yscreen>161</yscreen><sizeHorzCX>115714</sizeHorzCX><sizeHorzCY>165638</sizeHorzCY><sizeVertCX>230000</sizeVertCX><sizeVertCY>638889</sizeVertCY></Rect></Wnd2></Sizes></Row0></Left><Right><Row0><Sizes/></Row0></Right><Bottom><Row0><Sizes><Wnd3><Rect><Top>-2</Top><Left>-2</Left><Bottom>307</Bottom><Right>1402</Right><x>-2</x><y>-2</y><xscreen>1404</xscreen><yscreen>309</yscreen><sizeHorzCX>1002857</sizeHorzCX><sizeHorzCY>317901</sizeHorzCY><sizeVertCX>116429</sizeVertCX><sizeVertCY>166667</sizeVertCY></Rect></Wnd3></Sizes></Row0></Bottom><Float><Sizes/></Float></Positions>
</Desktop>
</Workspace>

View file

@ -46,7 +46,7 @@
*----------------------------------------------------------*/
#define configUSE_PREEMPTION 1
#define configUSE_IDLE_HOOK 0
#define configUSE_IDLE_HOOK 1
#define configUSE_TICK_HOOK 0
#define configCPU_CLOCK_HZ ( ( unsigned portLONG ) 8000000 )
#define configTICK_RATE_HZ ( ( portTickType ) 1000 )
@ -59,7 +59,7 @@
#define configIDLE_SHOULD_YIELD 1
/* Co-routine definitions. */
#define configUSE_CO_ROUTINES 0
#define configUSE_CO_ROUTINES 1
#define configMAX_CO_ROUTINE_PRIORITIES ( 2 )
/* Set the following definitions to 1 to include the API function, or zero

View file

@ -86,15 +86,17 @@ Changes from V2.6.1
/* Scheduler include files. */
#include "FreeRTOS.h"
#include "task.h"
#include "croutine.h"
/* Demo file headers. */
#include "PollQ.h"
#include "integer.h"
#include "serial.h"
#include "comtest.h"
#include "flash.h"
#include "crflash.h"
#include "print.h"
#include "partest.h"
#include "regtest.h"
/* Priority definitions for most of the tasks in the demo application. Some
tasks just use the idle priority. */
@ -123,6 +125,9 @@ again. */
the demo application is not unexpectedly resetting. */
#define mainRESET_COUNT_ADDRESS ( ( void * ) 0x50 )
/* The number of coroutines to create. */
#define mainNUM_FLASH_COROUTINES ( 3 )
/*
* The task function for the "Check" task.
*/
@ -140,6 +145,13 @@ static void prvCheckOtherTasksAreStillRunning( void );
*/
static void prvIncrementResetCount( void );
/*
* The idle hook is used to scheduler co-routines.
*/
void vApplicationIdleHook( void );
/*-----------------------------------------------------------*/
portSHORT main( void )
{
prvIncrementResetCount();
@ -147,13 +159,18 @@ portSHORT main( void )
/* Setup the LED's for output. */
vParTestInitialise();
/* Create the standard demo tasks. */
vStartIntegerMathTasks( tskIDLE_PRIORITY );
vAltStartComTestTasks( mainCOM_TEST_PRIORITY, mainCOM_TEST_BAUD_RATE, mainCOM_TEST_LED );
vStartLEDFlashTasks( mainLED_TASK_PRIORITY );
vStartPolledQueueTasks( mainQUEUE_POLL_PRIORITY );
vStartRegTestTasks();
/* Create the tasks defined within this file. */
xTaskCreate( vErrorChecks, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );
/* Create the co-routines that flash the LED's. */
vStartFlashCoRoutines( mainNUM_FLASH_COROUTINES );
/* In this port, to use preemptive scheduler define configUSE_PREEMPTION
as 1 in portmacro.h. To use the cooperative scheduler define
configUSE_PREEMPTION as 0. */
@ -205,6 +222,11 @@ static portBASE_TYPE xErrorHasOccurred = pdFALSE;
xErrorHasOccurred = pdTRUE;
}
if( xAreRegTestTasksStillRunning() != pdTRUE )
{
xErrorHasOccurred = pdTRUE;
}
if( xErrorHasOccurred == pdFALSE )
{
/* Toggle the LED if everything is okay so we know if an error occurs even if not
@ -222,4 +244,10 @@ unsigned portCHAR ucCount;
ucCount++;
eeprom_write_byte( mainRESET_COUNT_ADDRESS, ucCount );
}
/*-----------------------------------------------------------*/
void vApplicationIdleHook( void )
{
vCoRoutineSchedule();
}

View file

@ -53,12 +53,14 @@ SRC = \
main.c \
ParTest/ParTest.c \
serial/serial.c \
regtest.c \
$(SOURCE_DIR)/tasks.c \
$(SOURCE_DIR)/queue.c \
$(SOURCE_DIR)/list.c \
$(SOURCE_DIR)/croutine.c \
$(SOURCE_DIR)/portable/MemMang/heap_1.c \
$(PORT_DIR)/port.c \
$(DEMO_DIR)/flash.c \
$(DEMO_DIR)/crflash.c \
$(DEMO_DIR)/integer.c \
$(DEMO_DIR)/PollQ.c \
$(DEMO_DIR)/comtest.c

View file

@ -39,7 +39,7 @@
* the same queue. The controlling task writes data to the queue, then checks
* to see which of the event tasks read the data from the queue. The
* controlling task has the lowest priority of all the tasks so is guaranteed
* to always get preempted immediately upon writhing to the queue.
* to always get preempted immediately upon writing to the queue.
*
* By selectively suspending and resuming the event tasks the controlling task
* can check that the highest priority task that is blocked on the queue is the
@ -172,6 +172,10 @@ const portCHAR * const pcTaskStartMsg = "Multi event task started.\r\n";
the counter specific to this task instance. */
( *pxCounter )++;
}
else
{
xHealthStatus = pdFAIL;
}
}
}
/*-----------------------------------------------------------*/

View file

@ -19,39 +19,39 @@
A special exception to the GPL can be applied should you wish to distribute
a combined work that includes FreeRTOS.org, without being obliged to provide
the source code for any proprietary components. See the licensing section
the source code for any proprietary components. See the licensing section
of http://www.FreeRTOS.org for full details of how and when the exception
can be applied.
***************************************************************************
See http://www.FreeRTOS.org for documentation, latest information, license
and contact details. Please ensure to read the configuration and relevant
See http://www.FreeRTOS.org for documentation, latest information, license
and contact details. Please ensure to read the configuration and relevant
port sections of the online documentation.
***************************************************************************
*/
/*
/*
* This demo application file demonstrates the use of queues to pass data
* between co-routines.
*
* N represents the number of 'fixed delay' co-routines that are created and
* is set during initialisation.
*
* N 'fixed delay' co-routines are created that just block for a fixed
* N 'fixed delay' co-routines are created that just block for a fixed
* period then post the number of an LED onto a queue. Each such co-routine
* uses a different block period. A single 'flash' co-routine is also created
* that blocks on the same queue, waiting for the number of the next LED it
* should flash. Upon receiving a number it simply toggle the instructed LED
* then blocks on the queue once more. In this manner each LED from LED 0 to
* uses a different block period. A single 'flash' co-routine is also created
* that blocks on the same queue, waiting for the number of the next LED it
* should flash. Upon receiving a number it simply toggle the instructed LED
* then blocks on the queue once more. In this manner each LED from LED 0 to
* LED N-1 is caused to flash at a different rate.
*
* The 'fixed delay' co-routines are created with co-routine priority 0. The
* flash co-routine is created with co-routine priority 1. This means that
* the queue should never contain more than a single item. This is because
* posting to the queue will unblock the 'flash' co-routine, and as this has
* a priority greater than the tasks posting to the queue it is guaranteed to
* a priority greater than the tasks posting to the queue it is guaranteed to
* have emptied the queue and blocked once again before the queue can contain
* any more date. An error is indicated if an attempt to post data to the
* any more date. An error is indicated if an attempt to post data to the
* queue fails - indicating that the queue is already full.
*
*/
@ -82,7 +82,7 @@ created. */
/* We don't want to block when posting to the queue. */
#define crfPOSTING_BLOCK_TIME 0
/*
/*
* The 'fixed delay' co-routine as described at the top of the file.
*/
static void prvFixedDelayCoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex );
@ -134,16 +134,16 @@ static void prvFixedDelayCoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_
{
/* Even though this is a co-routine the xResult variable does not need to be
static as we do not need it to maintain its state between blocks. */
portBASE_TYPE xResult;
/* The uxIndex parameter of the co-routine function is used as an index into
signed portBASE_TYPE xResult;
/* The uxIndex parameter of the co-routine function is used as an index into
the xFlashRates array to obtain the delay period to use. */
static const portTickType xFlashRates[ crfMAX_FLASH_TASKS ] = { 150 / portTICK_RATE_MS,
200 / portTICK_RATE_MS,
250 / portTICK_RATE_MS,
300 / portTICK_RATE_MS,
static const portTickType xFlashRates[ crfMAX_FLASH_TASKS ] = { 150 / portTICK_RATE_MS,
200 / portTICK_RATE_MS,
250 / portTICK_RATE_MS,
300 / portTICK_RATE_MS,
350 / portTICK_RATE_MS,
400 / portTICK_RATE_MS,
450 / portTICK_RATE_MS,
400 / portTICK_RATE_MS,
450 / portTICK_RATE_MS,
500 / portTICK_RATE_MS };
/* Co-routines MUST start with a call to crSTART. */
@ -151,7 +151,7 @@ static const portTickType xFlashRates[ crfMAX_FLASH_TASKS ] = { 150 / portTICK_R
for( ;; )
{
/* Post our uxIndex value onto the queue. This is used as the LED to
/* Post our uxIndex value onto the queue. This is used as the LED to
flash. */
crQUEUE_SEND( xHandle, xFlashQueue, ( void * ) &uxIndex, crfPOSTING_BLOCK_TIME, &xResult );
@ -175,12 +175,13 @@ static void prvFlashCoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE
{
/* Even though this is a co-routine the variable do not need to be
static as we do not need it to maintain their state between blocks. */
portBASE_TYPE xResult;
signed portBASE_TYPE xResult;
unsigned portBASE_TYPE uxLEDToFlash;
/* Co-routines MUST start with a call to crSTART. */
crSTART( xHandle );
( void ) uxIndex;
for( ;; )
{
/* Block to wait for the number of the LED to flash. */