* Implementation of functions defined in portable.h for the 16FX port.\r
*----------------------------------------------------------*/\r
\r
-/* \r
- * The below define should be same as the option selected by the Memory \r
- * Model (Project->Setup Project->C Compiler->Catagory->Target Depend ) \r
- */\r
-#define configMEMMODEL portMEDIUM\r
-\r
-/*-----------------------------------------------------------*/\r
-\r
/* \r
* Get current value of DPR and ADB registers \r
*/\r
*/\r
static void prvSetupRLT0Interrupt( void );\r
\r
-/*-----------------------------------------------------------*/ \r
+/*-----------------------------------------------------------*/\r
\r
/* \r
* We require the address of the pxCurrentTCB variable, but don't want to know\r
extern volatile tskTCB * volatile pxCurrentTCB;\r
\r
/* Constants required to handle critical sections. */\r
-#define portNO_CRITICAL_NESTING ( ( unsigned portBASE_TYPE ) 0x1234 )\r
+#define portNO_CRITICAL_NESTING ( ( unsigned portBASE_TYPE ) 0 )\r
volatile unsigned portBASE_TYPE uxCriticalNesting = 9999UL;\r
\r
/*-----------------------------------------------------------*/\r
__asm(" AND CCR,#H'DF "); \\r
__asm(" PUSHW A "); \\r
__asm(" PUSHW (RW0,RW1,RW2,RW3,RW4,RW5,RW6,RW7) "); \\r
+ \\r
+ /* Save the critical nesting count to the stack. */ \\r
+ __asm(" MOVW RW0, _uxCriticalNesting "); \\r
+ __asm(" PUSHW (RW0) "); \\r
+ \\r
__asm(" MOVW A, _pxCurrentTCB "); \\r
__asm(" MOVW A, SP "); \\r
__asm(" SWAPW "); \\r
__asm(" AND CCR,#H'DF "); \\r
__asm(" MOVW SP, A "); \\r
\\r
- /* Load the saves uxCriticalNesting value into RW0. */ \\r
+ /* Load the saved uxCriticalNesting value into RW0. */ \\r
__asm(" POPW (RW0) "); \\r
\\r
/* Save the loaded value into the uxCriticalNesting variable. */ \\r