Continue work on MicroBlaze port - still very much a work in progress.

This commit is contained in:
Richard Barry 2011-06-03 19:22:17 +00:00
parent 1e5830a157
commit ea5ec656f4
4 changed files with 91 additions and 34 deletions

View file

@ -172,6 +172,41 @@ static volatile unsigned long ulGPIOState = 0UL;
static XTmrCtr xTimer0Instance;
/*-----------------------------------------------------------*/
#define JUST_TESTING
#ifdef JUST_TESTING
volatile unsigned long ul1 = 0, ul2 = 0;
void vTemp1( void *pvParameters )
{
for( ;; )
{
ul1++;
//taskYIELD();
}
}
void vTemp2( void *pvParameters )
{
for( ;; )
{
ul2++;
//taskYIELD();
}
}
void main( void )
{
prvSetupHardware();
xTaskCreate( vTemp1, ( signed char * ) "Test1", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY + 1, NULL );
xTaskCreate( vTemp2, ( signed char * ) "Test2", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY + 1, NULL );
vTaskStartScheduler();
for( ;; );
}
#else /* JUST_TESTING */
int main(void)
{
@ -210,7 +245,7 @@ int main(void)
for( ;; );
}
/*-----------------------------------------------------------*/
#endif /* JUST_TESTING */
static void vLEDTimerCallback( xTimerHandle xTimer )
{
/* The timer has expired - so no button pushes have occurred in the last
@ -416,3 +451,15 @@ extern void vTickISR( void *pvUnused );
}
void vApplicationClearTimerInterrupt( void )
{
unsigned long ulCSR;
/* Increment the RTOS tick - this might cause a task to unblock. */
vTaskIncrementTick();
/* Clear the timer interrupt */
ulCSR = XTmrCtr_GetControlStatusReg( XPAR_AXI_TIMER_0_BASEADDR, 0 );
XTmrCtr_SetControlStatusReg( XPAR_AXI_TIMER_0_BASEADDR, 0, ulCSR );
}