Compare commits

...

113 Commits

Author SHA1 Message Date
Richard Barry
9000f24cd3 made a copy 2008-05-30 17:13:24 +00:00
Richard Barry
1e83961601 Update to V5.0.2 2008-05-30 15:51:35 +00:00
Richard Barry
48eff41955 Update to V5.0.2 2008-05-30 15:49:36 +00:00
Richard Barry
42ebfc5227 Update to V5.0.2 2008-05-30 15:46:57 +00:00
Richard Barry
4fcb98ef1d Update to V5.0.2 2008-05-30 15:44:17 +00:00
Richard Barry
cd38538425 Update to V5.0.2 2008-05-30 15:41:10 +00:00
Richard Barry
90064444af Update to V5.0.2 2008-05-30 15:34:42 +00:00
Richard Barry
6128d1a86e Add new PPC405 demo. 2008-05-25 17:42:25 +00:00
Richard Barry
642a74c5b4 Remove old PPC port. 2008-05-25 17:39:16 +00:00
Richard Barry
ac0630af91 Add -fno-strict-aliasing 2008-05-24 18:57:30 +00:00
Richard Barry
192cc29ebc Add usage of portREMOVE_STATIC_QUALIFIER. 2008-05-24 18:56:04 +00:00
Richard Barry
8ce7a79937 Add usage of portREMOVE_STATIC_QUALIFIER. 2008-05-24 18:52:12 +00:00
Richard Barry
576a25a098 Remove static qualifier from queue registry. 2008-05-24 18:47:38 +00:00
Richard Barry
6391f4160b Tidy up ready for release. 2008-05-24 17:03:23 +00:00
Richard Barry
4154eec4e1 Add queue registry code. 2008-05-23 19:24:05 +00:00
Richard Barry
03a82c5bc8 Add #define configQUEUE_REGISTRY_SIZE 0 2008-05-23 19:22:33 +00:00
Richard Barry
a4d3bf8f5d Add #define configQUEUE_REGISTRY_SIZE 0 2008-05-23 18:52:26 +00:00
Richard Barry
91c26c9868 Fix warnings that the latest GCC version spits out. 2008-05-23 18:51:39 +00:00
Richard Barry
ab37826715 Add in #define configQUEUE_REGISTRY_SIZE 0 2008-05-23 18:50:47 +00:00
Richard Barry
a5f3797949 Add in example vQueueAddToRegistry() calls. 2008-05-23 18:49:59 +00:00
Richard Barry
15881cdf39 Add IntQ tests. 2008-05-23 15:24:23 +00:00
Richard Barry
f689c709ab A little optimisation. 2008-05-23 15:16:25 +00:00
Richard Barry
b6aa1d6ca8 Add STM32 Keil demo. 2008-05-21 17:59:30 +00:00
Richard Barry
a87f9df3d8 ST CM3 drivers. 2008-05-21 17:56:31 +00:00
Richard Barry
bb64640f0a Change compiler optimisation. 2008-05-20 18:31:28 +00:00
Richard Barry
98ebaac850 Change optimisation level. 2008-05-20 18:30:30 +00:00
Richard Barry
b8695fa787 Change optimisation level. 2008-05-20 18:29:10 +00:00
Richard Barry
eb9d172082 Remove compiler warnings. 2008-05-20 18:27:59 +00:00
Richard Barry
0f7c3939e1 Remove compiler warnings. 2008-05-20 18:27:07 +00:00
Richard Barry
9d1b078a8f Remove compiler warnings. 2008-05-20 18:26:09 +00:00
Richard Barry
61a5a25a7f Remove compiler warnings. 2008-05-20 18:25:06 +00:00
Richard Barry
c24a713859 Remove compiler warnings. 2008-05-20 18:24:22 +00:00
Richard Barry
01ce621748 Remove compiler warnings and insert missing return statement. 2008-05-20 18:23:44 +00:00
Richard Barry
b19ede773a Add volatile qualifier to loop counters used to detect stalled tasks. 2008-05-20 05:22:35 +00:00
Richard Barry
bea704342a Ensure emulated flop is not used. 2008-05-20 05:20:25 +00:00
Richard Barry
dd1ef6a777 Remove the critical sections as not all ports can yield from within critical sections. 2008-05-19 19:19:25 +00:00
Richard Barry
2888b15b7e Add signed portBASE_TYPE xTaskIsTaskSuspended( xTaskHandle xTask ); Previously this was a private function. 2008-05-19 19:17:56 +00:00
Richard Barry
5a2790a998 Change the way the critical sections are handled within interrupts so the critical sections can be nested. 2008-05-19 19:16:57 +00:00
Richard Barry
4b9fe1e28a Add signed portBASE_TYPE xTaskIsTaskSuspended( xTaskHandle xTask ); 2008-05-19 19:15:38 +00:00
Richard Barry
fb3b17a37c Update the default macros used for critical sections within ISRs. 2008-05-19 19:12:57 +00:00
Richard Barry
b9b3e521f7 Bug fix - allocate 2 extra words at the bottom of the task stack to account for the back chain and saved LR. 2008-05-19 19:11:08 +00:00
Richard Barry
ecc072e58b Tidy up. 2008-05-18 19:57:01 +00:00
Richard Barry
66fc3b8092 Update to use the kernel critical nesting. 2008-05-18 17:28:30 +00:00
Richard Barry
f3eb5028a3 Add new test file. 2008-05-18 16:25:20 +00:00
Richard Barry
31bda54b75 Add new test file. 2008-05-18 16:23:10 +00:00
Richard Barry
f146124bca Add new test file. 2008-05-18 16:21:59 +00:00
Richard Barry
0965823a67 Update demo to include a test of nesting interrupt accessing queues. 2008-05-18 16:21:12 +00:00
Richard Barry
684b898abc Comment changes only. 2008-05-11 13:44:43 +00:00
Richard Barry
6c275b9ca5 First commit of PPC405 version with floating point included. 2008-05-11 13:43:46 +00:00
Richard Barry
ba90821242 Add in new files for floating point and updates following the installation of the service pack. 2008-05-11 13:28:25 +00:00
Richard Barry
d7e9d4d397 Upgrade hardware version numbers following install of service pack. 2008-05-11 13:25:39 +00:00
Richard Barry
d184cdc09d Added flop files. 2008-05-11 13:24:06 +00:00
Richard Barry
dc897a35dd Added optional inclusion of floating point tasks. 2008-05-11 13:19:05 +00:00
Richard Barry
45fceb4bdd Update to include the option of saving/restoring the floating point context. 2008-05-11 09:15:22 +00:00
Richard Barry
6177c6e4a4 Add in the portSET_INTERRUPT_MASK_FROM_ISR() and portCLEAR_INTERRUPT_MASK_FROM_ISR() default (empty) macros. 2008-05-07 18:02:19 +00:00
Richard Barry
5d27f3ccf7 Add in the portSET_INTERRUPT_MASK_FROM_ISR() and portCLEAR_INTERRUPT_MASK_FROM_ISR() macros. 2008-05-07 18:00:26 +00:00
Richard Barry
676139e920 Raise the priority of the serial interrupt. 2008-05-07 17:59:17 +00:00
Richard Barry
9d0e60493a Move the call to start the high frequency timer to inside a task to ensure it does not trigger before the scheduler has started. 2008-05-07 17:58:20 +00:00
Richard Barry
5a1129c315 Change the timer interrupt to use the kernel interrupt entry/exit macros. 2008-05-07 17:56:45 +00:00
Richard Barry
ad52311deb Remove the syscall calls as this is no longer how a context switch is performed. 2008-05-07 17:55:22 +00:00
Richard Barry
bd44f90e50 Add in the configMAX_SYSCALL_INTERRUPT_PRIORITY constant. 2008-05-07 17:54:21 +00:00
Richard Barry
bafcf8901e Update to allow nesting. 2008-05-06 11:51:13 +00:00
Richard Barry
b7f66b9db6 Add the usual missing -1. 2008-05-05 08:41:25 +00:00
Richard Barry
4304c07ebf Performance improvements. 2008-05-04 20:04:52 +00:00
Richard Barry
0eae0f7549 Add nesting support. 2008-05-04 17:36:23 +00:00
Richard Barry
a9393b891d Remove inline keywords. 2008-05-01 17:16:26 +00:00
Richard Barry
3f620024fc Added code to allow a vTaskPrioritySet() caller to pass in the current TCB as well as NULL to indicate that the priority of the calling task is being changed. 2008-05-01 17:15:36 +00:00
Richard Barry
a918bd9825 Update comments for vTaskSuspendAll() "API functions that have the potential to cause a context switch (for example, vTaskDelayUntil(), xQueueSend(), etc.) must not be called while the scheduler is suspended". 2008-05-01 15:54:04 +00:00
Richard Barry
019ab1b908 Remove inline keyword. 2008-05-01 09:06:26 +00:00
Richard Barry
9c87f922b3 Remove inline keyword. 2008-05-01 08:58:48 +00:00
Richard Barry
0d29807e93 Remove inline keyword. 2008-05-01 08:57:45 +00:00
Richard Barry
b08411ec5a Correct timer calculation. 2008-04-16 16:29:28 +00:00
Richard Barry
d7ca9ad0c3 Correct comments. 2008-04-16 14:26:03 +00:00
Richard Barry
7e529c281f Update to V5.0.0. 2008-04-16 08:00:30 +00:00
Richard Barry
4c8425da01 Update to V5.0.0. 2008-04-16 07:52:16 +00:00
Richard Barry
e939542f32 Update to V5.0.0. 2008-04-16 07:47:02 +00:00
Richard Barry
57a83227d0 Remove incorrect const qualifiers. 2008-04-13 17:03:23 +00:00
Richard Barry
8ffe2b49e8 Minor tidy up. No functional difference. 2008-04-13 16:36:35 +00:00
Richard Barry
98daf5a1b8 Add variable initialisation. Doesn't really make a difference, just neater. 2008-04-13 16:35:15 +00:00
Richard Barry
c95cae5a99 Add variable initialisation. Doesn't really make a difference, just neater. 2008-04-13 16:34:12 +00:00
Richard Barry
dc307b270b Add variable initialisation. Doesn't really make a difference, just neater. 2008-04-13 16:33:30 +00:00
Richard Barry
360d357e15 Add variable initialisation. Doesn't really make a difference, just neater. 2008-04-13 16:32:41 +00:00
Richard Barry
09bfc2d862 Add variable initialisation. Doesn't really make a difference, just neater. 2008-04-13 16:31:43 +00:00
Richard Barry
9cea94ccce Add variable initialisation. Doesn't really make a difference, just neater. 2008-04-13 16:30:29 +00:00
Richard Barry
c1d5690da6 Remove unused assignment. 2008-04-13 16:29:40 +00:00
Richard Barry
7920c29ad1 Update to use new QueueSendFromISR() semantics. 2008-04-13 16:28:17 +00:00
Richard Barry
49c84f0d41 Update to use new xQueueSendFromISR() and xSemaphoreGiveFromISR() function semantics. 2008-04-12 23:45:58 +00:00
Richard Barry
ac58b5b285 Update to use new xQueueSendFromISR() and xSemaphoreGiveFromISR() function semantics. 2008-04-12 23:41:42 +00:00
Richard Barry
8cf6a70c9e Update to use new xQueueSendFromISR() and xSemaphoreGiveFromISR() function semantics. 2008-04-12 23:34:49 +00:00
Richard Barry
c1e9f859c8 Update to use new xQueueSendFromISR() and xSemaphoreGiveFromISR() function semantics. 2008-04-12 23:34:13 +00:00
Richard Barry
f4dd20dffc Update to use new xQueueSendFromISR() and xSemaphoreGiveFromISR() function semantics. 2008-04-12 23:32:18 +00:00
Richard Barry
7eb7201b46 Casting only. 2008-04-12 23:26:44 +00:00
Richard Barry
b24032d4b0 Efficiency improvement. 2008-04-12 23:26:01 +00:00
Richard Barry
a6053582fc Update the sys tick to be more efficient. 2008-04-12 23:25:17 +00:00
Richard Barry
af939eb0a9 Add in the configUSE_APPLICATION_TASK_HOOK macro. 2008-04-12 09:50:30 +00:00
Richard Barry
a9ed428422 Update prototypes and macros for the new xQueueSendFromISR() function and the task hook feature. 2008-04-12 09:48:40 +00:00
Richard Barry
da6d27b627 Introduce the application task hook feature. 2008-04-12 09:46:19 +00:00
Richard Barry
b73dafb1f4 Change the semantics of the xQueueGenericSendFromISR() function. 2008-04-12 09:45:02 +00:00
Richard Barry
2bc9dfa3f8 Ensure the first task starts with interrupts enabled. 2008-04-06 14:42:35 +00:00
Richard Barry
ed543197e0 Ensure the first task starts with interrupts enabled. 2008-04-06 14:41:04 +00:00
Richard Barry
24cb048892 Ensure the first task starts with interrupts enabled. 2008-04-06 14:38:27 +00:00
Richard Barry
ada4744871 Minor changes to the trace macros. 2008-04-06 09:37:26 +00:00
Richard Barry
06e8e93eb5 Added traceTASK_SWITCHED_OUT macro. 2008-04-06 09:36:48 +00:00
Richard Barry
a3677612d2 Corrected SysTick interval calculation. 2008-04-06 09:26:51 +00:00
Richard Barry
2ca3985a8c Corrected SysTick interval calculation. 2008-04-06 09:25:59 +00:00
Richard Barry
7ed94acdff Corrected SysTick interval calculation. 2008-04-06 09:25:00 +00:00
Richard Barry
cfcad6e78a Corrected prototypes for newly added functions that had the 'signed' qualifier missing. 2008-04-06 09:23:58 +00:00
Richard Barry
5cefef5074 2008-04-05 18:10:28 +00:00
Richard Barry
637619dcb7 2008-04-05 15:09:10 +00:00
Richard Barry
d1b9463e29 Changes required to build with the latest Xilinx tools. 2008-03-30 21:18:54 +00:00
Richard Barry
bc7068a690 Add PPC405 port in V10.1 format. 2008-03-30 21:15:19 +00:00
Richard Barry
c2a6dc193e Remove PPC files that are in the EDK V7 format. 2008-03-30 18:41:43 +00:00
Richard Barry
3fd422ff2f Return the lock counts to their original intended behaviour. 2008-03-29 20:50:38 +00:00
726 changed files with 82213 additions and 4250 deletions

