Replace asm wrappers to interrupt handlers with functions that use the interrupt attribute.

This commit is contained in:
Richard Barry 2010-09-22 22:02:54 +00:00
parent eea2ab0385
commit c92128869d
20 changed files with 221 additions and 282 deletions

View file

@ -71,11 +71,11 @@
#define tmrTIMER_0_1_FREQUENCY ( 2000UL )
#define tmrTIMER_2_3_FREQUENCY ( 2001UL )
/* Wrappers and handlers for the two timers used. See the documentation page
/* Handlers for the two timers used. See the documentation page
for this port on http://www.FreeRTOS.org for more information on writing
interrupt handlers. */
void vT0_1_ISR_Wrapper( void ) __attribute((naked));
void vT2_3_ISR_Wrapper( void ) __attribute((naked));
void vT0_1_ISR_Handler( void ) __attribute((interrupt));
void vT2_3_ISR_Handler( void ) __attribute((interrupt));
void vInitialiseTimerForIntQueueTest( void )
{
@ -131,35 +131,25 @@ void vInitialiseTimerForIntQueueTest( void )
}
/*-----------------------------------------------------------*/
void vT0_1_ISR_Wrapper( void )
void vT0_1_ISR_Handler( void )
{
/* This is a naked function. This macro saves registers then re-enables
interrupts. See the documentation for htis port on http://www.FreeRTOS.org
for more information on writing interrupts. */
portENTER_INTERRUPT();
/* Re-enabled interrupts. */
__asm volatile( "SETPSW I" );
/* Call the handler that is part of the common code - this is where the
non-portable code ends and the actual test is performed. */
portYIELD_FROM_ISR( xFirstTimerHandler() );
/* Restore registers, then return. */
portEXIT_INTERRUPT();
}
/*-----------------------------------------------------------*/
void vT2_3_ISR_Wrapper( void )
void vT2_3_ISR_Handler( void )
{
/* This is a naked function. This macro saves registers then re-enables
interrupts. See the documentation for htis port on http://www.FreeRTOS.org
for more information on writing interrupts. */
portENTER_INTERRUPT();
/* Re-enabled interrupts. */
__asm volatile( "SETPSW I" );
/* Call the handler that is part of the common code - this is where the
non-portable code ends and the actual test is performed. */
portYIELD_FROM_ISR( xSecondTimerHandler() );
/* Restore registers, then return. */
portEXIT_INTERRUPT();
}
/*-----------------------------------------------------------*/