#define mainINTEGER_TASK_PRIORITY ( tskIDLE_PRIORITY )\r
#define mainGEN_QUEUE_TASK_PRIORITY ( tskIDLE_PRIORITY )\r
\r
-/* The LED controlled by the 'check' software timer. */\r
-#define mainCHECK_LED ( 7 )\r
-\r
/* The LED used by the comtest tasks. mainCOM_TEST_LED + 1 is also used.\r
See the comtest.c file for more information. */\r
#define mainCOM_TEST_LED ( 4 )\r
#define mainNS_PER_CLOCK ( ( unsigned long ) ( ( 1.0 / ( double ) ( configCPU_CLOCK_HZ >> 1 ) ) * 1000000000.0 ) )\r
\r
/* The number of LEDs that should be controlled by the flash software timer\r
-standard demo. */\r
-#define mainNUM_FLASH_TIMER_LEDS ( 3 )\r
+standard demo and the LED to be toggle by the check task. The starter kit only\r
+has three LEDs so when the demo is configured to run on the starter kit there\r
+is one less flash timer so the check task can use the third LED. */\r
+#ifdef PIC32_STARTER_KIT\r
+ #define mainNUM_FLASH_TIMER_LEDS ( 2 )\r
+ #define mainCHECK_LED ( 2 )\r
+#else\r
+ #define mainNUM_FLASH_TIMER_LEDS ( 3 )\r
+ #define mainCHECK_LED ( 7 )\r
+#endif\r
\r
/*-----------------------------------------------------------*/\r
\r
/* The queue used to send messages to the LCD task. */\r
static xQueueHandle xLCDQueue;\r
\r
-/* Flag used by prvRegTestTask1() and prvRegTestTask2() to indicate their status\r
-(pass/fail). */\r
-volatile unsigned long ulStatus1 = pdPASS;\r
-\r
/* Variables incremented by prvRegTestTask1() and prvRegTestTask2() respectively on \r
each iteration of their function. This is used to detect either task stopping\r
their execution.. */\r
{\r
extern void vRegTest1( volatile unsigned long * );\r
\r
- for( ;; )\r
- {\r
- /* Perform the register test function. */\r
- vRegTest1( &ulStatus1 );\r
+ /* Avoid compiler warnings. */\r
+ ( void ) pvParameters;\r
\r
- /* Increment the counter so the check task knows we are still \r
- running. */\r
- ulRegTest1Cycles++;\r
- }\r
+ /* Pass the address of the RegTest1 loop counter into the test function,\r
+ which is necessarily implemented in assembler. */\r
+ vRegTest1( &ulRegTest1Cycles );\r
+\r
+ /* vRegTest1 should never exit! */\r
+ vTaskDelete( NULL );\r
}\r
/*-----------------------------------------------------------*/\r
\r
{\r
extern void vRegTest2( volatile unsigned long * );\r
\r
- for( ;; )\r
- {\r
- /* Perform the register test function. */\r
- vRegTest2( &ulStatus1 );\r
+ /* Avoid compiler warnings. */\r
+ ( void ) pvParameters;\r
\r
- /* Increment the counter so the check task knows we are still\r
- running. */\r
- ulRegTest2Cycles++;\r
- }\r
+ /* Pass the address of the RegTest2 loop counter into the test function,\r
+ which is necessarily implemented in assembler. */\r
+ vRegTest2( &ulRegTest2Cycles );\r
+\r
+ /* vRegTest1 should never exit! */\r
+ vTaskDelete( NULL );\r
}\r
/*-----------------------------------------------------------*/\r
\r
extern unsigned long ulHighFrequencyTimerInterrupts;\r
static xLCDMessage xMessage = { ( 200 / portTICK_RATE_MS ), cStringBuffer };\r
\r
- /* Has either register check 1 or 2 task discovered an error? */\r
- if( ulStatus1 != pdPASS )\r
- {\r
- xMessage.pcMessage = "Error: Reg test1";\r
- }\r
-\r
/* Check that the register test 1 task is still running. */\r
if( ulLastRegTest1Value == ulRegTest1Cycles )\r
{\r
{\r
xMessage.pcMessage = "Error: Q Peek";\r
}\r
- else if( xAreComTestTasksStillRunning() != pdTRUE )\r
- {\r
- xMessage.pcMessage = "Error: COM test";\r
- }\r
else if( xAreBlockTimeTestTasksStillRunning() != pdTRUE )\r
{\r
xMessage.pcMessage = "Error: Blck time";\r
{\r
xMessage.pcMessage = "Error: Int queue";\r
}\r
+ #if !defined(__32MX795F512L__)\r
+ else if( xAreComTestTasksStillRunning() != pdTRUE )\r
+ {\r
+ xMessage.pcMessage = "Error: COM test";\r
+ }\r
+ #endif\r
\r
if( xMessage.pcMessage != cStringBuffer )\r
{\r