View File

@@ -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.

View File

@@ -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

View File

@@ -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.

View File

@@ -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.

View File

@@ -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.

View File

@@ -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();
}

View File

@@ -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.

View File

@@ -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.

View File

@@ -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 )

View File

@@ -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.

View File

@@ -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;

View File

@@ -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.

View File

@@ -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.
#

View File

@@ -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.

View File

@@ -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.

View File

@@ -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.

View File

@@ -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();
}

View File

@@ -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.

View File

@@ -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

View File

@@ -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.

View File

@@ -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.

View File

@@ -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.

View File

@@ -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

View File

@@ -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

View File

@@ -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.

View File

@@ -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.

View File

@@ -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.

View File

@@ -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();
}

View File

@@ -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.

View File

@@ -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.

View File

@@ -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.

View File

@@ -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;

View File

@@ -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.

View File

@@ -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.

View File

@@ -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.

View File

@@ -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.

View File

@@ -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 );
}
/*-----------------------------------------------------------*/

View File

@@ -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.

View File

@@ -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.

View File

@@ -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

View File

@@ -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.
#

View File

@@ -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.

View File

@@ -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 );
}
}
/*-----------------------------------------------------------*/

View File

@@ -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();

View File

@@ -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.

View File

@@ -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.

View File

@@ -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.

