mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-04-20 05:21:59 -04:00
Small tidy up of the main-full.c file for the new MicroBlaze demo.
This commit is contained in:
parent
587e7f0682
commit
00bfe2f025
|
@ -311,7 +311,6 @@ static long lErrorAlreadyLatched = pdFALSE;
|
||||||
/* This is the callback function used by the 'check' timer, as described
|
/* This is the callback function used by the 'check' timer, as described
|
||||||
at the top of this file. */
|
at the top of this file. */
|
||||||
|
|
||||||
#if 0
|
|
||||||
/* Check the standard demo tasks are running without error. */
|
/* Check the standard demo tasks are running without error. */
|
||||||
if( xAreGenericQueueTasksStillRunning() != pdTRUE )
|
if( xAreGenericQueueTasksStillRunning() != pdTRUE )
|
||||||
{
|
{
|
||||||
|
@ -369,7 +368,6 @@ static long lErrorAlreadyLatched = pdFALSE;
|
||||||
pcStatusMessage = "Error: Flop\r\n";
|
pcStatusMessage = "Error: Flop\r\n";
|
||||||
xPrintf( pcStatusMessage );
|
xPrintf( pcStatusMessage );
|
||||||
}
|
}
|
||||||
#endif //_RB_
|
|
||||||
/* Check the reg test tasks are still cycling. They will stop incrementing
|
/* Check the reg test tasks are still cycling. They will stop incrementing
|
||||||
their loop counters if they encounter an error. */
|
their loop counters if they encounter an error. */
|
||||||
if( ulRegTest1CycleCount == ulLastRegTest1CycleCount )
|
if( ulRegTest1CycleCount == ulLastRegTest1CycleCount )
|
||||||
|
@ -505,47 +503,23 @@ char *pcGetTaskStatusMessage( void )
|
||||||
|
|
||||||
static void prvSetupHardware( void )
|
static void prvSetupHardware( void )
|
||||||
{
|
{
|
||||||
#if 0
|
|
||||||
portBASE_TYPE xStatus;
|
|
||||||
const unsigned char ucSetToOutput = 0U;
|
|
||||||
|
|
||||||
/* Set up the GPIO port for the LED outputs. */
|
|
||||||
vParTestInitialise();
|
|
||||||
|
|
||||||
/* Initialise the GPIO for the button inputs. */
|
|
||||||
if( xStatus == XST_SUCCESS )
|
|
||||||
{
|
|
||||||
xStatus = XGpio_Initialize( &xInputGPIOInstance, XPAR_PUSH_BUTTONS_4BITS_DEVICE_ID );
|
|
||||||
}
|
|
||||||
|
|
||||||
if( xStatus == XST_SUCCESS )
|
|
||||||
{
|
|
||||||
/* Install the handler defined in this task for the button input. */
|
|
||||||
xStatus = xPortInstallInterruptHandler( XPAR_MICROBLAZE_0_INTC_PUSH_BUTTONS_4BITS_IP2INTC_IRPT_INTR, prvButtonInputInterruptHandler, NULL );
|
|
||||||
|
|
||||||
if( xStatus == pdPASS )
|
|
||||||
{
|
|
||||||
/* Set buttons to input. */
|
|
||||||
XGpio_SetDataDirection( &xInputGPIOInstance, uxGPIOInputChannel, ~( ucSetToOutput ) );
|
|
||||||
|
|
||||||
|
|
||||||
vPortEnableInterrupt( XPAR_MICROBLAZE_0_INTC_PUSH_BUTTONS_4BITS_IP2INTC_IRPT_INTR );
|
|
||||||
|
|
||||||
/* Enable GPIO channel interrupts. */
|
|
||||||
XGpio_InterruptEnable( &xInputGPIOInstance, uxGPIOInputChannel ); //_RB_
|
|
||||||
XGpio_InterruptGlobalEnable( &xInputGPIOInstance );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
configASSERT( ( xStatus == pdPASS ) );
|
|
||||||
#else
|
|
||||||
taskDISABLE_INTERRUPTS();
|
taskDISABLE_INTERRUPTS();
|
||||||
vParTestInitialise();
|
vParTestInitialise();
|
||||||
#endif //_RB_
|
|
||||||
|
|
||||||
#ifdef MICROBLAZE_EXCEPTIONS_ENABLED
|
#ifdef MICROBLAZE_EXCEPTIONS_ENABLED
|
||||||
//_RB_ microblaze_enable_exceptions();
|
microblaze_enable_exceptions();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef XPAR_MICROBLAZE_USE_ICACHE
|
||||||
|
microblaze_invalidate_icache();
|
||||||
|
microblaze_enable_icache();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef XPAR_MICROBLAZE_USE_DCACHE
|
||||||
|
microblaze_invalidate_dcache();
|
||||||
|
microblaze_enable_dcache();
|
||||||
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue