***************************************************************************\r
\r
\r
- http://www.FreeRTOS.org - Documentation, books, training, latest versions, \r
+ http://www.FreeRTOS.org - Documentation, books, training, latest versions,\r
license and Real Time Engineers Ltd. contact details.\r
\r
http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,\r
including FreeRTOS+Trace - an indispensable productivity tool, and our new\r
fully thread aware and reentrant UDP/IP stack.\r
\r
- http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High \r
- Integrity Systems, who sell the code with commercial support, \r
+ http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High\r
+ Integrity Systems, who sell the code with commercial support,\r
indemnification and middleware, under the OpenRTOS brand.\r
- \r
- http://www.SafeRTOS.com - High Integrity Systems also provide a safety \r
- engineered and independently SIL3 certified version for use in safety and \r
+\r
+ http://www.SafeRTOS.com - High Integrity Systems also provide a safety\r
+ engineered and independently SIL3 certified version for use in safety and\r
mission critical applications that require provable dependability.\r
*/\r
\r
#define portSHORT int\r
#define portSTACK_TYPE unsigned portCHAR\r
#define portBASE_TYPE portCHAR\r
+#define portPOINTER_SIZE_TYPE unsigned short\r
\r
#if( configUSE_16_BIT_TICKS == 1 )\r
typedef unsigned portSHORT portTickType;\r
#define portMAX_DELAY ( portTickType ) 0xffffffff\r
#endif\r
\r
-/*-----------------------------------------------------------*/ \r
+/*-----------------------------------------------------------*/\r
\r
/* Critical section management. */\r
extern void vPortEnterCritical( void );\r
\r
/* Architecture specifics. */\r
#define portSTACK_GROWTH ( -1 )\r
-#define portTICK_RATE_MS ( ( portTickType ) 1000 / configTICK_RATE_HZ ) \r
+#define portTICK_RATE_MS ( ( portTickType ) 1000 / configTICK_RATE_HZ )\r
#define portBYTE_ALIGNMENT 1\r
#define portNOP() asm( "nop" )\r
/*-----------------------------------------------------------*/\r
;/*\r
; FreeRTOS V7.4.2 - Copyright (C) 2013 Real Time Engineers Ltd.\r
-; \r
+;\r
;\r
; ***************************************************************************\r
; * *\r
ORG USART_UDRE_vect ; Vector address\r
jmp SIG_UART_DATA ; ISR\r
\r
- \r
+\r
RSEG CODE\r
\r
\r
out SREG, r0\r
\r
ld r0, y+ ; Finally we have finished with r0, so restore r0.\r
- \r
+\r
ENDM\r
\r
\r
vPortYieldFromTick:\r
portSAVE_CONTEXT ; Save the context of the current task.\r
call xTaskIncrementTick ; Call the timer tick function.\r
+ tst r16\r
+ breq SkipTaskSwitch\r
call vTaskSwitchContext ; Call the scheduler.\r
+SkipTaskSwitch:\r
portRESTORE_CONTEXT ; Restore the context of whichever task the ...\r
ret ; ... scheduler decided should run.\r
\r
#endif /* __HAS_EDS__ */\r
#endif /* MPLAB_PIC24_PORT */\r
\r
-#if defined( __dsPIC30F__ ) || defined ( __dsPIC33E__ ) || defined( __dsPIC33F__ )\r
+#if defined( __dsPIC30F__ ) || defined( __dsPIC33F__ )\r
\r
#define portRESTORE_CONTEXT() \\r
asm volatile( "MOV _pxCurrentTCB, W0 \n" /* Restore the stack pointer for the task. */ \\r
mission critical applications that require provable dependability.\r
*/\r
\r
+#if defined( __PIC24E__ ) || defined ( __PIC24F__ ) || defined( __PIC24FK__ ) || defined( __PIC24H__ )\r
+\r
.global _vPortYield\r
.extern _vTaskSwitchContext\r
.extern uxCriticalNesting\r
return\r
\r
.end\r
+ \r
+#endif /* defined( __PIC24E__ ) || defined ( __PIC24F__ ) || defined( __PIC24FK__ ) || defined( __PIC24H__ ) */
\ No newline at end of file
***************************************************************************\r
\r
\r
- http://www.FreeRTOS.org - Documentation, books, training, latest versions, \r
+ http://www.FreeRTOS.org - Documentation, books, training, latest versions,\r
license and Real Time Engineers Ltd. contact details.\r
\r
http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,\r
including FreeRTOS+Trace - an indispensable productivity tool, and our new\r
fully thread aware and reentrant UDP/IP stack.\r
\r
- http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High \r
- Integrity Systems, who sell the code with commercial support, \r
+ http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High\r
+ Integrity Systems, who sell the code with commercial support,\r
indemnification and middleware, under the OpenRTOS brand.\r
- \r
- http://www.SafeRTOS.com - High Integrity Systems also provide a safety \r
- engineered and independently SIL3 certified version for use in safety and \r
+\r
+ http://www.SafeRTOS.com - High Integrity Systems also provide a safety\r
+ engineered and independently SIL3 certified version for use in safety and\r
mission critical applications that require provable dependability.\r
*/\r
\r
+#if defined( __dsPIC30F__ ) || defined( __dsPIC33F__ )\r
+\r
.global _vPortYield\r
.extern _vTaskSwitchContext\r
.extern uxCriticalNesting\r
PUSH DOSTARTH\r
PUSH DOENDL\r
PUSH DOENDH\r
- \r
- \r
+\r
+\r
PUSH CORCON\r
PUSH PSVPAG\r
MOV _uxCriticalNesting, W0 /* Save the critical nesting counter for the task. */\r
return\r
\r
.end\r
+\r
+#endif /* defined( __dsPIC30F__ ) || defined( __dsPIC33F__ ) */\r
+\r