;/*\r
-; FreeRTOS V7.2.0 - Copyright (C) 2012 Real Time Engineers Ltd.\r
+; FreeRTOS V7.5.2 - Copyright (C) 2013 Real Time Engineers Ltd.\r
; \r
;\r
; ***************************************************************************\r
INCLUDE portmacro.inc\r
\r
IMPORT vTaskSwitchContext\r
- IMPORT vTaskIncrementTick\r
+ IMPORT xTaskIncrementTick\r
\r
EXPORT vPortYieldProcessor\r
EXPORT vPortStartFirstTask\r
\r
portSAVE_CONTEXT ; Save the context of the current task. \r
\r
- LDR R0, =vTaskIncrementTick ; Increment the tick count. \r
+ LDR R0, =xTaskIncrementTick ; Increment the tick count. \r
MOV LR, PC ; This may make a delayed task ready\r
BX R0 ; to run.\r
- \r
+\r
+ CMP R0, #0\r
+ BEQ SkipContextSwitch\r
LDR R0, =vTaskSwitchContext ; Find the highest priority task that \r
MOV LR, PC ; is ready to run.\r
BX R0\r
- \r
+SkipContextSwitch\r
MOV R0, #T0MATCHBIT ; Clear the timer event\r
LDR R1, =T0IR\r
STR R0, [R1] \r