summaryrefslogtreecommitdiff
path: root/Source/portable/Softune/MB96340/portmacro.h
diff options
context:
space:
mode:
authorrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>2008-02-12 17:47:34 +0000
committerrichardbarry <richardbarry@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>2008-02-12 17:47:34 +0000
commit81adbfc96ca020e877a367646c5d9870ea91259a (patch)
tree73217137efcb2acfd4e68e0d478d94b12b763ee5 /Source/portable/Softune/MB96340/portmacro.h
parent6bdc246329d2ae55578904c3118a8ba43da54e52 (diff)
downloadfreertos-81adbfc96ca020e877a367646c5d9870ea91259a.tar.gz
freertos-81adbfc96ca020e877a367646c5d9870ea91259a.tar.bz2
freertos-81adbfc96ca020e877a367646c5d9870ea91259a.tar.xz
Work in progress.
git-svn-id: https://freertos.svn.sourceforge.net/svnroot/freertos/trunk@170 1d2547de-c912-0410-9cb9-b8ca96c0e9e2
Diffstat (limited to 'Source/portable/Softune/MB96340/portmacro.h')
-rw-r--r--Source/portable/Softune/MB96340/portmacro.h38
1 files changed, 16 insertions, 22 deletions
diff --git a/Source/portable/Softune/MB96340/portmacro.h b/Source/portable/Softune/MB96340/portmacro.h
index cc169382..09f1df19 100644
--- a/Source/portable/Softune/MB96340/portmacro.h
+++ b/Source/portable/Softune/MB96340/portmacro.h
@@ -44,6 +44,10 @@
#ifndef PORTMACRO_H
#define PORTMACRO_H
+#include "mb96348hs.h"
+#include <stddef.h>
+
+
/*-----------------------------------------------------------
* Port specific definitions.
*
@@ -59,12 +63,9 @@
#define portFLOAT float
#define portDOUBLE double
#define portLONG long
-#define portSHORT int
+#define portSHORT short
#define portSTACK_TYPE unsigned portSHORT
-#define portBASE_TYPE char
-
-/* This is required since SOFTUNE doesn't support inline directive as is. */
-#define inline
+#define portBASE_TYPE portSHORT
#if( configUSE_16_BIT_TICKS == 1 )
typedef unsigned portSHORT portTickType;
@@ -75,21 +76,11 @@
#endif
/*-----------------------------------------------------------*/
-#define portDISABLE_INTERRUPTS() __DI();
-
-#define portENABLE_INTERRUPTS() __EI();
-
-/*-----------------------------------------------------------*/
-
-#define portENTER_CRITICAL() \
- { __asm(" PUSHW PS "); \
- portDISABLE_INTERRUPTS(); \
- }
-
-#define portEXIT_CRITICAL() \
- { __asm(" POPW PS "); \
- }
-
+/* Critical section handling. */
+#define portDISABLE_INTERRUPTS() __DI();
+#define portENABLE_INTERRUPTS() __EI();
+#define portENTER_CRITICAL() vPortEnterCritical()
+#define portEXIT_CRITICAL() vPortExitCritical()
/*-----------------------------------------------------------*/
@@ -103,8 +94,8 @@
/* portYIELD() uses SW interrupt */
#define portYIELD() __asm( " INT #122 " );
-/* portYIELD() uses delayed interrupt */
-#define portYIELDFromISR() __asm (" SETB 03A4H:0 ");
+/* portYIELD_FROM_ISR() uses delayed interrupt */
+#define portYIELD_FROM_ISR() __asm( " SETB 03A4H:0 " );
/*-----------------------------------------------------------*/
/* Task function macros as described on the FreeRTOS.org WEB site. */
@@ -113,5 +104,8 @@
#define portMINIMAL_STACK_SIZE configMINIMAL_STACK_SIZE
+/* Remove the inline declaration from within the kernel code. */
+#define inline
+
#endif /* PORTMACRO_H */