]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS/Source/portable/GCC/H8S2329/port.c
Update version number to V8.0.0 (without the release candidate number).
[freertos] / FreeRTOS / Source / portable / GCC / H8S2329 / port.c
index 157b3bf5eabdedfe6ff7fa19f2dfaa174ff7182e..180233817b4405a3d75376d9856116e2afec5d00 100644 (file)
@@ -1,5 +1,5 @@
 /*\r
-    FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. \r
+    FreeRTOS V8.0.0 - Copyright (C) 2014 Real Time Engineers Ltd. \r
     All rights reserved\r
 \r
     VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
 /*-----------------------------------------------------------*/\r
 \r
 /* When the task starts interrupts should be enabled. */\r
-#define portINITIAL_CCR                        ( ( portSTACK_TYPE ) 0x00 )\r
+#define portINITIAL_CCR                        ( ( StackType_t ) 0x00 )\r
 \r
 /* Hardware specific constants used to generate the RTOS tick from the TPU. */\r
-#define portCLEAR_ON_TGRA_COMPARE_MATCH ( ( unsigned char ) 0x20 )\r
-#define portCLOCK_DIV_64                               ( ( unsigned char ) 0x03 )\r
-#define portCLOCK_DIV                                  ( ( unsigned long ) 64 )\r
-#define portTGRA_INTERRUPT_ENABLE              ( ( unsigned char ) 0x01 )\r
-#define portTIMER_CHANNEL                              ( ( unsigned char ) 0x02 )\r
-#define portMSTP13                                             ( ( unsigned short ) 0x2000 )\r
+#define portCLEAR_ON_TGRA_COMPARE_MATCH ( ( uint8_t ) 0x20 )\r
+#define portCLOCK_DIV_64                               ( ( uint8_t ) 0x03 )\r
+#define portCLOCK_DIV                                  ( ( uint32_t ) 64 )\r
+#define portTGRA_INTERRUPT_ENABLE              ( ( uint8_t ) 0x01 )\r
+#define portTIMER_CHANNEL                              ( ( uint8_t ) 0x02 )\r
+#define portMSTP13                                             ( ( uint16_t ) 0x2000 )\r
 \r
 /*\r
  * Setup TPU channel one for the RTOS tick at the requested frequency.\r
@@ -101,12 +101,12 @@ void vPortYield( void ) __attribute__ ( ( saveall, interrupt_handler ) );
 /* \r
  * See header file for description. \r
  */\r
-portSTACK_TYPE *pxPortInitialiseStack( portSTACK_TYPE *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters )\r
+StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t pxCode, void *pvParameters )\r
 {\r
-unsigned long ulValue;\r
+uint32_t ulValue;\r
 \r
        /* This requires an even address. */\r
-       ulValue = ( unsigned long ) pxTopOfStack;\r
+       ulValue = ( uint32_t ) pxTopOfStack;\r
        if( ulValue & 1UL )\r
        {\r
                pxTopOfStack = pxTopOfStack - 1;\r
@@ -125,16 +125,16 @@ unsigned long ulValue;
 \r
        /* The initial stack mimics an interrupt stack.  First there is the program\r
        counter (24 bits). */\r
-       ulValue = ( unsigned long ) pxCode;\r
+       ulValue = ( uint32_t ) pxCode;\r
 \r
        pxTopOfStack--;\r
-       *pxTopOfStack = ( portSTACK_TYPE ) ( ulValue & 0xff );\r
+       *pxTopOfStack = ( StackType_t ) ( ulValue & 0xff );\r
        pxTopOfStack--;\r
        ulValue >>= 8UL;\r
-       *pxTopOfStack = ( portSTACK_TYPE ) ( ulValue & 0xff );\r
+       *pxTopOfStack = ( StackType_t ) ( ulValue & 0xff );\r
        pxTopOfStack--;\r
        ulValue >>= 8UL;\r
-       *pxTopOfStack = ( portSTACK_TYPE ) ( ulValue & 0xff );\r
+       *pxTopOfStack = ( StackType_t ) ( ulValue & 0xff );\r
 \r
        /* Followed by the CCR. */      \r
        pxTopOfStack--;\r
@@ -155,19 +155,19 @@ unsigned long ulValue;
        *pxTopOfStack = 0x66;\r
        \r
        /* ER0 */\r
-       ulValue = ( unsigned long ) pvParameters;\r
+       ulValue = ( uint32_t ) pvParameters;\r
 \r
        pxTopOfStack--;\r
-       *pxTopOfStack = ( portSTACK_TYPE ) ( ulValue & 0xff );\r
+       *pxTopOfStack = ( StackType_t ) ( ulValue & 0xff );\r
        pxTopOfStack--;\r
        ulValue >>= 8UL;\r
-       *pxTopOfStack = ( portSTACK_TYPE ) ( ulValue & 0xff );\r
+       *pxTopOfStack = ( StackType_t ) ( ulValue & 0xff );\r
        pxTopOfStack--;\r
        ulValue >>= 8UL;\r
-       *pxTopOfStack = ( portSTACK_TYPE ) ( ulValue & 0xff );\r
+       *pxTopOfStack = ( StackType_t ) ( ulValue & 0xff );\r
        pxTopOfStack--;\r
        ulValue >>= 8UL;\r
-       *pxTopOfStack = ( portSTACK_TYPE ) ( ulValue & 0xff );\r
+       *pxTopOfStack = ( StackType_t ) ( ulValue & 0xff );\r
        \r
        /* ER1 */\r
        pxTopOfStack--;\r
@@ -223,7 +223,7 @@ unsigned long ulValue;
 }\r
 /*-----------------------------------------------------------*/\r
 \r
-portBASE_TYPE xPortStartScheduler( void )\r
+BaseType_t xPortStartScheduler( void )\r
 {\r
 extern void * pxCurrentTCB;\r
 \r
@@ -319,7 +319,7 @@ void vPortYield( void )
  */\r
 static void prvSetupTimerInterrupt( void )\r
 {\r
-const unsigned long ulCompareMatch = ( configCPU_CLOCK_HZ / configTICK_RATE_HZ ) / portCLOCK_DIV;\r
+const uint32_t ulCompareMatch = ( configCPU_CLOCK_HZ / configTICK_RATE_HZ ) / portCLOCK_DIV;\r
 \r
        /* Turn the module on. */\r
        MSTPCR &= ~portMSTP13;\r