View File

@@ -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

View File

@@ -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.

View File

@@ -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.

View File

@@ -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.

View File

@@ -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.

View File

@@ -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();

View File

@@ -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.

View File

@@ -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.

View File

@@ -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.

View File

@@ -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.

View File

@@ -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 );
}

View File

@@ -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.

View File

@@ -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.

View File

@@ -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.

View File

@@ -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 );
}

View File

@@ -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.

View File

@@ -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.

View File

@@ -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 );
}
/*-----------------------------------------------------------*/

View File

@@ -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.

View File

@@ -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 );
}

View File

@@ -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 );
}
/*-----------------------------------------------------------*/

View File

@@ -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

View File

@@ -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.

View File

@@ -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 );
}
/*-----------------------------------------------------------*/

View File

@@ -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.

View File

@@ -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.

View File

@@ -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.

View File

@@ -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.

View File

@@ -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.

View File

@@ -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 )
{

View File

@@ -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

View File

@@ -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.

View File

@@ -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 );

View File

@@ -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 );
}
/*-----------------------------------------------------------*/

View File

@@ -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.

View File

@@ -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();
}

View File

@@ -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.

View File

@@ -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 );
}
/*-----------------------------------------------------------*/

View File

@@ -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.

View File

@@ -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.

View File

@@ -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.

View File

@@ -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.

View File

@@ -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 );
}
/*-----------------------------------------------------------*/

View File

@@ -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.

View File

@@ -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 );
}
/*-----------------------------------------------------------*/

View File

@@ -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.

View File

@@ -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.

View File

@@ -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.

View File

@@ -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.

View File

@@ -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 );
}
/*-----------------------------------------------------------*/

View File

@@ -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.

View File

@@ -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.

View File

@@ -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