mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-06-05 20:09:05 -04:00
Updated GCC/ARM7 ISR functions so they only use static variables.
This commit is contained in:
parent
a3921adfe1
commit
c54ec1c639
|
@ -97,10 +97,14 @@ void vUART_ISR( void )
|
|||
variable declarations. */
|
||||
portENTER_SWITCHING_ISR();
|
||||
|
||||
/* Now we can declare the local variables. */
|
||||
signed portCHAR cChar;
|
||||
portBASE_TYPE xTaskWokenByTx = pdFALSE, xTaskWokenByRx = pdFALSE;
|
||||
unsigned portLONG ulStatus;
|
||||
/* Now we can declare the local variables. These must be static. */
|
||||
static signed portCHAR cChar;
|
||||
static portBASE_TYPE xTaskWokenByTx, xTaskWokenByRx;
|
||||
static unsigned portLONG ulStatus;
|
||||
|
||||
/* These variables are static so need initialising manually here. */
|
||||
xTaskWokenByTx = pdFALSE;
|
||||
xTaskWokenByRx = pdFALSE;
|
||||
|
||||
/* What caused the interrupt? */
|
||||
ulStatus = AT91C_BASE_US0->US_CSR & AT91C_BASE_US0->US_IMR;
|
||||
|
@ -133,7 +137,7 @@ void vUART_ISR( void )
|
|||
}
|
||||
}
|
||||
|
||||
// Acknowledge the interrupt at AIC level...
|
||||
/* Acknowledge the interrupt at AIC level... */
|
||||
AT91C_BASE_AIC->AIC_EOICR = serCLEAR_AIC_INTERRUPT;
|
||||
|
||||
/* Exit the ISR. If a task was woken by either a character being received
|
||||
|
|
|
@ -110,9 +110,13 @@ void vUART_ISR( void )
|
|||
variable declarations. */
|
||||
portENTER_SWITCHING_ISR();
|
||||
|
||||
/* Now we can declare the local variables. */
|
||||
signed portCHAR cChar;
|
||||
portBASE_TYPE xTaskWokenByTx = pdFALSE, xTaskWokenByRx = pdFALSE;
|
||||
/* Now we can declare the local variables. These must be static. */
|
||||
static signed portCHAR cChar;
|
||||
static portBASE_TYPE xTaskWokenByTx, xTaskWokenByRx;
|
||||
|
||||
/* As these variables are static they must be initialised manually here. */
|
||||
xTaskWokenByTx = pdFALSE;
|
||||
xTaskWokenByRx = pdFALSE;
|
||||
|
||||
/* What caused the interrupt? */
|
||||
switch( UART0_IIR & serINTERRUPT_SOURCE_MASK )
|
||||
|
|
|
@ -10,7 +10,9 @@ void vEMAC_ISR( void )
|
|||
{
|
||||
portENTER_SWITCHING_ISR();
|
||||
|
||||
portBASE_TYPE xSwitchRequired = pdFALSE;
|
||||
static portBASE_TYPE xSwitchRequired;
|
||||
|
||||
xSwitchRequired = pdFALSE;
|
||||
|
||||
/* Clear the interrupt. */
|
||||
MAC_INTCLEAR = 0xffff;
|
||||
|
|
|
@ -10,7 +10,12 @@ void vEMAC_ISR( void )
|
|||
{
|
||||
portENTER_SWITCHING_ISR();
|
||||
|
||||
portBASE_TYPE xSwitchRequired = pdFALSE;
|
||||
|
||||
/* Variable must be static. */
|
||||
static portBASE_TYPE xSwitchRequired;
|
||||
|
||||
/* As the variable is static it must be manually initialised here. */
|
||||
xSwitchRequired = pdFALSE;
|
||||
|
||||
/* Clear the interrupt. */
|
||||
IntClear = 0xffff;
|
||||
|
|
|
@ -59,7 +59,12 @@ void vEINT0_ISR( void )
|
|||
portENTER_SWITCHING_ISR();
|
||||
|
||||
extern xQueueHandle xTCPISRQueue;
|
||||
portBASE_TYPE xTaskWoken = pdFALSE;
|
||||
|
||||
/* Must be declared static. */
|
||||
static portBASE_TYPE xTaskWoken;
|
||||
|
||||
/* As the variable is static it must be manually initialised. */
|
||||
xTaskWoken = pdFALSE;
|
||||
|
||||
/* Just wake the TCP task so it knows an ISR has occurred. */
|
||||
xQueueSendFromISR( xTCPISRQueue, ( void * ) &lDummyVariable, xTaskWoken );
|
||||
|
|
|
@ -124,11 +124,16 @@ void vI2C_ISR( void )
|
|||
{
|
||||
portENTER_SWITCHING_ISR();
|
||||
|
||||
/* Variables must be static. */
|
||||
|
||||
/* Holds the current transmission state. */
|
||||
static I2C_STATE eCurrentState = eSentStart;
|
||||
static portLONG lMessageIndex = -i2cBUFFER_ADDRESS_BYTES; /* There are two address bytes to send prior to the data. */
|
||||
portBASE_TYPE xTaskWokenByTx = pdFALSE;
|
||||
portLONG lBytesLeft;
|
||||
static portBASE_TYPE xTaskWokenByTx;
|
||||
static portLONG lBytesLeft;
|
||||
|
||||
xTaskWokenByTx = pdFALSE;
|
||||
|
||||
|
||||
/* The action taken for this interrupt depends on our current state. */
|
||||
switch( eCurrentState )
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 ) ] );
|
||||
|
|
Loading…
Reference in a new issue