Updated GCC/ARM7 ISR functions so they only use static variables.

This commit is contained in:
Richard Barry 2007-10-26 10:14:19 +00:00
parent a3921adfe1
commit c54ec1c639
8 changed files with 52 additions and 21 deletions

View file

@ -71,11 +71,14 @@ void vEMACISR( void )
variable declarations. */
portENTER_SWITCHING_ISR();
/* Variable definitions can be made now. */
volatile unsigned portLONG ulIntStatus, ulEventStatus;
portBASE_TYPE xSwitchRequired = pdFALSE;
/* Variable definitions can be made now. These must be static. */
static volatile unsigned portLONG ulIntStatus, ulEventStatus;
static portBASE_TYPE xSwitchRequired;
extern void vClearEMACTxBuffer( void );
/* As the variable is static it must be initialised manually here. */
xSwitchRequired = pdFALSE;
/* Find the cause of the interrupt. */
ulIntStatus = AT91C_BASE_EMAC->EMAC_ISR;
ulEventStatus = AT91C_BASE_EMAC->EMAC_RSR;

View file

@ -71,12 +71,15 @@ void vUSB_ISR( void )
stack variable declarations. */
portENTER_SWITCHING_ISR();
/* Now variables can be declared. */
portCHAR cTaskWokenByPost = pdFALSE;
/* Now variables can be declared. These must be static. */
static portCHAR cTaskWokenByPost;
static volatile unsigned portLONG ulNextMessage = 0;
xISRStatus *pxMessage;
unsigned portLONG ulRxBytes;
unsigned portCHAR ucFifoIndex;
static xISRStatus *pxMessage;
static unsigned portLONG ulRxBytes;
static unsigned portCHAR ucFifoIndex;
/* As the variables are static they must be initialised manually here. */
cTaskWokenByPost = pdFALSE;
/* Use the next message from the array. */
pxMessage = &( xISRMessages[ ( ulNextMessage & usbQUEUE_LENGTH ) ] );