Work in progress still.

This commit is contained in:
Richard Barry 2008-02-12 21:50:24 +00:00
parent 0faf33fbca
commit 97bee57daa
2 changed files with 13 additions and 11 deletions

View File

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

View File

@ -47,6 +47,11 @@
#include "mb96348hs.h"
#include <stddef.h>
#define portSMALL 0
#define portMEDIUM 1
#define portCOMPACT 2
#define portLARGE 3
/*-----------------------------------------------------------
* Port specific definitions.