/*\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
/* \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
\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
*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
}\r
/*-----------------------------------------------------------*/\r
\r
-portBASE_TYPE xPortStartScheduler( void )\r
+BaseType_t xPortStartScheduler( void )\r
{\r
extern void * pxCurrentTCB;\r
\r
*/\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