mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-04-19 21:11:57 -04:00
Work in progress still.
This commit is contained in:
parent
0faf33fbca
commit
97bee57daa
|
@ -48,14 +48,6 @@
|
||||||
* Implementation of functions defined in portable.h for the 16FX port.
|
* 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
|
* Get current value of DPR and ADB registers
|
||||||
*/
|
*/
|
||||||
|
@ -87,7 +79,7 @@ typedef void tskTCB;
|
||||||
extern volatile tskTCB * volatile pxCurrentTCB;
|
extern volatile tskTCB * volatile pxCurrentTCB;
|
||||||
|
|
||||||
/* Constants required to handle critical sections. */
|
/* 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;
|
volatile unsigned portBASE_TYPE uxCriticalNesting = 9999UL;
|
||||||
|
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
@ -130,6 +122,11 @@ volatile unsigned portBASE_TYPE uxCriticalNesting = 9999UL;
|
||||||
__asm(" AND CCR,#H'DF "); \
|
__asm(" AND CCR,#H'DF "); \
|
||||||
__asm(" PUSHW A "); \
|
__asm(" PUSHW A "); \
|
||||||
__asm(" PUSHW (RW0,RW1,RW2,RW3,RW4,RW5,RW6,RW7) "); \
|
__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, _pxCurrentTCB "); \
|
||||||
__asm(" MOVW A, SP "); \
|
__asm(" MOVW A, SP "); \
|
||||||
__asm(" SWAPW "); \
|
__asm(" SWAPW "); \
|
||||||
|
@ -153,7 +150,7 @@ volatile unsigned portBASE_TYPE uxCriticalNesting = 9999UL;
|
||||||
__asm(" AND CCR,#H'DF "); \
|
__asm(" AND CCR,#H'DF "); \
|
||||||
__asm(" MOVW SP, A "); \
|
__asm(" MOVW SP, A "); \
|
||||||
\
|
\
|
||||||
/* Load the saves uxCriticalNesting value into RW0. */ \
|
/* Load the saved uxCriticalNesting value into RW0. */ \
|
||||||
__asm(" POPW (RW0) "); \
|
__asm(" POPW (RW0) "); \
|
||||||
\
|
\
|
||||||
/* Save the loaded value into the uxCriticalNesting variable. */ \
|
/* Save the loaded value into the uxCriticalNesting variable. */ \
|
||||||
|
|
|
@ -47,6 +47,11 @@
|
||||||
#include "mb96348hs.h"
|
#include "mb96348hs.h"
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
|
|
||||||
|
#define portSMALL 0
|
||||||
|
#define portMEDIUM 1
|
||||||
|
#define portCOMPACT 2
|
||||||
|
#define portLARGE 3
|
||||||
|
|
||||||
|
|
||||||
/*-----------------------------------------------------------
|
/*-----------------------------------------------------------
|
||||||
* Port specific definitions.
|
* Port specific definitions.
|
||||||
|
|
Loading…
Reference in a new issue