]> git.sur5r.net Git - freertos/commitdiff
Small tidy up of the main-full.c file for the new MicroBlaze demo.
authorrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Wed, 15 Jun 2011 08:38:01 +0000 (08:38 +0000)
committerrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Wed, 15 Jun 2011 08:38:01 +0000 (08:38 +0000)
git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@1457 1d2547de-c912-0410-9cb9-b8ca96c0e9e2

Demo/MicroBlaze_Spartan-6_EthernetLite/SDKProjects/RTOSDemoSource/main-full.c

index 3d152480549e2ccbc235c77e0e4535dca04dc4a3..8e74c07de93853660cdf8a385efa26f84bb9b5cc 100644 (file)
@@ -311,7 +311,6 @@ static long lErrorAlreadyLatched = pdFALSE;
        /* This is the callback function used by the 'check' timer, as described\r
        at the top of this file. */\r
 \r
-#if 0\r
        /* Check the standard demo tasks are running without error. */\r
        if( xAreGenericQueueTasksStillRunning() != pdTRUE )\r
        {\r
@@ -369,7 +368,6 @@ static long lErrorAlreadyLatched = pdFALSE;
                pcStatusMessage = "Error: Flop\r\n";\r
                xPrintf( pcStatusMessage );\r
        }\r
-#endif //_RB_\r
        /* Check the reg test tasks are still cycling.  They will stop incrementing\r
        their loop counters if they encounter an error. */\r
        if( ulRegTest1CycleCount == ulLastRegTest1CycleCount )\r
@@ -505,47 +503,23 @@ char *pcGetTaskStatusMessage( void )
 \r
 static void prvSetupHardware( void )\r
 {\r
-#if 0\r
-portBASE_TYPE xStatus;\r
-const unsigned char ucSetToOutput = 0U;\r
-\r
-       /* Set up the GPIO port for the LED outputs. */\r
-       vParTestInitialise();\r
-\r
-       /* Initialise the GPIO for the button inputs. */\r
-       if( xStatus == XST_SUCCESS )\r
-       {\r
-               xStatus = XGpio_Initialize( &xInputGPIOInstance, XPAR_PUSH_BUTTONS_4BITS_DEVICE_ID );\r
-       }\r
-\r
-       if( xStatus == XST_SUCCESS )\r
-       {\r
-               /* Install the handler defined in this task for the button input. */\r
-               xStatus = xPortInstallInterruptHandler( XPAR_MICROBLAZE_0_INTC_PUSH_BUTTONS_4BITS_IP2INTC_IRPT_INTR, prvButtonInputInterruptHandler, NULL );\r
-\r
-               if( xStatus == pdPASS )\r
-               {\r
-                       /* Set buttons to input. */\r
-                       XGpio_SetDataDirection( &xInputGPIOInstance, uxGPIOInputChannel, ~( ucSetToOutput ) );\r
-\r
-\r
-                       vPortEnableInterrupt( XPAR_MICROBLAZE_0_INTC_PUSH_BUTTONS_4BITS_IP2INTC_IRPT_INTR );\r
-\r
-                       /* Enable GPIO channel interrupts. */\r
-                       XGpio_InterruptEnable( &xInputGPIOInstance, uxGPIOInputChannel ); //_RB_\r
-                       XGpio_InterruptGlobalEnable( &xInputGPIOInstance );\r
-               }\r
-       }\r
-\r
-       configASSERT( ( xStatus == pdPASS ) );\r
-#else\r
        taskDISABLE_INTERRUPTS();\r
        vParTestInitialise();\r
-#endif //_RB_\r
 \r
        #ifdef MICROBLAZE_EXCEPTIONS_ENABLED\r
-//_RB_         microblaze_enable_exceptions();\r
+               microblaze_enable_exceptions();\r
+       #endif\r
+\r
+       #ifdef XPAR_MICROBLAZE_USE_ICACHE\r
+               microblaze_invalidate_icache();\r
+               microblaze_enable_icache();\r
        #endif\r
+\r
+       #ifdef XPAR_MICROBLAZE_USE_DCACHE\r
+               microblaze_invalidate_dcache();\r
+               microblaze_enable_dcache();\r
+       #endif\r
+\r
 }\r
 /*-----------------------------------------------------------*/\r
 \r