mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-04-19 21:11:57 -04:00
Change vTickISR() to vPortTickISR() in the new MicroBlaze demo.
This commit is contained in:
parent
1f5e2a944c
commit
b59d10c893
|
@ -466,14 +466,14 @@ will run on lots of different MicroBlaze and FPGA configurations - not all of
|
||||||
which will have the same timer peripherals defined or available. This example
|
which will have the same timer peripherals defined or available. This example
|
||||||
uses the AXI Timer 0. If that is available on your hardware platform then this
|
uses the AXI Timer 0. If that is available on your hardware platform then this
|
||||||
example callback implementation should not require modification. The name of
|
example callback implementation should not require modification. The name of
|
||||||
the interrupt handler that should be installed is vTickISR(), which the function
|
the interrupt handler that should be installed is vPortTickISR(), which the
|
||||||
below declares as an extern. */
|
function below declares as an extern. */
|
||||||
void vApplicationSetupTimerInterrupt( void )
|
void vApplicationSetupTimerInterrupt( void )
|
||||||
{
|
{
|
||||||
portBASE_TYPE xStatus;
|
portBASE_TYPE xStatus;
|
||||||
const unsigned char ucTimerCounterNumber = ( unsigned char ) 0U;
|
const unsigned char ucTimerCounterNumber = ( unsigned char ) 0U;
|
||||||
const unsigned long ulCounterValue = ( ( XPAR_AXI_TIMER_0_CLOCK_FREQ_HZ / configTICK_RATE_HZ ) - 1UL );
|
const unsigned long ulCounterValue = ( ( XPAR_AXI_TIMER_0_CLOCK_FREQ_HZ / configTICK_RATE_HZ ) - 1UL );
|
||||||
extern void vTickISR( void *pvUnused );
|
extern void vPortTickISR( void *pvUnused );
|
||||||
|
|
||||||
/* Initialise the timer/counter. */
|
/* Initialise the timer/counter. */
|
||||||
xStatus = XTmrCtr_Initialize( &xTimer0Instance, XPAR_AXI_TIMER_0_DEVICE_ID );
|
xStatus = XTmrCtr_Initialize( &xTimer0Instance, XPAR_AXI_TIMER_0_DEVICE_ID );
|
||||||
|
@ -483,7 +483,7 @@ extern void vTickISR( void *pvUnused );
|
||||||
/* Install the tick interrupt handler as the timer ISR.
|
/* Install the tick interrupt handler as the timer ISR.
|
||||||
*NOTE* The xPortInstallInterruptHandler() API function must be used for
|
*NOTE* The xPortInstallInterruptHandler() API function must be used for
|
||||||
this purpose. */
|
this purpose. */
|
||||||
xStatus = xPortInstallInterruptHandler( XPAR_INTC_0_TMRCTR_0_VEC_ID, vTickISR, NULL );
|
xStatus = xPortInstallInterruptHandler( XPAR_INTC_0_TMRCTR_0_VEC_ID, vPortTickISR, NULL );
|
||||||
}
|
}
|
||||||
|
|
||||||
if( xStatus == pdPASS )
|
if( xStatus == pdPASS )
|
||||||
|
@ -494,7 +494,7 @@ extern void vTickISR( void *pvUnused );
|
||||||
vPortEnableInterrupt( XPAR_INTC_0_TMRCTR_0_VEC_ID );
|
vPortEnableInterrupt( XPAR_INTC_0_TMRCTR_0_VEC_ID );
|
||||||
|
|
||||||
/* Configure the timer interrupt handler. */
|
/* Configure the timer interrupt handler. */
|
||||||
XTmrCtr_SetHandler( &xTimer0Instance, ( void * ) vTickISR, NULL );
|
XTmrCtr_SetHandler( &xTimer0Instance, ( void * ) vPortTickISR, NULL );
|
||||||
|
|
||||||
/* Set the correct period for the timer. */
|
/* Set the correct period for the timer. */
|
||||||
XTmrCtr_SetResetValue( &xTimer0Instance, ucTimerCounterNumber, ulCounterValue );
|
XTmrCtr_SetResetValue( &xTimer0Instance, ucTimerCounterNumber, ulCounterValue );
|
||||||
|
|
|
@ -80,10 +80,10 @@
|
||||||
*
|
*
|
||||||
* "Check" timer - The check timer period is initially set to five seconds.
|
* "Check" timer - The check timer period is initially set to five seconds.
|
||||||
* The check timer callback function checks that all the standard demo tasks,
|
* The check timer callback function checks that all the standard demo tasks,
|
||||||
* and the register check tasks, are not only still execution, but are executing
|
* and the register check tasks, are not only still executing, but are executing
|
||||||
* without reporting any errors. If the check timer discovers that a task has
|
* without reporting any errors. If the check timer discovers that a task has
|
||||||
* either stalled or reported an error, then it changes its own period from
|
* either stalled, or reported an error, then it changes its own period from
|
||||||
* the inital five seconds, to just 200ms. The check timer callback function
|
* the initial five seconds, to just 200ms. The check timer callback function
|
||||||
* also toggles an LED each time it is called. This provides a visual
|
* also toggles an LED each time it is called. This provides a visual
|
||||||
* indication of the system status: If the LED toggles every five seconds then
|
* indication of the system status: If the LED toggles every five seconds then
|
||||||
* no issues have been discovered. If the LED toggles every 200ms then an issue
|
* no issues have been discovered. If the LED toggles every 200ms then an issue
|
||||||
|
@ -386,14 +386,14 @@ will run on lots of different MicroBlaze and FPGA configurations - not all of
|
||||||
which will have the same timer peripherals defined or available. This example
|
which will have the same timer peripherals defined or available. This example
|
||||||
uses the AXI Timer 0. If that is available on your hardware platform then this
|
uses the AXI Timer 0. If that is available on your hardware platform then this
|
||||||
example callback implementation should not require modification. The name of
|
example callback implementation should not require modification. The name of
|
||||||
the interrupt handler that should be installed is vTickISR(), which the function
|
the interrupt handler that should be installed is vPortTickISR(), which the
|
||||||
below declares as an extern. */
|
function below declares as an extern. */
|
||||||
void vApplicationSetupTimerInterrupt( void )
|
void vApplicationSetupTimerInterrupt( void )
|
||||||
{
|
{
|
||||||
portBASE_TYPE xStatus;
|
portBASE_TYPE xStatus;
|
||||||
const unsigned char ucTimerCounterNumber = ( unsigned char ) 0U;
|
const unsigned char ucTimerCounterNumber = ( unsigned char ) 0U;
|
||||||
const unsigned long ulCounterValue = ( ( XPAR_AXI_TIMER_0_CLOCK_FREQ_HZ / configTICK_RATE_HZ ) - 1UL );
|
const unsigned long ulCounterValue = ( ( XPAR_AXI_TIMER_0_CLOCK_FREQ_HZ / configTICK_RATE_HZ ) - 1UL );
|
||||||
extern void vTickISR( void *pvUnused );
|
extern void vPortTickISR( void *pvUnused );
|
||||||
|
|
||||||
/* Initialise the timer/counter. */
|
/* Initialise the timer/counter. */
|
||||||
xStatus = XTmrCtr_Initialize( &xTimer0Instance, XPAR_AXI_TIMER_0_DEVICE_ID );
|
xStatus = XTmrCtr_Initialize( &xTimer0Instance, XPAR_AXI_TIMER_0_DEVICE_ID );
|
||||||
|
@ -403,7 +403,7 @@ extern void vTickISR( void *pvUnused );
|
||||||
/* Install the tick interrupt handler as the timer ISR.
|
/* Install the tick interrupt handler as the timer ISR.
|
||||||
*NOTE* The xPortInstallInterruptHandler() API function must be used for
|
*NOTE* The xPortInstallInterruptHandler() API function must be used for
|
||||||
this purpose. */
|
this purpose. */
|
||||||
xStatus = xPortInstallInterruptHandler( XPAR_INTC_0_TMRCTR_0_VEC_ID, vTickISR, NULL );
|
xStatus = xPortInstallInterruptHandler( XPAR_INTC_0_TMRCTR_0_VEC_ID, vPortTickISR, NULL );
|
||||||
}
|
}
|
||||||
|
|
||||||
if( xStatus == pdPASS )
|
if( xStatus == pdPASS )
|
||||||
|
@ -414,7 +414,7 @@ extern void vTickISR( void *pvUnused );
|
||||||
vPortEnableInterrupt( XPAR_INTC_0_TMRCTR_0_VEC_ID );
|
vPortEnableInterrupt( XPAR_INTC_0_TMRCTR_0_VEC_ID );
|
||||||
|
|
||||||
/* Configure the timer interrupt handler. */
|
/* Configure the timer interrupt handler. */
|
||||||
XTmrCtr_SetHandler( &xTimer0Instance, ( void * ) vTickISR, NULL );
|
XTmrCtr_SetHandler( &xTimer0Instance, ( void * ) vPortTickISR, NULL );
|
||||||
|
|
||||||
/* Set the correct period for the timer. */
|
/* Set the correct period for the timer. */
|
||||||
XTmrCtr_SetResetValue( &xTimer0Instance, ucTimerCounterNumber, ulCounterValue );
|
XTmrCtr_SetResetValue( &xTimer0Instance, ucTimerCounterNumber, ulCounterValue );
|
||||||
|
|
Loading…
Reference in a new issue