X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=Demo%2FMB91460_Softune%2FSRC%2Fmain.c;h=ddb26fdb54e737ad069d911c8d0ffbb1d29caa05;hb=87eabd0658d4f4918a0de2a3c0580cd8a94404f7;hp=9ec92d97c9754c078e7243e7716b5a455e2110c2;hpb=bf17c194bd7bbf96261769033b6db918fca19b8a;p=freertos diff --git a/Demo/MB91460_Softune/SRC/main.c b/Demo/MB91460_Softune/SRC/main.c index 9ec92d97c..ddb26fdb5 100644 --- a/Demo/MB91460_Softune/SRC/main.c +++ b/Demo/MB91460_Softune/SRC/main.c @@ -83,7 +83,6 @@ #include "flash.h" #include "integer.h" #include "comtest2.h" -#include "PollQ.h" #include "semtest.h" #include "BlockQ.h" #include "dynamic.h" @@ -94,14 +93,14 @@ #include "death.h" #include "taskutility.h" #include "partest.h" +#include "crflash.h" /* Demo task priorities. */ #define mainWATCHDOG_TASK_PRIORITY ( tskIDLE_PRIORITY + 5 ) #define mainCHECK_TASK_PRIORITY ( tskIDLE_PRIORITY + 4 ) -#define mainUTILITY_TASK_PRIORITY ( tskIDLE_PRIORITY + 3 ) +#define mainUTILITY_TASK_PRIORITY ( tskIDLE_PRIORITY ) #define mainSEM_TEST_PRIORITY ( tskIDLE_PRIORITY + 3 ) #define mainCOM_TEST_PRIORITY ( tskIDLE_PRIORITY + 2 ) -#define mainQUEUE_POLL_PRIORITY ( tskIDLE_PRIORITY + 2 ) #define mainQUEUE_BLOCK_PRIORITY ( tskIDLE_PRIORITY + 2 ) #define mainDEATH_PRIORITY ( tskIDLE_PRIORITY + 1 ) #define mainLED_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 ) @@ -130,6 +129,9 @@ LCD represent LEDs]*/ /* The number of interrupt levels to use. */ #define mainINTERRUPT_LEVELS ( 31 ) +/* The number of 'flash' co-routines to create - each toggles a different LED. */ +#define mainNUM_FLASH_CO_ROUTINES ( 8 ) + /*---------------------------------------------------------------------------*/ /* @@ -176,7 +178,6 @@ void main(void) vStartLEDFlashTasks( mainLED_TASK_PRIORITY ); vStartIntegerMathTasks( tskIDLE_PRIORITY ); vAltStartComTestTasks( mainCOM_TEST_PRIORITY, mainCOM_TEST_BAUD_RATE, mainCOM_TEST_LED - 1 ); - vStartPolledQueueTasks( mainQUEUE_POLL_PRIORITY ); vStartSemaphoreTasks( mainSEM_TEST_PRIORITY ); vStartBlockingQueueTasks ( mainQUEUE_BLOCK_PRIORITY ); vStartDynamicPriorityTasks(); @@ -184,6 +185,7 @@ void main(void) vStartGenericQueueTasks( mainGENERIC_QUEUE_PRIORITY ); vStartQueuePeekTasks(); vCreateBlockTimeTasks(); + vStartFlashCoRoutines( mainNUM_FLASH_CO_ROUTINES ); /* Start the 'Check' task which is defined in this file. */ xTaskCreate( prvErrorChecks, ( signed portCHAR * ) "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL ); @@ -264,11 +266,6 @@ portBASE_TYPE lReturn = pdPASS; lReturn = pdFAIL; } - if( xArePollingQueuesStillRunning() != pdTRUE ) - { - lReturn = pdFAIL; - } - if( xAreComTestTasksStillRunning() != pdTRUE ) { lReturn = pdFAIL; @@ -353,6 +350,8 @@ static void prvSetupHardware( void ) #if WATCHDOG == WTC_IN_IDLE Kick_Watchdog(); #endif + + vCoRoutineSchedule(); } #else #if WATCHDOG == WTC_IN_IDLE