]> git.sur5r.net Git - freertos/blobdiff - Source/portable/Softune/MB96340/portmacro.h
Work in progress.
[freertos] / Source / portable / Softune / MB96340 / portmacro.h
index cc169382a717a85b0339d92f36ceed133710f225..09f1df19a127814180e0d6ddc6a9542809c04680 100644 (file)
 #ifndef PORTMACRO_H\r
 #define PORTMACRO_H\r
 \r
+#include "mb96348hs.h"\r
+#include <stddef.h>\r
+\r
+\r
 /*-----------------------------------------------------------\r
  * Port specific definitions.  \r
  *\r
 #define portFLOAT              float\r
 #define portDOUBLE             double\r
 #define portLONG               long\r
-#define portSHORT              int\r
+#define portSHORT              short\r
 #define portSTACK_TYPE unsigned portSHORT\r
-#define portBASE_TYPE  char\r
-\r
-/* This is required since SOFTUNE doesn't support inline directive as is. */\r
-#define inline\r
+#define portBASE_TYPE  portSHORT\r
 \r
 #if( configUSE_16_BIT_TICKS == 1 )\r
        typedef unsigned portSHORT portTickType;\r
 #endif\r
 /*-----------------------------------------------------------*/        \r
 \r
-#define portDISABLE_INTERRUPTS()  __DI();\r
-\r
-#define portENABLE_INTERRUPTS()  __EI();\r
-\r
-/*-----------------------------------------------------------*/        \r
-\r
-#define portENTER_CRITICAL()                                                           \\r
-               {       __asm(" PUSHW PS ");                                                    \\r
-                       portDISABLE_INTERRUPTS();                                               \\r
-               }\r
-\r
-#define portEXIT_CRITICAL()                                                                    \\r
-               {       __asm(" POPW PS ");                                                             \\r
-               }\r
-\r
+/* Critical section handling. */\r
+#define portDISABLE_INTERRUPTS()       __DI();\r
+#define portENABLE_INTERRUPTS()                __EI();\r
+#define portENTER_CRITICAL()           vPortEnterCritical()\r
+#define portEXIT_CRITICAL()                    vPortExitCritical()\r
 \r
 /*-----------------------------------------------------------*/\r
 \r
 /* portYIELD() uses SW interrupt */\r
 #define portYIELD()                                    __asm( " INT #122 " );\r
 \r
-/* portYIELD() uses delayed interrupt */\r
-#define portYIELDFromISR()                      __asm (" SETB  03A4H:0 ");             \r
+/* portYIELD_FROM_ISR() uses delayed interrupt */\r
+#define portYIELD_FROM_ISR()            __asm( " SETB  03A4H:0 " );\r
 /*-----------------------------------------------------------*/\r
 \r
 /* Task function macros as described on the FreeRTOS.org WEB site. */\r
 \r
 #define portMINIMAL_STACK_SIZE configMINIMAL_STACK_SIZE\r
 \r
+/* Remove the inline declaration from within the kernel code. */\r
+#define inline\r
+\r
 #endif /* PORTMACRO_H */\r
 \r