mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-11-16 12:34:29 +00:00
Compare commits
113 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9000f24cd3 | ||
|
|
1e83961601 | ||
|
|
48eff41955 | ||
|
|
42ebfc5227 | ||
|
|
4fcb98ef1d | ||
|
|
cd38538425 | ||
|
|
90064444af | ||
|
|
6128d1a86e | ||
|
|
642a74c5b4 | ||
|
|
ac0630af91 | ||
|
|
192cc29ebc | ||
|
|
8ce7a79937 | ||
|
|
576a25a098 | ||
|
|
6391f4160b | ||
|
|
4154eec4e1 | ||
|
|
03a82c5bc8 | ||
|
|
a4d3bf8f5d | ||
|
|
91c26c9868 | ||
|
|
ab37826715 | ||
|
|
a5f3797949 | ||
|
|
15881cdf39 | ||
|
|
f689c709ab | ||
|
|
b6aa1d6ca8 | ||
|
|
a87f9df3d8 | ||
|
|
bb64640f0a | ||
|
|
98ebaac850 | ||
|
|
b8695fa787 | ||
|
|
eb9d172082 | ||
|
|
0f7c3939e1 | ||
|
|
9d1b078a8f | ||
|
|
61a5a25a7f | ||
|
|
c24a713859 | ||
|
|
01ce621748 | ||
|
|
b19ede773a | ||
|
|
bea704342a | ||
|
|
dd1ef6a777 | ||
|
|
2888b15b7e | ||
|
|
5a2790a998 | ||
|
|
4b9fe1e28a | ||
|
|
fb3b17a37c | ||
|
|
b9b3e521f7 | ||
|
|
ecc072e58b | ||
|
|
66fc3b8092 | ||
|
|
f3eb5028a3 | ||
|
|
31bda54b75 | ||
|
|
f146124bca | ||
|
|
0965823a67 | ||
|
|
684b898abc | ||
|
|
6c275b9ca5 | ||
|
|
ba90821242 | ||
|
|
d7e9d4d397 | ||
|
|
d184cdc09d | ||
|
|
dc897a35dd | ||
|
|
45fceb4bdd | ||
|
|
6177c6e4a4 | ||
|
|
5d27f3ccf7 | ||
|
|
676139e920 | ||
|
|
9d0e60493a | ||
|
|
5a1129c315 | ||
|
|
ad52311deb | ||
|
|
bd44f90e50 | ||
|
|
bafcf8901e | ||
|
|
b7f66b9db6 | ||
|
|
4304c07ebf | ||
|
|
0eae0f7549 | ||
|
|
a9393b891d | ||
|
|
3f620024fc | ||
|
|
a918bd9825 | ||
|
|
019ab1b908 | ||
|
|
9c87f922b3 | ||
|
|
0d29807e93 | ||
|
|
b08411ec5a | ||
|
|
d7ca9ad0c3 | ||
|
|
7e529c281f | ||
|
|
4c8425da01 | ||
|
|
e939542f32 | ||
|
|
57a83227d0 | ||
|
|
8ffe2b49e8 | ||
|
|
98daf5a1b8 | ||
|
|
c95cae5a99 | ||
|
|
dc307b270b | ||
|
|
360d357e15 | ||
|
|
09bfc2d862 | ||
|
|
9cea94ccce | ||
|
|
c1d5690da6 | ||
|
|
7920c29ad1 | ||
|
|
49c84f0d41 | ||
|
|
ac58b5b285 | ||
|
|
8cf6a70c9e | ||
|
|
c1e9f859c8 | ||
|
|
f4dd20dffc | ||
|
|
7eb7201b46 | ||
|
|
b24032d4b0 | ||
|
|
a6053582fc | ||
|
|
af939eb0a9 | ||
|
|
a9ed428422 | ||
|
|
da6d27b627 | ||
|
|
b73dafb1f4 | ||
|
|
2bc9dfa3f8 | ||
|
|
ed543197e0 | ||
|
|
24cb048892 | ||
|
|
ada4744871 | ||
|
|
06e8e93eb5 | ||
|
|
a3677612d2 | ||
|
|
2ca3985a8c | ||
|
|
7ed94acdff | ||
|
|
cfcad6e78a | ||
|
|
5cefef5074 | ||
|
|
637619dcb7 | ||
|
|
d1b9463e29 | ||
|
|
bc7068a690 | ||
|
|
c2a6dc193e | ||
|
|
3fd422ff2f |
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
FreeRTOS.org V4.8.0 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# FreeRTOS.org V4.8.0 - Copyright (C) 2003-2008 Richard Barry.
|
||||
# FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.
|
||||
#
|
||||
# This file is part of the FreeRTOS.org distribution.
|
||||
#
|
||||
@@ -38,7 +38,7 @@ CRT0=boot.s
|
||||
#
|
||||
CFLAGS=-Wall -D $(RUN_MODE) -D GCC_AT91FR40008 -I. -I../../Source/include \
|
||||
-I../Common/include $(DEBUG) -mcpu=arm7tdmi -T$(LDSCRIPT) \
|
||||
-Wcast-align $(OPTIM) -fomit-frame-pointer
|
||||
-Wcast-align $(OPTIM) -fomit-frame-pointer -fno-strict-aliasing
|
||||
|
||||
ifeq ($(USE_THUMB_MODE),YES)
|
||||
CFLAGS += -mthumb-interwork -D THUMB_INTERWORK
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
FreeRTOS.org V4.8.0 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
FreeRTOS.org V4.8.0 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
FreeRTOS.org V4.8.0 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
FreeRTOS.org V4.8.0 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
|
||||
@@ -112,7 +112,7 @@ void vUART_ISR_Handler( void )
|
||||
{
|
||||
/* Now we can declare the local variables. These must be static. */
|
||||
signed portCHAR cChar;
|
||||
portBASE_TYPE xTaskWokenByTx = pdFALSE, xTaskWokenByRx = pdFALSE;
|
||||
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
|
||||
unsigned portLONG ulStatus;
|
||||
|
||||
/* What caused the interrupt? */
|
||||
@@ -122,7 +122,7 @@ unsigned portLONG ulStatus;
|
||||
{
|
||||
/* The interrupt was caused by the THR becoming empty. Are there any
|
||||
more characters to transmit? */
|
||||
if( xQueueReceiveFromISR( xCharsForTx, &cChar, &xTaskWokenByTx ) == pdTRUE )
|
||||
if( xQueueReceiveFromISR( xCharsForTx, &cChar, &xHigherPriorityTaskWoken ) == pdTRUE )
|
||||
{
|
||||
/* A character was retrieved from the queue so can be sent to the
|
||||
THR now. */
|
||||
@@ -140,10 +140,7 @@ unsigned portLONG ulStatus;
|
||||
/* The interrupt was caused by the receiver getting data. */
|
||||
cChar = AT91C_BASE_US0->US_RHR;
|
||||
|
||||
if (xQueueSendFromISR(xRxedChars, &cChar, pdFALSE))
|
||||
{
|
||||
xTaskWokenByRx = pdTRUE;
|
||||
}
|
||||
xQueueSendFromISR(xRxedChars, &cChar, &xHigherPriorityTaskWoken);
|
||||
}
|
||||
|
||||
/* Acknowledge the interrupt at AIC level... */
|
||||
@@ -153,7 +150,7 @@ unsigned portLONG ulStatus;
|
||||
ensure that the unblocked task is the task that executes when the interrupt
|
||||
completes if the unblocked task has a priority higher than the interrupted
|
||||
task. */
|
||||
if( xTaskWokenByTx || xTaskWokenByRx )
|
||||
if( xHigherPriorityTaskWoken )
|
||||
{
|
||||
portYIELD_FROM_ISR();
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
FreeRTOS.org V4.8.0 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
FreeRTOS.org V4.8.0 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
FreeRTOS.org V4.8.0 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
A special exception to the GPL can be applied should you wish to distribute
|
||||
a combined work that includes FreeRTOS.org, without being obliged to provide
|
||||
the source code for any proprietary components. See the licensing section
|
||||
the source code for any proprietary components. See the licensing section
|
||||
of http://www.FreeRTOS.org for full details of how and when the exception
|
||||
can be applied.
|
||||
|
||||
@@ -37,26 +37,26 @@
|
||||
Please ensure to read the configuration and relevant port sections of the
|
||||
online documentation.
|
||||
|
||||
http://www.FreeRTOS.org - Documentation, latest information, license and
|
||||
http://www.FreeRTOS.org - Documentation, latest information, license and
|
||||
contact details.
|
||||
|
||||
http://www.SafeRTOS.com - A version that is certified for use in safety
|
||||
http://www.SafeRTOS.com - A version that is certified for use in safety
|
||||
critical systems.
|
||||
|
||||
http://www.OpenRTOS.com - Commercial support, development, porting,
|
||||
http://www.OpenRTOS.com - Commercial support, development, porting,
|
||||
licensing and training services.
|
||||
*/
|
||||
|
||||
/*
|
||||
Sample interrupt driven USB device driver. This is a minimal implementation
|
||||
Sample interrupt driven USB device driver. This is a minimal implementation
|
||||
for demonstration only. Although functional, it is not a full and compliant
|
||||
implementation.
|
||||
implementation.
|
||||
|
||||
The USB device enumerates as a simple 3 axis joystick, and once configured
|
||||
transmits 3 axis of data which can be viewed from the USB host machine.
|
||||
|
||||
This file implements the USB interrupt service routine, and a demo FreeRTOS
|
||||
task. The interrupt service routine handles the USB hardware - taking a
|
||||
This file implements the USB interrupt service routine, and a demo FreeRTOS
|
||||
task. The interrupt service routine handles the USB hardware - taking a
|
||||
snapshot of the USB status at the point of the interrupt. The task receives
|
||||
the status information from the interrupt for processing at the task level.
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
Changes from V2.5.5
|
||||
|
||||
+ Descriptors that have a length that is an exact multiple of usbFIFO_LENGTH
|
||||
can now be transmitted. To this end an extra parameter has been
|
||||
can now be transmitted. To this end an extra parameter has been
|
||||
added to the prvSendControlData() function, and the state
|
||||
eSENDING_EVEN_DESCRIPTOR has been introduced. Thanks to Scott Miller for
|
||||
assisting with this contribution.
|
||||
@@ -127,7 +127,7 @@
|
||||
#define usbINTERFACE_STRING ( 4 )
|
||||
|
||||
/* Data indexes for reading the request from the xISRStatus.ucFifoData[]
|
||||
into xUSB_REQUEST. The data order is designed for speed - so looks a
|
||||
into xUSB_REQUEST. The data order is designed for speed - so looks a
|
||||
little odd. */
|
||||
#define usbREQUEST_TYPE_INDEX ( 7 )
|
||||
#define usbREQUEST_INDEX ( 6 )
|
||||
@@ -176,7 +176,7 @@ typedef struct X_ISR_STATUS
|
||||
} xISRStatus;
|
||||
|
||||
/* Structure used to hold the received requests. */
|
||||
typedef struct
|
||||
typedef struct
|
||||
{
|
||||
unsigned portCHAR ucReqType;
|
||||
unsigned portCHAR ucRequest;
|
||||
@@ -205,7 +205,7 @@ typedef struct
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/*
|
||||
/*
|
||||
* The USB interrupt service routine. This takes a snapshot of the USB
|
||||
* device at the time of the interrupt, clears the interrupts, and posts
|
||||
* the data to the USB processing task.
|
||||
@@ -219,7 +219,7 @@ __arm void vUSB_ISR( void );
|
||||
static void prvResetEndPoints( void );
|
||||
|
||||
/*
|
||||
* Setup the USB hardware, install the interrupt service routine and
|
||||
* Setup the USB hardware, install the interrupt service routine and
|
||||
* initialise all the state variables.
|
||||
*/
|
||||
static void vInitUSBInterface( void );
|
||||
@@ -229,17 +229,17 @@ static void vInitUSBInterface( void );
|
||||
*/
|
||||
static void prvProcessEndPoint0Interrupt( xISRStatus *pxMessage );
|
||||
|
||||
/*
|
||||
* For simplicity requests are separated into device, interface, class
|
||||
/*
|
||||
* For simplicity requests are separated into device, interface, class
|
||||
* interface and end point requests.
|
||||
*
|
||||
* Decode and handle standard device requests originating on the control
|
||||
* end point.
|
||||
* end point.
|
||||
*/
|
||||
static void prvHandleStandardDeviceRequest( xUSB_REQUEST *pxRequest );
|
||||
|
||||
/*
|
||||
* For simplicity requests are separated into device, interface, class
|
||||
* For simplicity requests are separated into device, interface, class
|
||||
* interface and end point requests.
|
||||
*
|
||||
* Decode and handle standard interface requests originating on the control
|
||||
@@ -248,7 +248,7 @@ static void prvHandleStandardDeviceRequest( xUSB_REQUEST *pxRequest );
|
||||
static void prvHandleStandardInterfaceRequest( xUSB_REQUEST *pxRequest );
|
||||
|
||||
/*
|
||||
* For simplicity requests are separated into device, interface, class
|
||||
* For simplicity requests are separated into device, interface, class
|
||||
* interface and end point requests.
|
||||
*
|
||||
* Decode and handle standard end point requests originating on the control
|
||||
@@ -257,7 +257,7 @@ static void prvHandleStandardInterfaceRequest( xUSB_REQUEST *pxRequest );
|
||||
static void prvHandleStandardEndPointRequest( xUSB_REQUEST *pxRequest );
|
||||
|
||||
/*
|
||||
* For simplicity requests are separated into device, interface, class
|
||||
* For simplicity requests are separated into device, interface, class
|
||||
* interface and end point requests.
|
||||
*
|
||||
* Decode and handle the class interface requests.
|
||||
@@ -277,7 +277,7 @@ static void prvSendControlData( unsigned portCHAR *pucData, unsigned portSHORT u
|
||||
|
||||
/*
|
||||
* Examine the Tx buffer to see if there is any more data to be transmitted.
|
||||
*
|
||||
*
|
||||
* If there is data to be transmitted then send the next segment. A segment
|
||||
* can have a maximum of 8 bytes (this is defined as the maximum for the end
|
||||
* point by the descriptor). The final segment may be less than 8 bytes if
|
||||
@@ -288,36 +288,36 @@ static void prvSendNextSegment( void );
|
||||
/*
|
||||
* A stall condition is forced each time the host makes a request that is not
|
||||
* supported by this minimal implementation.
|
||||
*
|
||||
*
|
||||
* A stall is forced by setting the appropriate bit in the end points control
|
||||
* and status register.
|
||||
* and status register.
|
||||
*/
|
||||
static void prvSendStall( void );
|
||||
|
||||
/*
|
||||
* A NULL (or zero length packet) is transmitted in acknowledge the reception
|
||||
* A NULL (or zero length packet) is transmitted in acknowledge the reception
|
||||
* of certain events from the host.
|
||||
*/
|
||||
static void prvUSBTransmitNull( void );
|
||||
|
||||
/*
|
||||
* When the host requests a descriptor this function is called to determine
|
||||
/*
|
||||
* When the host requests a descriptor this function is called to determine
|
||||
* which descriptor is being requested and start its transmission.
|
||||
*/
|
||||
static void prvGetStandardInterfaceDescriptor( xUSB_REQUEST *pxRequest );
|
||||
|
||||
/*
|
||||
* This demo USB device enumerates as a simple 3 axis joystick. Once
|
||||
* This demo USB device enumerates as a simple 3 axis joystick. Once
|
||||
* configured this function is periodically called to generate some sample
|
||||
* joystick data.
|
||||
*
|
||||
* The x and y axis are made to move in a square. The z axis is made to
|
||||
* The x and y axis are made to move in a square. The z axis is made to
|
||||
* repeatedly increment up to its maximum.
|
||||
*/
|
||||
static void prvTransmitSampleValues( void );
|
||||
|
||||
/*
|
||||
* The created task to handle the USB demo functionality.
|
||||
* The created task to handle the USB demo functionality.
|
||||
*/
|
||||
void vUSBDemoTask( void *pvParameters );
|
||||
|
||||
@@ -343,7 +343,7 @@ const portCHAR pxLanguageStringDescriptor[] =
|
||||
0x09, 0x04
|
||||
};
|
||||
|
||||
const portCHAR pxManufacturerStringDescriptor[] =
|
||||
const portCHAR pxManufacturerStringDescriptor[] =
|
||||
{
|
||||
18,
|
||||
usbDESCRIPTOR_TYPE_STRING,
|
||||
@@ -358,7 +358,7 @@ const portCHAR pxManufacturerStringDescriptor[] =
|
||||
'S', 0x00
|
||||
};
|
||||
|
||||
const portCHAR pxProductStringDescriptor[] =
|
||||
const portCHAR pxProductStringDescriptor[] =
|
||||
{
|
||||
44,
|
||||
usbDESCRIPTOR_TYPE_STRING,
|
||||
@@ -386,7 +386,7 @@ const portCHAR pxProductStringDescriptor[] =
|
||||
'k', 0x00
|
||||
};
|
||||
|
||||
const portCHAR pxConfigurationStringDescriptor[] =
|
||||
const portCHAR pxConfigurationStringDescriptor[] =
|
||||
{
|
||||
38,
|
||||
usbDESCRIPTOR_TYPE_STRING,
|
||||
@@ -411,7 +411,7 @@ const portCHAR pxConfigurationStringDescriptor[] =
|
||||
'e', 0x00
|
||||
};
|
||||
|
||||
const portCHAR pxInterfaceStringDescriptor[] =
|
||||
const portCHAR pxInterfaceStringDescriptor[] =
|
||||
{
|
||||
30,
|
||||
usbDESCRIPTOR_TYPE_STRING,
|
||||
@@ -453,7 +453,7 @@ const portCHAR pxReportDescriptor[] =
|
||||
0xc0 /* END_COLLECTION */
|
||||
};
|
||||
|
||||
const char pxDeviceDescriptor[] =
|
||||
const char pxDeviceDescriptor[] =
|
||||
{
|
||||
/* Device descriptor */
|
||||
0x12, /* bLength */
|
||||
@@ -526,7 +526,7 @@ static xISRStatus xISRMessages[ usbQUEUE_LENGTH + 1 ];
|
||||
static xTX_MESSAGE pxCharsForTx;
|
||||
|
||||
/* Queue used to pass messages between the ISR and the task. */
|
||||
static xQueueHandle xUSBInterruptQueue;
|
||||
static xQueueHandle xUSBInterruptQueue;
|
||||
|
||||
/* ISR entry has to be written in the asm file as we want a context switch
|
||||
to occur from within the ISR. See the port documentation on the FreeRTOS.org
|
||||
@@ -535,9 +535,9 @@ extern void vUSBISREntry( void );
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/* Macros to manipulate the control and status registers. These registers
|
||||
cannot be accessed using a direct read modify write operation outside of the
|
||||
ISR as some bits are left unchanged by writing with a 0, and some are left
|
||||
/* Macros to manipulate the control and status registers. These registers
|
||||
cannot be accessed using a direct read modify write operation outside of the
|
||||
ISR as some bits are left unchanged by writing with a 0, and some are left
|
||||
unchanged by writing with a 1. */
|
||||
|
||||
#define usbINT_CLEAR_MASK (AT91C_UDP_TXCOMP | AT91C_UDP_STALLSENT | AT91C_UDP_RXSETUP | AT91C_UDP_RX_DATA_BK0 | AT91C_UDP_RX_DATA_BK1 )
|
||||
@@ -576,7 +576,7 @@ unchanged by writing with a 1. */
|
||||
|
||||
__arm void vUSB_ISR( void )
|
||||
{
|
||||
portBASE_TYPE xTaskWokenByPost = pdFALSE;
|
||||
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
|
||||
static volatile unsigned portLONG ulNextMessage = 0;
|
||||
xISRStatus *pxMessage;
|
||||
unsigned portLONG ulTemp, ulRxBytes;
|
||||
@@ -595,7 +595,7 @@ unsigned portLONG ulTemp, ulRxBytes;
|
||||
cleared separately as it does not appear in the mask register. */
|
||||
AT91C_BASE_UDP->UDP_ICR = AT91C_BASE_UDP->UDP_IMR | AT91C_UDP_ENDBUSRES;
|
||||
|
||||
/* If there are bytes in the FIFO then we have to retrieve them here.
|
||||
/* If there are bytes in the FIFO then we have to retrieve them here.
|
||||
Ideally this would be done at the task level. However we need to clear the
|
||||
RXSETUP interrupt before leaving the ISR, and this may cause the data in
|
||||
the FIFO to be overwritten. Also the DIR bit has to be changed before the
|
||||
@@ -606,7 +606,7 @@ unsigned portLONG ulTemp, ulRxBytes;
|
||||
ulRxBytes = ulTemp >> 16;
|
||||
ulRxBytes &= usbRX_COUNT_MASK;
|
||||
|
||||
/* With this minimal implementation we are only interested in receiving
|
||||
/* With this minimal implementation we are only interested in receiving
|
||||
setup bytes on the control end point. */
|
||||
if( ( ulRxBytes > 0 ) && ( ulTemp & AT91C_UDP_RXSETUP ) )
|
||||
{
|
||||
@@ -635,11 +635,11 @@ unsigned portLONG ulTemp, ulRxBytes;
|
||||
/* The message now contains the entire state and optional data from
|
||||
the USB interrupt. This can now be posted on the Rx queue ready for
|
||||
processing at the task level. */
|
||||
xTaskWokenByPost = xQueueSendFromISR( xUSBInterruptQueue, &pxMessage, xTaskWokenByPost );
|
||||
xQueueSendFromISR( xUSBInterruptQueue, &pxMessage, &xHigherPriorityTaskWoken );
|
||||
|
||||
/* We may want to switch to the USB task, if this message has made
|
||||
it the highest priority task that is ready to execute. */
|
||||
portEND_SWITCHING_ISR( xTaskWokenByPost );
|
||||
portEND_SWITCHING_ISR( xHigherPriorityTaskWoken );
|
||||
|
||||
/* Clear the AIC ready for the next interrupt. */
|
||||
AT91C_BASE_AIC->AIC_EOICR = 0;
|
||||
@@ -658,7 +658,7 @@ xISRStatus *pxMessage;
|
||||
vInitUSBInterface();
|
||||
portEXIT_CRITICAL();
|
||||
|
||||
/* Process interrupts as they arrive. The ISR takes a snapshot of the
|
||||
/* Process interrupts as they arrive. The ISR takes a snapshot of the
|
||||
interrupt status then posts the information on this queue for processing
|
||||
at the task level. This simple demo implementation only processes
|
||||
a few interrupt sources. */
|
||||
@@ -825,7 +825,7 @@ static void prvProcessEndPoint0Interrupt( xISRStatus *pxMessage )
|
||||
{
|
||||
if( pxMessage->ulCSR0 & AT91C_UDP_RX_DATA_BK0 )
|
||||
{
|
||||
/* We only expect to receive zero length data here as ACK's.
|
||||
/* We only expect to receive zero length data here as ACK's.
|
||||
Set the data pointer to the end of the current Tx packet to
|
||||
ensure we don't send out any more data. */
|
||||
pxCharsForTx.ulNextCharIndex = pxCharsForTx.ulTotalDataLength;
|
||||
@@ -910,9 +910,9 @@ static void prvProcessEndPoint0Interrupt( xISRStatus *pxMessage )
|
||||
xRequest.usLength <<= 8;
|
||||
xRequest.usLength |= pxMessage->ucFifoData[ usbLENGTH_LOW_BYTE ];
|
||||
|
||||
/* Manipulate the ucRequestType and the ucRequest parameters to
|
||||
generate a zero based request selection. This is just done to
|
||||
break up the requests into subsections for clarity. The
|
||||
/* Manipulate the ucRequestType and the ucRequest parameters to
|
||||
generate a zero based request selection. This is just done to
|
||||
break up the requests into subsections for clarity. The
|
||||
alternative would be to have more huge switch statement that would
|
||||
be difficult to optimise. */
|
||||
ucRequest = ( ( xRequest.ucReqType & 0x60 ) >> 3 );
|
||||
@@ -1040,8 +1040,8 @@ unsigned portSHORT usStatus = 0;
|
||||
|
||||
case usbSET_CONFIGURATION_REQUEST:
|
||||
|
||||
/* Acknowledge the SET_CONFIGURATION, but (according to the manual)
|
||||
we cannot actually move to the configured state until we get a
|
||||
/* Acknowledge the SET_CONFIGURATION, but (according to the manual)
|
||||
we cannot actually move to the configured state until we get a
|
||||
TXCOMP interrupt from this NULL packet. Therefore we just remember the
|
||||
config and set our state so we know we have received the go ahead. */
|
||||
ucUSBConfig = ( unsigned portCHAR ) ( pxRequest->usValue & 0xff );
|
||||
@@ -1109,7 +1109,7 @@ unsigned portSHORT usStatus = 0;
|
||||
break;
|
||||
|
||||
case usbGET_DESCRIPTOR_REQUEST:
|
||||
prvGetStandardInterfaceDescriptor( pxRequest );
|
||||
prvGetStandardInterfaceDescriptor( pxRequest );
|
||||
break;
|
||||
|
||||
/* This minimal implementation does not respond to these. */
|
||||
@@ -1130,7 +1130,7 @@ static void prvHandleStandardEndPointRequest( xUSB_REQUEST *pxRequest )
|
||||
{
|
||||
/* This minimal implementation does not expect to respond to these. */
|
||||
case usbGET_STATUS_REQUEST:
|
||||
case usbCLEAR_FEATURE_REQUEST:
|
||||
case usbCLEAR_FEATURE_REQUEST:
|
||||
case usbSET_FEATURE_REQUEST:
|
||||
|
||||
default:
|
||||
@@ -1164,7 +1164,7 @@ volatile unsigned portLONG ulTemp;
|
||||
/* Setup the PIO for the USB pull up resistor. */
|
||||
AT91F_PIO_CfgOutput(AT91C_BASE_PIOA,AT91C_PIO_PA16);
|
||||
|
||||
/* Start without the pullup - this will get set at the end of this
|
||||
/* Start without the pullup - this will get set at the end of this
|
||||
function. */
|
||||
AT91F_PIO_SetOutput( AT91C_BASE_PIOA, AT91C_PIO_PA16 );
|
||||
|
||||
@@ -1181,7 +1181,7 @@ volatile unsigned portLONG ulTemp;
|
||||
/* Enable the transceiver. */
|
||||
AT91C_UDP_TRANSCEIVER_ENABLE = 0;
|
||||
|
||||
/* Enable the USB interrupts - other interrupts get enabled as the
|
||||
/* Enable the USB interrupts - other interrupts get enabled as the
|
||||
enumeration process progresses. */
|
||||
AT91F_AIC_ConfigureIt( AT91C_BASE_AIC, AT91C_ID_UDP, usbINTERRUPT_PRIORITY, AT91C_AIC_SRCTYPE_INT_LEVEL_SENSITIVE, ( void (*)( void ) ) vUSBISREntry );
|
||||
AT91F_AIC_EnableIt( AT91C_BASE_AIC, AT91C_ID_UDP );
|
||||
@@ -1201,7 +1201,7 @@ static void prvSendControlData( unsigned portCHAR *pucData, unsigned portSHORT u
|
||||
}
|
||||
else if( ( ulLengthToSend < ( unsigned portLONG ) usRequestedLength ) && lSendingDescriptor )
|
||||
{
|
||||
/* We are sending a descriptor. If the descriptor is an exact
|
||||
/* We are sending a descriptor. If the descriptor is an exact
|
||||
multiple of the FIFO length then it will have to be terminated
|
||||
with a NULL packet. Set the state to indicate this if
|
||||
necessary. */
|
||||
@@ -1218,12 +1218,12 @@ static void prvSendControlData( unsigned portCHAR *pucData, unsigned portSHORT u
|
||||
(if it is greater than 8 bytes in length). */
|
||||
memcpy( pxCharsForTx.ucTxBuffer, pucData, ulLengthToSend );
|
||||
|
||||
/* Reinitialise the buffer index so we start sending from the start of
|
||||
/* Reinitialise the buffer index so we start sending from the start of
|
||||
the data. */
|
||||
pxCharsForTx.ulTotalDataLength = ulLengthToSend;
|
||||
pxCharsForTx.ulNextCharIndex = ( unsigned portLONG ) 0;
|
||||
|
||||
/* Send the first 8 bytes now. The rest will get sent in response to
|
||||
/* Send the first 8 bytes now. The rest will get sent in response to
|
||||
TXCOMP interrupts. */
|
||||
prvSendNextSegment();
|
||||
}
|
||||
@@ -1275,7 +1275,7 @@ volatile unsigned portLONG ulNextLength, ulStatus, ulLengthLeftToSend;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* There is no data to send. If we were sending a descriptor and the
|
||||
/* There is no data to send. If we were sending a descriptor and the
|
||||
descriptor was an exact multiple of the max packet size then we need
|
||||
to send a null to terminate the transmission. */
|
||||
if( eDriverState == eSENDING_EVEN_DESCRIPTOR )
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
FreeRTOS.org V4.8.0 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
FreeRTOS.org V4.8.0 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
|
||||
@@ -218,7 +218,7 @@ __arm void vSerialISR( void )
|
||||
{
|
||||
unsigned portLONG ulStatus;
|
||||
signed portCHAR cChar;
|
||||
portBASE_TYPE xTaskWokenByTx = pdFALSE, xTaskWokenByPost = pdFALSE;
|
||||
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
|
||||
|
||||
/* What caused the interrupt? */
|
||||
ulStatus = serCOM0->US_CSR &= serCOM0->US_IMR;
|
||||
@@ -227,7 +227,7 @@ portBASE_TYPE xTaskWokenByTx = pdFALSE, xTaskWokenByPost = pdFALSE;
|
||||
{
|
||||
/* The interrupt was caused by the THR becoming empty. Are there any
|
||||
more characters to transmit? */
|
||||
if( xQueueReceiveFromISR( xCharsForTx, &cChar, &xTaskWokenByTx ) == pdTRUE )
|
||||
if( xQueueReceiveFromISR( xCharsForTx, &cChar, &xHigherPriorityTaskWoken ) == pdTRUE )
|
||||
{
|
||||
/* A character was retrieved from the queue so can be sent to the
|
||||
THR now. */
|
||||
@@ -246,12 +246,12 @@ portBASE_TYPE xTaskWokenByTx = pdFALSE, xTaskWokenByPost = pdFALSE;
|
||||
character from the RHR and place it in the queue or received
|
||||
characters. */
|
||||
cChar = serCOM0->US_RHR;
|
||||
xTaskWokenByPost = xQueueSendFromISR( xRxedChars, &cChar, xTaskWokenByPost );
|
||||
xQueueSendFromISR( xRxedChars, &cChar, &xHigherPriorityTaskWoken );
|
||||
}
|
||||
|
||||
/* If a task was woken by either a character being received or a character
|
||||
being transmitted then we may need to switch to another task. */
|
||||
portEND_SWITCHING_ISR( ( xTaskWokenByPost || xTaskWokenByTx ) );
|
||||
portEND_SWITCHING_ISR( xHigherPriorityTaskWoken );
|
||||
|
||||
/* End the interrupt in the AIC. */
|
||||
AT91C_BASE_AIC->AIC_EOICR = 0;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
FreeRTOS.org V4.8.0 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# FreeRTOS.org V4.8.0 - Copyright (C) 2003-2008 Richard Barry.
|
||||
# FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.
|
||||
#
|
||||
# This file is part of the FreeRTOS.org distribution.
|
||||
#
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
FreeRTOS.org V4.8.0 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
FreeRTOS.org V4.8.0 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
FreeRTOS.org V4.8.0 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
FreeRTOS.org V4.8.0 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
|
||||
@@ -99,7 +99,7 @@ extern xQueueHandle xUSBInterruptQueue;
|
||||
|
||||
void vUSB_ISR_Handler( void )
|
||||
{
|
||||
portBASE_TYPE xTaskWokenByPost = pdFALSE;
|
||||
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
|
||||
static volatile unsigned portLONG ulNextMessage = 0;
|
||||
xISRStatus *pxMessage;
|
||||
unsigned portLONG ulTemp, ulRxBytes;
|
||||
@@ -163,11 +163,11 @@ unsigned portLONG ulTemp, ulRxBytes;
|
||||
/* The message now contains the entire state and optional data from
|
||||
the USB interrupt. This can now be posted on the Rx queue ready for
|
||||
processing at the task level. */
|
||||
xTaskWokenByPost = xQueueSendFromISR( xUSBInterruptQueue, &pxMessage, xTaskWokenByPost );
|
||||
xQueueSendFromISR( xUSBInterruptQueue, &pxMessage, &xHigherPriorityTaskWoken );
|
||||
|
||||
/* We may want to switch to the USB task, if this message has made
|
||||
it the highest priority task that is ready to execute. */
|
||||
if( xTaskWokenByPost )
|
||||
if( xHigherPriorityTaskWoken )
|
||||
{
|
||||
portYIELD_FROM_ISR();
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
FreeRTOS.org V4.8.0 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
FreeRTOS.org V4.8.0 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
|
||||
@@ -71,7 +71,7 @@ void vPassEMACSemaphore( xSemaphoreHandle xSemaphore )
|
||||
void vEMACISR_Handler( void )
|
||||
{
|
||||
volatile unsigned portLONG ulIntStatus, ulRxStatus;
|
||||
portBASE_TYPE xSwitchRequired = pdFALSE;
|
||||
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
|
||||
|
||||
ulIntStatus = AT91C_BASE_EMAC->EMAC_ISR;
|
||||
ulRxStatus = AT91C_BASE_EMAC->EMAC_RSR;
|
||||
@@ -80,7 +80,7 @@ portBASE_TYPE xSwitchRequired = pdFALSE;
|
||||
{
|
||||
/* A frame has been received, signal the uIP task so it can process
|
||||
the Rx descriptors. */
|
||||
xSwitchRequired = xSemaphoreGiveFromISR( xEMACSemaphore, pdFALSE );
|
||||
xSemaphoreGiveFromISR( xEMACSemaphore, &xHigherPriorityTaskWoken );
|
||||
AT91C_BASE_EMAC->EMAC_RSR = AT91C_EMAC_REC;
|
||||
}
|
||||
|
||||
@@ -88,7 +88,7 @@ portBASE_TYPE xSwitchRequired = pdFALSE;
|
||||
AT91C_BASE_AIC->AIC_EOICR = 0;
|
||||
|
||||
/* Switch to the uIP task. */
|
||||
if( xSwitchRequired )
|
||||
if( xHigherPriorityTaskWoken )
|
||||
{
|
||||
/* If a task of higher priority than the interrupted task was
|
||||
unblocked by the ISR then this call will ensure that the
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
FreeRTOS.org V4.8.0 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
FreeRTOS.org V4.8.0 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
FreeRTOS.org V4.8.0 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
FreeRTOS.org V4.8.0 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
|
||||
@@ -75,6 +75,7 @@
|
||||
#define configUSE_TRACE_FACILITY 0
|
||||
#define configUSE_16_BIT_TICKS 0
|
||||
#define configIDLE_SHOULD_YIELD 1
|
||||
#define configQUEUE_REGISTRY_SIZE 0
|
||||
|
||||
/* Co-routine definitions. */
|
||||
#define configUSE_CO_ROUTINES 0
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# FreeRTOS.org V4.8.0 - Copyright (C) 2003-2008 Richard Barry.
|
||||
# FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.
|
||||
#
|
||||
# This file is part of the FreeRTOS.org distribution.
|
||||
#
|
||||
@@ -44,7 +44,7 @@ WARNINGS=-Wall -Wextra -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-align
|
||||
#
|
||||
CFLAGS=$(WARNINGS) -D $(RUN_MODE) -D GCC_ARM7 -I. -I../../Source/include \
|
||||
-I../Common/include $(DEBUG) -mcpu=arm7tdmi -T$(LDSCRIPT) \
|
||||
$(OPTIM) -fomit-frame-pointer
|
||||
$(OPTIM) -fomit-frame-pointer -fno-strict-aliasing
|
||||
|
||||
ifeq ($(USE_THUMB_MODE),YES)
|
||||
CFLAGS += -mthumb-interwork -D THUMB_INTERWORK
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
FreeRTOS.org V4.8.0 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
FreeRTOS.org V4.8.0 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
FreeRTOS.org V4.8.0 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
FreeRTOS.org V4.8.0 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
|
||||
@@ -136,7 +136,7 @@ void vUART_ISR_Wrapper( void )
|
||||
void vUART_ISR_Handler( void )
|
||||
{
|
||||
signed portCHAR cChar;
|
||||
portBASE_TYPE xTaskWokenByTx = pdFALSE, xTaskWokenByRx = pdFALSE;
|
||||
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
|
||||
|
||||
/* What caused the interrupt? */
|
||||
switch( UART0_IIR & serINTERRUPT_SOURCE_MASK )
|
||||
@@ -147,7 +147,7 @@ portBASE_TYPE xTaskWokenByTx = pdFALSE, xTaskWokenByRx = pdFALSE;
|
||||
|
||||
case serSOURCE_THRE : /* The THRE is empty. If there is another
|
||||
character in the Tx queue, send it now. */
|
||||
if( xQueueReceiveFromISR( xCharsForTx, &cChar, &xTaskWokenByTx ) == pdTRUE )
|
||||
if( xQueueReceiveFromISR( xCharsForTx, &cChar, &xHigherPriorityTaskWoken ) == pdTRUE )
|
||||
{
|
||||
UART0_THR = cChar;
|
||||
}
|
||||
@@ -164,17 +164,14 @@ portBASE_TYPE xTaskWokenByTx = pdFALSE, xTaskWokenByRx = pdFALSE;
|
||||
case serSOURCE_RX : /* A character was received. Place it in
|
||||
the queue of received characters. */
|
||||
cChar = UART0_RBR;
|
||||
if( xQueueSendFromISR( xRxedChars, &cChar, ( portBASE_TYPE ) pdFALSE ) )
|
||||
{
|
||||
xTaskWokenByRx = pdTRUE;
|
||||
}
|
||||
xQueueSendFromISR( xRxedChars, &cChar, &xHigherPriorityTaskWoken );
|
||||
break;
|
||||
|
||||
default : /* There is nothing to do, leave the ISR. */
|
||||
break;
|
||||
}
|
||||
|
||||
if( xTaskWokenByTx || xTaskWokenByRx )
|
||||
if( xHigherPriorityTaskWoken )
|
||||
{
|
||||
portYIELD_FROM_ISR();
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
FreeRTOS.org V4.8.0 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
FreeRTOS.org V4.8.0 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
FreeRTOS.org V4.8.0 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
FreeRTOS.org V4.8.0 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
|
||||
@@ -257,7 +257,7 @@ signed portBASE_TYPE xReturn;
|
||||
__arm void vSerialISR( void )
|
||||
{
|
||||
signed portCHAR cChar;
|
||||
portBASE_TYPE xTaskWokenByRx = pdFALSE, xTaskWokenByTx = pdFALSE;
|
||||
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
|
||||
|
||||
/* What caused the interrupt? */
|
||||
switch( U0IIR & serINTERRUPT_SOURCE_MASK )
|
||||
@@ -268,7 +268,7 @@ portBASE_TYPE xTaskWokenByRx = pdFALSE, xTaskWokenByTx = pdFALSE;
|
||||
|
||||
case serSOURCE_THRE : /* The THRE is empty. If there is another
|
||||
character in the Tx queue, send it now. */
|
||||
if( xQueueReceiveFromISR( xCharsForTx, &cChar, &xTaskWokenByTx ) == pdTRUE )
|
||||
if( xQueueReceiveFromISR( xCharsForTx, &cChar, &xHigherPriorityTaskWoken ) == pdTRUE )
|
||||
{
|
||||
U0THR = cChar;
|
||||
}
|
||||
@@ -285,10 +285,7 @@ portBASE_TYPE xTaskWokenByRx = pdFALSE, xTaskWokenByTx = pdFALSE;
|
||||
case serSOURCE_RX : /* A character was received. Place it in
|
||||
the queue of received characters. */
|
||||
cChar = U0RBR;
|
||||
if( xQueueSendFromISR( xRxedChars, &cChar, pdFALSE ) )
|
||||
{
|
||||
xTaskWokenByRx = pdTRUE;
|
||||
}
|
||||
xQueueSendFromISR( xRxedChars, &cChar, &xHigherPriorityTaskWoken );
|
||||
break;
|
||||
|
||||
default : /* There is nothing to do, leave the ISR. */
|
||||
@@ -297,7 +294,7 @@ portBASE_TYPE xTaskWokenByRx = pdFALSE, xTaskWokenByTx = pdFALSE;
|
||||
|
||||
/* Exit the ISR. If a task was woken by either a character being received
|
||||
or transmitted then a context switch will occur. */
|
||||
portEND_SWITCHING_ISR( ( xTaskWokenByTx || xTaskWokenByRx ) );
|
||||
portEND_SWITCHING_ISR( xHigherPriorityTaskWoken );
|
||||
|
||||
/* Clear the ISR in the VIC. */
|
||||
VICVectAddr = serCLEAR_VIC_INTERRUPT;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
FreeRTOS.org V4.8.0 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
FreeRTOS.org V4.8.0 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
FreeRTOS.org V4.8.0 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
FreeRTOS.org V4.8.0 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
FreeRTOS.org V4.8.0 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
|
||||
@@ -120,10 +120,9 @@ void vUART_ISR( void ) __task
|
||||
|
||||
/* Now we can declare the local variables. */
|
||||
static signed portCHAR cChar;
|
||||
static portBASE_TYPE xTaskWokenByRx, xTaskWokenByTx;
|
||||
static portBASE_TYPE xHigherPriorityTaskWoken;
|
||||
|
||||
xTaskWokenByTx = pdFALSE;
|
||||
xTaskWokenByRx = pdFALSE;
|
||||
xHigherPriorityTaskWoken = pdFALSE;
|
||||
|
||||
/* What caused the interrupt? */
|
||||
switch( U0IIR & serINTERRUPT_SOURCE_MASK )
|
||||
@@ -134,7 +133,7 @@ void vUART_ISR( void ) __task
|
||||
|
||||
case serSOURCE_THRE : /* The THRE is empty. If there is another
|
||||
character in the Tx queue, send it now. */
|
||||
if( xQueueReceiveFromISR( xCharsForTx, &cChar, &xTaskWokenByTx ) == pdTRUE )
|
||||
if( xQueueReceiveFromISR( xCharsForTx, &cChar, &xHigherPriorityTaskWoken ) == pdTRUE )
|
||||
{
|
||||
U0THR = cChar;
|
||||
}
|
||||
@@ -151,10 +150,7 @@ void vUART_ISR( void ) __task
|
||||
case serSOURCE_RX : /* A character was received. Place it in
|
||||
the queue of received characters. */
|
||||
cChar = U0RBR;
|
||||
if( xQueueSendFromISR( xRxedChars, &cChar, pdFALSE ) )
|
||||
{
|
||||
xTaskWokenByRx = pdTRUE;
|
||||
}
|
||||
xQueueSendFromISR( xRxedChars, &cChar, &xHigherPriorityTaskWoken );
|
||||
break;
|
||||
|
||||
default : /* There is nothing to do, leave the ISR. */
|
||||
@@ -166,7 +162,7 @@ void vUART_ISR( void ) __task
|
||||
|
||||
/* Exit the ISR. If a task was woken by either a character being received
|
||||
or transmitted then a context switch will occur. */
|
||||
portEXIT_SWITCHING_ISR( ( xTaskWokenByTx || xTaskWokenByRx ) );
|
||||
portEXIT_SWITCHING_ISR( xHigherPriorityTaskWoken );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
FreeRTOS.org V4.8.0 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
FreeRTOS.org V4.8.0 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
FreeRTOS.org V4.8.0 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
|
||||
@@ -64,8 +64,11 @@ void vButtonHandler( void );
|
||||
void vButtonHandler( void )
|
||||
{
|
||||
extern xSemaphoreHandle xButtonSemaphore;
|
||||
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
|
||||
|
||||
if( xSemaphoreGiveFromISR( xButtonSemaphore, pdFALSE ) )
|
||||
xSemaphoreGiveFromISR( xButtonSemaphore, &xHigherPriorityTaskWoken );
|
||||
|
||||
if( xHigherPriorityTaskWoken )
|
||||
{
|
||||
/* We have woken a task. Calling "yield from ISR" here will ensure
|
||||
the interrupt returns to the woken task if it has a priority higher
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# FreeRTOS.org V4.8.0 - Copyright (C) 2003-2008 Richard Barry.
|
||||
# FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.
|
||||
#
|
||||
# This file is part of the FreeRTOS.org distribution.
|
||||
#
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
FreeRTOS.org V4.8.0 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
FreeRTOS.org V4.8.0 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
|
||||
@@ -176,6 +176,7 @@ void vApplicationTickHook( void )
|
||||
unsigned portBASE_TYPE uxColumn = 0;
|
||||
static xLCDMessage xMessage = { 0, "PASS" };
|
||||
static unsigned portLONG ulTicksSinceLastDisplay = 0;
|
||||
static portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
|
||||
|
||||
/* Called from every tick interrupt. Have enough ticks passed to make it
|
||||
time to perform our health status check again? */
|
||||
@@ -214,7 +215,8 @@ static unsigned portLONG ulTicksSinceLastDisplay = 0;
|
||||
xMessage.xColumn++;
|
||||
|
||||
/* Send the message to the LCD gatekeeper for display. */
|
||||
xQueueSendToBackFromISR( xLCDQueue, &xMessage, pdFALSE );
|
||||
xHigherPriorityTaskWoken = pdFALSE;
|
||||
xQueueSendToBackFromISR( xLCDQueue, &xMessage, &xHigherPriorityTaskWoken );
|
||||
}
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
@@ -13,14 +13,16 @@ extern xSemaphoreHandle xEMACSemaphore;
|
||||
|
||||
void vEMAC_ISR_Handler( void )
|
||||
{
|
||||
portBASE_TYPE xSwitchRequired = pdFALSE;
|
||||
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
|
||||
|
||||
/* Clear the interrupt. */
|
||||
MAC_INTCLEAR = 0xffff;
|
||||
VICVectAddr = 0;
|
||||
|
||||
/* Ensure the uIP task is not blocked as data has arrived. */
|
||||
if( xSemaphoreGiveFromISR( xEMACSemaphore, pdFALSE ) )
|
||||
xSemaphoreGiveFromISR( xEMACSemaphore, &xHigherPriorityTaskWoken );
|
||||
|
||||
if( xHigherPriorityTaskWoken )
|
||||
{
|
||||
/* Giving the semaphore woke a task. */
|
||||
portYIELD_FROM_ISR();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
FreeRTOS.org V4.8.0 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
FreeRTOS.org V4.8.0 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
FreeRTOS.org V4.8.0 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
|
||||
|
||||
@@ -13,12 +13,16 @@ extern xSemaphoreHandle xEMACSemaphore;
|
||||
|
||||
void vEMAC_ISR_Handler( void )
|
||||
{
|
||||
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
|
||||
|
||||
/* Clear the interrupt. */
|
||||
IntClear = 0xffff;
|
||||
VICVectAddr = 0;
|
||||
|
||||
/* Ensure the uIP task is not blocked as data has arrived. */
|
||||
if( xSemaphoreGiveFromISR( xEMACSemaphore, pdFALSE ) )
|
||||
xSemaphoreGiveFromISR( xEMACSemaphore, &xHigherPriorityTaskWoken );
|
||||
|
||||
if( xHigherPriorityTaskWoken )
|
||||
{
|
||||
/* If the uIP task was unblocked then calling "Yield from ISR" here
|
||||
will ensure the interrupt returns directly to the uIP task, if it
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
FreeRTOS.org V4.8.0 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
FreeRTOS.org V4.8.0 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
FreeRTOS.org V4.8.0 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
FreeRTOS.org V4.8.0 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
FreeRTOS.org V4.8.0 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
|
||||
@@ -213,7 +213,7 @@ __arm void vSerialISR( void )
|
||||
{
|
||||
unsigned portSHORT usStatus;
|
||||
signed portCHAR cChar;
|
||||
portBASE_TYPE xTaskWokenByTx = pdFALSE, xTaskWokenByPost = pdFALSE;
|
||||
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
|
||||
|
||||
/* What caused the interrupt? */
|
||||
usStatus = UART_FlagStatus( UART0 );
|
||||
@@ -222,7 +222,7 @@ portBASE_TYPE xTaskWokenByTx = pdFALSE, xTaskWokenByPost = pdFALSE;
|
||||
{
|
||||
/* The interrupt was caused by the THR becoming empty. Are there any
|
||||
more characters to transmit? */
|
||||
if( xQueueReceiveFromISR( xCharsForTx, &cChar, &xTaskWokenByTx ) == pdTRUE )
|
||||
if( xQueueReceiveFromISR( xCharsForTx, &cChar, &xHigherPriorityTaskWoken ) == pdTRUE )
|
||||
{
|
||||
/* A character was retrieved from the queue so can be sent to the
|
||||
THR now. */
|
||||
@@ -241,12 +241,12 @@ portBASE_TYPE xTaskWokenByTx = pdFALSE, xTaskWokenByPost = pdFALSE;
|
||||
character from the RHR and place it in the queue of received
|
||||
characters. */
|
||||
cChar = UART0->RxBUFR;
|
||||
xTaskWokenByPost = xQueueSendFromISR( xRxedChars, &cChar, xTaskWokenByPost );
|
||||
xQueueSendFromISR( xRxedChars, &cChar, &xHigherPriorityTaskWoken );
|
||||
}
|
||||
|
||||
/* If a task was woken by either a character being received or a character
|
||||
being transmitted then we may need to switch to another task. */
|
||||
portEND_SWITCHING_ISR( ( xTaskWokenByPost || xTaskWokenByTx ) );
|
||||
portEND_SWITCHING_ISR( xHigherPriorityTaskWoken );
|
||||
|
||||
/* End the interrupt in the EIC. */
|
||||
portCLEAR_EIC();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
FreeRTOS.org V4.8.0 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
FreeRTOS.org V4.8.0 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
FreeRTOS.org V4.8.0 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
FreeRTOS.org V4.8.0 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
FreeRTOS.org V4.8.0 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
|
||||
@@ -77,7 +77,7 @@ void vConfigureQueues( xQueueHandle xQForRx, xQueueHandle xQForTx, portBASE_TYPE
|
||||
void vSerialISR( void )
|
||||
{
|
||||
signed portCHAR cChar;
|
||||
portBASE_TYPE xTaskWokenByTx = pdFALSE, xTaskWokenByPost = pdFALSE;
|
||||
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
|
||||
|
||||
do
|
||||
{
|
||||
@@ -85,7 +85,7 @@ portBASE_TYPE xTaskWokenByTx = pdFALSE, xTaskWokenByPost = pdFALSE;
|
||||
{
|
||||
/* The interrupt was caused by the THR becoming empty. Are there any
|
||||
more characters to transmit? */
|
||||
if( xQueueReceiveFromISR( xCharsForTx, &cChar, &xTaskWokenByTx ) == pdTRUE )
|
||||
if( xQueueReceiveFromISR( xCharsForTx, &cChar, &xHigherPriorityTaskWoken ) == pdTRUE )
|
||||
{
|
||||
/* A character was retrieved from the queue so can be sent to the
|
||||
THR now. */
|
||||
@@ -105,14 +105,14 @@ portBASE_TYPE xTaskWokenByTx = pdFALSE, xTaskWokenByPost = pdFALSE;
|
||||
character from the RHR and place it in the queue of received
|
||||
characters. */
|
||||
cChar = UART0->DR;
|
||||
xTaskWokenByPost = xQueueSendFromISR( xRxedChars, &cChar, xTaskWokenByPost );
|
||||
xQueueSendFromISR( xRxedChars, &cChar, &xHigherPriorityTaskWoken );
|
||||
UART_ClearITPendingBit( UART0, UART_IT_Receive );
|
||||
}
|
||||
} while( UART0->MIS );
|
||||
|
||||
/* If a task was woken by either a character being received or a character
|
||||
being transmitted then we may need to switch to another task. */
|
||||
portEND_SWITCHING_ISR( ( xTaskWokenByPost || xTaskWokenByTx ) );
|
||||
portEND_SWITCHING_ISR( xHigherPriorityTaskWoken );
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
FreeRTOS.org V4.8.0 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
FreeRTOS.org V4.8.0 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
FreeRTOS.org V4.8.0 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
FreeRTOS.org V4.8.0 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
|
||||
@@ -235,7 +235,7 @@ void vSerialClose( xComPortHandle xPort )
|
||||
__arm void vSerialISR( void )
|
||||
{
|
||||
signed portCHAR cChar;
|
||||
portBASE_TYPE xTaskWokenByTx = pdFALSE, xTaskWokenByPost = pdFALSE;
|
||||
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
|
||||
|
||||
do
|
||||
{
|
||||
@@ -243,7 +243,7 @@ portBASE_TYPE xTaskWokenByTx = pdFALSE, xTaskWokenByPost = pdFALSE;
|
||||
{
|
||||
/* The interrupt was caused by the THR becoming empty. Are there any
|
||||
more characters to transmit? */
|
||||
if( xQueueReceiveFromISR( xCharsForTx, &cChar, &xTaskWokenByTx ) == pdTRUE )
|
||||
if( xQueueReceiveFromISR( xCharsForTx, &cChar, &xHigherPriorityTaskWoken ) == pdTRUE )
|
||||
{
|
||||
/* A character was retrieved from the queue so can be sent to the
|
||||
THR now. */
|
||||
@@ -263,14 +263,14 @@ portBASE_TYPE xTaskWokenByTx = pdFALSE, xTaskWokenByPost = pdFALSE;
|
||||
character from the RHR and place it in the queue of received
|
||||
characters. */
|
||||
cChar = UART0->DR;
|
||||
xTaskWokenByPost = xQueueSendFromISR( xRxedChars, &cChar, xTaskWokenByPost );
|
||||
xQueueSendFromISR( xRxedChars, &cChar, &xHigherPriorityTaskWoken );
|
||||
UART_ClearITPendingBit( UART0, UART_IT_Receive );
|
||||
}
|
||||
} while( UART0->MIS );
|
||||
|
||||
/* If a task was woken by either a character being received or a character
|
||||
being transmitted then we may need to switch to another task. */
|
||||
portEND_SWITCHING_ISR( ( xTaskWokenByPost || xTaskWokenByTx ) );
|
||||
portEND_SWITCHING_ISR( xHigherPriorityTaskWoken );
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
FreeRTOS.org V4.8.0 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
FreeRTOS.org V4.8.0 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
|
||||
@@ -415,16 +415,16 @@ ethernetif_init(struct netif *netif)
|
||||
|
||||
void ENET_IRQHandler(void)
|
||||
{
|
||||
portBASE_TYPE xSwitchRequired;
|
||||
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
|
||||
|
||||
/* Give the semaphore in case the lwIP task needs waking. */
|
||||
xSwitchRequired = xSemaphoreGiveFromISR( s_xSemaphore, pdFALSE );
|
||||
xSemaphoreGiveFromISR( s_xSemaphore, &xHigherPriorityTaskWoken );
|
||||
|
||||
/* Clear the interrupt. */
|
||||
ENET_DMA->ISR = DMI_RX_CURRENT_DONE;
|
||||
|
||||
/* Switch tasks if necessary. */
|
||||
portEND_SWITCHING_ISR( xSwitchRequired );
|
||||
portEND_SWITCHING_ISR( xHigherPriorityTaskWoken );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
FreeRTOS.org V4.8.0 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
FreeRTOS.org V4.8.0 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.
|
||||
|
||||
This file is part of the FreeRTOS distribution.
|
||||
|
||||
@@ -270,7 +270,7 @@ void vSerialClose( xComPortHandle xPort )
|
||||
void UART1_IRQHandler( void )
|
||||
{
|
||||
signed portCHAR cChar;
|
||||
portBASE_TYPE xTaskWokenByTx = pdFALSE, xTaskWokenByPost = pdFALSE;
|
||||
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
|
||||
|
||||
while( UART1->RIS & mainRXRIS )
|
||||
{
|
||||
@@ -278,7 +278,7 @@ portBASE_TYPE xTaskWokenByTx = pdFALSE, xTaskWokenByPost = pdFALSE;
|
||||
character from the DR and place it in the queue of received
|
||||
characters. */
|
||||
cChar = UART1->DR;
|
||||
xTaskWokenByPost = xQueueSendFromISR( xRxedChars, &cChar, xTaskWokenByPost );
|
||||
xQueueSendFromISR( xRxedChars, &cChar, &xHigherPriorityTaskWoken );
|
||||
}
|
||||
|
||||
if( UART1->RIS & mainTXRIS )
|
||||
@@ -287,7 +287,7 @@ portBASE_TYPE xTaskWokenByTx = pdFALSE, xTaskWokenByPost = pdFALSE;
|
||||
{
|
||||
/* This interrupt was caused by space becoming available on the Tx
|
||||
FIFO, wake any task that is waiting to post (if any). */
|
||||
xTaskWokenByTx = xSemaphoreGiveFromISR( xTxFIFOSemaphore, xTaskWokenByTx );
|
||||
xSemaphoreGiveFromISR( xTxFIFOSemaphore, &xHigherPriorityTaskWoken );
|
||||
lTaskWaiting = pdFALSE;
|
||||
}
|
||||
|
||||
@@ -296,7 +296,7 @@ portBASE_TYPE xTaskWokenByTx = pdFALSE, xTaskWokenByPost = pdFALSE;
|
||||
|
||||
/* If a task was woken by either a character being received or a character
|
||||
being transmitted then we may need to switch to another task. */
|
||||
portEND_SWITCHING_ISR( ( xTaskWokenByPost || xTaskWokenByTx ) );
|
||||
portEND_SWITCHING_ISR( xHigherPriorityTaskWoken );
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
FreeRTOS.org V4.8.0 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
|
||||
@@ -297,16 +297,16 @@ static unsigned portCHAR *pcTxData;
|
||||
|
||||
void ENET_IRQHandler(void)
|
||||
{
|
||||
portBASE_TYPE xSwitchRequired;
|
||||
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
|
||||
|
||||
/* Give the semaphore in case the uIP task needs waking. */
|
||||
xSwitchRequired = xSemaphoreGiveFromISR( xSemaphore, pdFALSE );
|
||||
xSemaphoreGiveFromISR( xSemaphore, &xHigherPriorityTaskWoken );
|
||||
|
||||
/* Clear the interrupt. */
|
||||
ENET_DMA->ISR = uipDMI_RX_CURRENT_DONE;
|
||||
|
||||
/* Switch tasks if necessary. */
|
||||
portEND_SWITCHING_ISR( xSwitchRequired );
|
||||
portEND_SWITCHING_ISR( xHigherPriorityTaskWoken );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
"C:\Devtools\IAR Systems\Embedded Workbench 4.0\common\bin\cspybat" "C:\Devtools\IAR Systems\Embedded Workbench 4.0\avr32\bin\avr32proc.dll" "C:\Devtools\IAR Systems\Embedded Workbench 4.0\avr32\bin\avr32jtagicemkII.dll" %1 --plugin "C:\Devtools\IAR Systems\Embedded Workbench 4.0\avr32\bin\<libsupport_plugin>" --backend -B "--core" "avr32a" "--avr32_simd_instructions" "disabled" "--avr32_dsp_instructions" "enabled" "--avr32_rmw_instructions" "enabled" "-p" "C:\Devtools\IAR Systems\Embedded Workbench 4.0\avr32\config\iouc3a0512.ddf" "-d" "jtagicemkII" "--drv_communication" "USB" "--jtagice_clock" "100000"
|
||||
|
||||
|
||||
@REM loaded plugins:
|
||||
@REM Loaded plugins:
|
||||
@REM avr32LibSupport.dll
|
||||
@REM C:\Devtools\IAR Systems\Embedded Workbench 4.0\common\plugins\CodeCoverage\CodeCoverage.dll
|
||||
@REM C:\Devtools\IAR Systems\Embedded Workbench 4.0\common\plugins\Profiling\Profiling.dll
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
FreeRTOS.org V4.8.0 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
|
||||
|
||||
@@ -89,7 +89,7 @@ static portBASE_TYPE prvUSART_ISR_NonNakedBehaviour( void )
|
||||
{
|
||||
/* Now we can declare the local variables. */
|
||||
signed portCHAR cChar;
|
||||
portBASE_TYPE xTaskWokenByTx = pdFALSE, xTaskWokenByRx = pdFALSE;
|
||||
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
|
||||
unsigned portLONG ulStatus;
|
||||
volatile avr32_usart_t *usart = serialPORT_USART;
|
||||
portBASE_TYPE retstatus;
|
||||
@@ -104,7 +104,7 @@ static portBASE_TYPE prvUSART_ISR_NonNakedBehaviour( void )
|
||||
Because FreeRTOS is not supposed to run with nested interrupts, put all OS
|
||||
calls in a critical section . */
|
||||
portENTER_CRITICAL();
|
||||
retstatus = xQueueReceiveFromISR( xCharsForTx, &cChar, &xTaskWokenByTx );
|
||||
retstatus = xQueueReceiveFromISR( xCharsForTx, &cChar, &xHigherPriorityTaskWoken );
|
||||
portEXIT_CRITICAL();
|
||||
|
||||
if (retstatus == pdTRUE)
|
||||
@@ -128,18 +128,13 @@ static portBASE_TYPE prvUSART_ISR_NonNakedBehaviour( void )
|
||||
/* Because FreeRTOS is not supposed to run with nested interrupts, put all OS
|
||||
calls in a critical section . */
|
||||
portENTER_CRITICAL();
|
||||
retstatus = xQueueSendFromISR(xRxedChars, &cChar, pdFALSE);
|
||||
xQueueSendFromISR(xRxedChars, &cChar, &xHigherPriorityTaskWoken);
|
||||
portEXIT_CRITICAL();
|
||||
|
||||
if( retstatus )
|
||||
{
|
||||
xTaskWokenByRx = pdTRUE;
|
||||
}
|
||||
}
|
||||
|
||||
/* The return value will be used by portEXIT_SWITCHING_ISR() to know if it
|
||||
should perform a vTaskSwitchContext(). */
|
||||
return ( xTaskWokenByTx || xTaskWokenByRx );
|
||||
return ( xHigherPriorityTaskWoken );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
FreeRTOS.org V4.8.0 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
FreeRTOS.org V4.8.0 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
FreeRTOS.org V4.8.0 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
FreeRTOS.org V4.8.0 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
FreeRTOS.org V4.8.0 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
FreeRTOS.org V4.8.0 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
|
||||
@@ -181,13 +181,16 @@ unsigned portCHAR ucByte;
|
||||
__interrupt void SIG_UART_RECV( void )
|
||||
{
|
||||
signed portCHAR cChar;
|
||||
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
|
||||
|
||||
/* Get the character and post it on the queue of Rxed characters.
|
||||
If the post causes a task to wake force a context switch as the woken task
|
||||
may have a higher priority than the task we have interrupted. */
|
||||
cChar = UDR;
|
||||
|
||||
if( xQueueSendFromISR( xRxedChars, &cChar, pdFALSE ) )
|
||||
xQueueSendFromISR( xRxedChars, &cChar, &xHigherPriorityTaskWoken );
|
||||
|
||||
if( xHigherPriorityTaskWoken != pdFALSE )
|
||||
{
|
||||
taskYIELD();
|
||||
}
|
||||
@@ -196,7 +199,7 @@ signed portCHAR cChar;
|
||||
|
||||
__interrupt void SIG_UART_DATA( void )
|
||||
{
|
||||
signed portCHAR cChar, cTaskWoken;
|
||||
signed portCHAR cChar, cTaskWoken = pdFALSE;
|
||||
|
||||
if( xQueueReceiveFromISR( xCharsForTx, &cChar, &cTaskWoken ) == pdTRUE )
|
||||
{
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
FreeRTOS.org V4.8.0 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
|
||||
@@ -74,6 +74,7 @@
|
||||
#define configUSE_TRACE_FACILITY 0
|
||||
#define configUSE_16_BIT_TICKS 1
|
||||
#define configIDLE_SHOULD_YIELD 1
|
||||
#define configQUEUE_REGISTRY_SIZE 0
|
||||
|
||||
/* Co-routine definitions. */
|
||||
#define configUSE_CO_ROUTINES 1
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
FreeRTOS.org V4.8.0 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
FreeRTOS.org V4.8.0 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
|
||||
@@ -188,7 +188,7 @@ portSHORT main( void )
|
||||
vStartRegTestTasks();
|
||||
|
||||
/* Create the tasks defined within this file. */
|
||||
xTaskCreate( vErrorChecks, "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );
|
||||
xTaskCreate( vErrorChecks, ( signed portCHAR * ) "Check", configMINIMAL_STACK_SIZE, NULL, mainCHECK_TASK_PRIORITY, NULL );
|
||||
|
||||
/* Create the co-routines that flash the LED's. */
|
||||
vStartFlashCoRoutines( mainNUM_FLASH_COROUTINES );
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
FreeRTOS.org V4.8.0 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
|
||||
@@ -68,8 +68,8 @@ portBASE_TYPE xRegTestError = pdFALSE;
|
||||
|
||||
void vStartRegTestTasks( void )
|
||||
{
|
||||
xTaskCreate( prvRegisterCheck1, "Reg1", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );
|
||||
xTaskCreate( prvRegisterCheck2, "Reg2", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );
|
||||
xTaskCreate( prvRegisterCheck1, ( signed portCHAR * ) "Reg1", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );
|
||||
xTaskCreate( prvRegisterCheck2, ( signed portCHAR * ) "Reg2", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY, NULL );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
FreeRTOS.org V4.8.0 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
FreeRTOS.org V4.8.0 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
|
||||
@@ -210,13 +210,16 @@ unsigned portCHAR ucByte;
|
||||
SIGNAL( SIG_UART_RECV )
|
||||
{
|
||||
signed portCHAR cChar;
|
||||
signed portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
|
||||
|
||||
/* Get the character and post it on the queue of Rxed characters.
|
||||
If the post causes a task to wake force a context switch as the woken task
|
||||
may have a higher priority than the task we have interrupted. */
|
||||
cChar = UDR;
|
||||
|
||||
if( xQueueSendFromISR( xRxedChars, &cChar, pdFALSE ) )
|
||||
xQueueSendFromISR( xRxedChars, &cChar, &xHigherPriorityTaskWoken );
|
||||
|
||||
if( xHigherPriorityTaskWoken != pdFALSE )
|
||||
{
|
||||
taskYIELD();
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
FreeRTOS.org V4.8.0 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
FreeRTOS.org V4.8.0 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
|
||||
@@ -503,7 +503,7 @@ void vUART_ISR(void)
|
||||
{
|
||||
unsigned portLONG ulStatus;
|
||||
portCHAR cRxedChar;
|
||||
portBASE_TYPE xTaskWokenByPost = pdFALSE;
|
||||
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
|
||||
|
||||
/* What caused the interrupt. */
|
||||
ulStatus = UARTIntStatus( UART0_BASE, pdTRUE );
|
||||
@@ -520,7 +520,7 @@ portBASE_TYPE xTaskWokenByPost = pdFALSE;
|
||||
Rxed chars. Posting the character should wake the task that is
|
||||
blocked on the queue waiting for characters. */
|
||||
cRxedChar = ( portCHAR ) HWREG( UART0_BASE + UART_O_DR );
|
||||
xTaskWokenByPost = xQueueSendFromISR( xCommsQueue, &cRxedChar, xTaskWokenByPost );
|
||||
xQueueSendFromISR( xCommsQueue, &cRxedChar, &xHigherPriorityTaskWoken );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -538,14 +538,11 @@ portBASE_TYPE xTaskWokenByPost = pdFALSE;
|
||||
}
|
||||
}
|
||||
|
||||
if( xTaskWokenByPost )
|
||||
{
|
||||
/* If a task was woken by the character being received then we force
|
||||
a context switch to occur in case the task is of higher priority than
|
||||
the currently executing task (i.e. the task that this interrupt
|
||||
interrupted.) */
|
||||
portEND_SWITCHING_ISR( xTaskWokenByPost );
|
||||
}
|
||||
/* If a task was woken by the character being received then we force
|
||||
a context switch to occur in case the task is of higher priority than
|
||||
the currently executing task (i.e. the task that this interrupt
|
||||
interrupted.) */
|
||||
portEND_SWITCHING_ISR( xHigherPriorityTaskWoken );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
FreeRTOS.org V4.8.0 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
FreeRTOS.org V4.8.0 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
FreeRTOS.org V4.8.0 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
FreeRTOS.org V4.8.0 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
FreeRTOS.org V4.8.0 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
|
||||
@@ -503,7 +503,7 @@ void vUART_ISR(void)
|
||||
{
|
||||
unsigned portLONG ulStatus;
|
||||
portCHAR cRxedChar;
|
||||
portBASE_TYPE xTaskWokenByPost = pdFALSE;
|
||||
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
|
||||
|
||||
/* What caused the interrupt. */
|
||||
ulStatus = UARTIntStatus( UART0_BASE, pdTRUE );
|
||||
@@ -520,7 +520,7 @@ portBASE_TYPE xTaskWokenByPost = pdFALSE;
|
||||
Rxed chars. Posting the character should wake the task that is
|
||||
blocked on the queue waiting for characters. */
|
||||
cRxedChar = ( portCHAR ) HWREG( UART0_BASE + UART_O_DR );
|
||||
xTaskWokenByPost = xQueueSendFromISR( xCommsQueue, &cRxedChar, xTaskWokenByPost );
|
||||
xQueueSendFromISR( xCommsQueue, &cRxedChar, &xHigherPriorityTaskWoken );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -538,14 +538,11 @@ portBASE_TYPE xTaskWokenByPost = pdFALSE;
|
||||
}
|
||||
}
|
||||
|
||||
if( xTaskWokenByPost )
|
||||
{
|
||||
/* If a task was woken by the character being received then we force
|
||||
a context switch to occur in case the task is of higher priority than
|
||||
the currently executing task (i.e. the task that this interrupt
|
||||
interrupted.) */
|
||||
portEND_SWITCHING_ISR( xTaskWokenByPost );
|
||||
}
|
||||
/* If a task was woken by the character being received then we force
|
||||
a context switch to occur in case the task is of higher priority than
|
||||
the currently executing task (i.e. the task that this interrupt
|
||||
interrupted.) */
|
||||
portEND_SWITCHING_ISR( xHigherPriorityTaskWoken );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
FreeRTOS.org V4.8.0 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
FreeRTOS.org V4.8.0 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
|
||||
@@ -496,7 +496,7 @@ void vUART_ISR(void)
|
||||
{
|
||||
unsigned portLONG ulStatus;
|
||||
portCHAR cRxedChar;
|
||||
portBASE_TYPE xTaskWokenByPost = pdFALSE;
|
||||
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
|
||||
|
||||
/* What caused the interrupt. */
|
||||
ulStatus = UARTIntStatus( UART0_BASE, pdTRUE );
|
||||
@@ -513,7 +513,7 @@ portBASE_TYPE xTaskWokenByPost = pdFALSE;
|
||||
Rxed chars. Posting the character should wake the task that is
|
||||
blocked on the queue waiting for characters. */
|
||||
cRxedChar = ( portCHAR ) HWREG( UART0_BASE + UART_O_DR );
|
||||
xTaskWokenByPost = xQueueSendFromISR( xCommsQueue, &cRxedChar, xTaskWokenByPost );
|
||||
xQueueSendFromISR( xCommsQueue, &cRxedChar, &xHigherPriorityTaskWoken );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -531,14 +531,11 @@ portBASE_TYPE xTaskWokenByPost = pdFALSE;
|
||||
}
|
||||
}
|
||||
|
||||
if( xTaskWokenByPost )
|
||||
{
|
||||
/* If a task was woken by the character being received then we force
|
||||
a context switch to occur in case the task is of higher priority than
|
||||
the currently executing task (i.e. the task that this interrupt
|
||||
interrupted.) */
|
||||
portEND_SWITCHING_ISR( xTaskWokenByPost );
|
||||
}
|
||||
/* If a task was woken by the character being received then we force
|
||||
a context switch to occur in case the task is of higher priority than
|
||||
the currently executing task (i.e. the task that this interrupt
|
||||
interrupted.) */
|
||||
portEND_SWITCHING_ISR( xHigherPriorityTaskWoken );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
FreeRTOS.org V4.8.0 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
FreeRTOS.org V4.8.0 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
FreeRTOS.org V4.8.0 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
FreeRTOS.org V4.8.0 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
FreeRTOS.org V4.8.0 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
|
||||
@@ -496,7 +496,7 @@ void vUART_ISR(void)
|
||||
{
|
||||
unsigned portLONG ulStatus;
|
||||
portCHAR cRxedChar;
|
||||
portBASE_TYPE xTaskWokenByPost = pdFALSE;
|
||||
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
|
||||
|
||||
/* What caused the interrupt. */
|
||||
ulStatus = UARTIntStatus( UART0_BASE, pdTRUE );
|
||||
@@ -513,7 +513,7 @@ portBASE_TYPE xTaskWokenByPost = pdFALSE;
|
||||
Rxed chars. Posting the character should wake the task that is
|
||||
blocked on the queue waiting for characters. */
|
||||
cRxedChar = ( portCHAR ) HWREG( UART0_BASE + UART_O_DR );
|
||||
xTaskWokenByPost = xQueueSendFromISR( xCommsQueue, &cRxedChar, xTaskWokenByPost );
|
||||
xQueueSendFromISR( xCommsQueue, &cRxedChar, &xHigherPriorityTaskWoken );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -531,14 +531,11 @@ portBASE_TYPE xTaskWokenByPost = pdFALSE;
|
||||
}
|
||||
}
|
||||
|
||||
if( xTaskWokenByPost )
|
||||
{
|
||||
/* If a task was woken by the character being received then we force
|
||||
a context switch to occur in case the task is of higher priority than
|
||||
the currently executing task (i.e. the task that this interrupt
|
||||
interrupted.) */
|
||||
portEND_SWITCHING_ISR( xTaskWokenByPost );
|
||||
}
|
||||
/* If a task was woken by the character being received then we force
|
||||
a context switch to occur in case the task is of higher priority than
|
||||
the currently executing task (i.e. the task that this interrupt
|
||||
interrupted.) */
|
||||
portEND_SWITCHING_ISR( xHigherPriorityTaskWoken );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
FreeRTOS.org V4.8.0 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
FreeRTOS.org V4.8.0 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
FreeRTOS.org V4.8.0 - Copyright (C) 2003-2008 Richard Barry.
|
||||
FreeRTOS.org V5.0.2 - Copyright (C) 2003-2008 Richard Barry.
|
||||
|
||||
This file is part of the FreeRTOS.org distribution.
|
||||
|
||||
@@ -504,7 +504,7 @@ void vUART_ISR(void)
|
||||
{
|
||||
unsigned portLONG ulStatus;
|
||||
portCHAR cRxedChar;
|
||||
portBASE_TYPE xTaskWokenByPost = pdFALSE;
|
||||
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
|
||||
|
||||
/* What caused the interrupt. */
|
||||
ulStatus = UARTIntStatus( UART0_BASE, pdTRUE );
|
||||
@@ -521,7 +521,7 @@ portBASE_TYPE xTaskWokenByPost = pdFALSE;
|
||||
Rxed chars. Posting the character should wake the task that is
|
||||
blocked on the queue waiting for characters. */
|
||||
cRxedChar = ( portCHAR ) HWREG( UART0_BASE + UART_O_DR );
|
||||
xTaskWokenByPost = xQueueSendFromISR( xCommsQueue, &cRxedChar, xTaskWokenByPost );
|
||||
xQueueSendFromISR( xCommsQueue, &cRxedChar, &xHigherPriorityTaskWoken );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -539,14 +539,11 @@ portBASE_TYPE xTaskWokenByPost = pdFALSE;
|
||||
}
|
||||
}
|
||||
|
||||
if( xTaskWokenByPost )
|
||||
{
|
||||
/* If a task was woken by the character being received then we force
|
||||
a context switch to occur in case the task is of higher priority than
|
||||
the currently executing task (i.e. the task that this interrupt
|
||||
interrupted.) */
|
||||
portEND_SWITCHING_ISR( xTaskWokenByPost );
|
||||
}
|
||||
/* If a task was woken by the character being received then we force
|
||||
a context switch to occur in case the task is of higher priority than
|
||||
the currently executing task (i.e. the task that this interrupt
|
||||
interrupted.) */
|
||||
portEND_SWITCHING_ISR( xHigherPriorityTaskWoken );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user