/*-----------------------------------------------------------*/\r
\r
/* Constants to setup I/O and processor. */\r
-#define mainTX_ENABLE ( ( unsigned portLONG ) 0x00010000 ) /* UART1. */\r
-#define mainRX_ENABLE ( ( unsigned portLONG ) 0x00040000 ) /* UART1. */\r
-#define mainBUS_CLK_FULL ( ( unsigned portCHAR ) 0x01 )\r
-#define mainLED_TO_OUTPUT ( ( unsigned portLONG ) 0xff0000 )\r
+#define mainTX_ENABLE ( ( unsigned long ) 0x00010000 ) /* UART1. */\r
+#define mainRX_ENABLE ( ( unsigned long ) 0x00040000 ) /* UART1. */\r
+#define mainBUS_CLK_FULL ( ( unsigned char ) 0x01 )\r
+#define mainLED_TO_OUTPUT ( ( unsigned long ) 0xff0000 )\r
\r
/* Constants for the ComTest demo application tasks. */\r
-#define mainCOM_TEST_BAUD_RATE ( ( unsigned portLONG ) 115200 )\r
+#define mainCOM_TEST_BAUD_RATE ( ( unsigned long ) 115200 )\r
#define mainCOM_TEST_LED ( 3 )\r
\r
/* Priorities for the demo application tasks. */\r
* Checks that all the demo application tasks are still executing without error\r
* - as described at the top of the file.\r
*/\r
-static portLONG prvCheckOtherTasksAreStillRunning( void );\r
+static long prvCheckOtherTasksAreStillRunning( void );\r
\r
/*\r
* The task that executes at the highest priority and calls \r
}\r
/*-----------------------------------------------------------*/\r
\r
-static portLONG prvCheckOtherTasksAreStillRunning( void )\r
+static long prvCheckOtherTasksAreStillRunning( void )\r
{\r
-portLONG lReturn = pdPASS;\r
+long lReturn = pdPASS;\r
\r
/* Check all the demo tasks (other than the flash tasks) to ensure\r
that they are all still running, and that none of them have detected\r
/* Demo application includes. */\r
#include "partest.h"\r
\r
-#define partstFIRST_IO ( ( unsigned portLONG ) 0x01 )\r
+#define partstFIRST_IO ( ( unsigned long ) 0x01 )\r
#define partstNUM_LEDS ( 8 )\r
-#define partstALL_OUTPUTS_OFF ( ( unsigned portLONG ) 0xff )\r
+#define partstALL_OUTPUTS_OFF ( ( unsigned long ) 0xff )\r
\r
/*-----------------------------------------------------------\r
* Simple parallel port IO routines.\r
\r
void vParTestSetLED( unsigned portBASE_TYPE uxLED, signed portBASE_TYPE xValue )\r
{\r
-unsigned portLONG ulLED = partstFIRST_IO;\r
+unsigned long ulLED = partstFIRST_IO;\r
\r
if( uxLED < partstNUM_LEDS )\r
{\r
/* Rotate to the wanted bit of port */\r
- ulLED <<= ( unsigned portLONG ) uxLED;\r
+ ulLED <<= ( unsigned long ) uxLED;\r
\r
/* Set of clear the output. */\r
if( xValue )\r
\r
void vParTestToggleLED( unsigned portBASE_TYPE uxLED )\r
{\r
-unsigned portLONG ulLED = partstFIRST_IO, ulCurrentState;\r
+unsigned long ulLED = partstFIRST_IO, ulCurrentState;\r
\r
if( uxLED < partstNUM_LEDS )\r
{\r
/* Rotate to the wanted bit of port 0. Only P10 to P13 have an LED\r
attached. */\r
- ulLED <<= ( unsigned portLONG ) uxLED;\r
+ ulLED <<= ( unsigned long ) uxLED;\r
\r
/* If this bit is already set, clear it, and vice versa. */\r
ulCurrentState = FIO2PIN;\r
/*-----------------------------------------------------------*/\r
unsigned portBASE_TYPE uxParTextGetLED( unsigned portBASE_TYPE uxLED )\r
{\r
-unsigned portLONG ulLED = partstFIRST_IO;\r
+unsigned long ulLED = partstFIRST_IO;\r
\r
- ulLED <<= ( unsigned portLONG ) uxLED;\r
+ ulLED <<= ( unsigned long ) uxLED;\r
\r
return ( FIO2PIN & ulLED );\r
}\r
#define mainGEN_QUEUE_TASK_PRIORITY ( tskIDLE_PRIORITY )\r
\r
/* Constants to setup the PLL. */\r
-#define mainPLL_MUL ( ( unsigned portLONG ) ( 8 - 1 ) )\r
-#define mainPLL_DIV ( ( unsigned portLONG ) 0x0000 )\r
-#define mainCPU_CLK_DIV ( ( unsigned portLONG ) 0x0003 )\r
-#define mainPLL_ENABLE ( ( unsigned portLONG ) 0x0001 )\r
-#define mainPLL_CONNECT ( ( ( unsigned portLONG ) 0x0002 ) | mainPLL_ENABLE )\r
-#define mainPLL_FEED_BYTE1 ( ( unsigned portLONG ) 0xaa )\r
-#define mainPLL_FEED_BYTE2 ( ( unsigned portLONG ) 0x55 )\r
-#define mainPLL_LOCK ( ( unsigned portLONG ) 0x4000000 )\r
-#define mainPLL_CONNECTED ( ( unsigned portLONG ) 0x2000000 )\r
-#define mainOSC_ENABLE ( ( unsigned portLONG ) 0x20 )\r
-#define mainOSC_STAT ( ( unsigned portLONG ) 0x40 )\r
-#define mainOSC_SELECT ( ( unsigned portLONG ) 0x01 )\r
+#define mainPLL_MUL ( ( unsigned long ) ( 8 - 1 ) )\r
+#define mainPLL_DIV ( ( unsigned long ) 0x0000 )\r
+#define mainCPU_CLK_DIV ( ( unsigned long ) 0x0003 )\r
+#define mainPLL_ENABLE ( ( unsigned long ) 0x0001 )\r
+#define mainPLL_CONNECT ( ( ( unsigned long ) 0x0002 ) | mainPLL_ENABLE )\r
+#define mainPLL_FEED_BYTE1 ( ( unsigned long ) 0xaa )\r
+#define mainPLL_FEED_BYTE2 ( ( unsigned long ) 0x55 )\r
+#define mainPLL_LOCK ( ( unsigned long ) 0x4000000 )\r
+#define mainPLL_CONNECTED ( ( unsigned long ) 0x2000000 )\r
+#define mainOSC_ENABLE ( ( unsigned long ) 0x20 )\r
+#define mainOSC_STAT ( ( unsigned long ) 0x40 )\r
+#define mainOSC_SELECT ( ( unsigned long ) 0x01 )\r
\r
/* Constants to setup the MAM. */\r
-#define mainMAM_TIM_3 ( ( unsigned portCHAR ) 0x03 )\r
-#define mainMAM_MODE_FULL ( ( unsigned portCHAR ) 0x02 )\r
+#define mainMAM_TIM_3 ( ( unsigned char ) 0x03 )\r
+#define mainMAM_MODE_FULL ( ( unsigned char ) 0x02 )\r
\r
/*\r
* The task that handles the uIP stack. All TCP/IP processing is performed in\r
{\r
unsigned portBASE_TYPE uxColumn = 0;\r
static xLCDMessage xMessage = { 0, "PASS" };\r
-static unsigned portLONG ulTicksSinceLastDisplay = 0;\r
+static unsigned long ulTicksSinceLastDisplay = 0;\r
static portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;\r
\r
/* Called from every tick interrupt. Have enough ticks passed to make it\r
{\r
MAC_INTENABLE = INT_RX_DONE;\r
VICIntEnable |= 0x00200000;\r
- VICVectAddr21 = ( portLONG ) vEMAC_ISR_Wrapper;\r
+ VICVectAddr21 = ( long ) vEMAC_ISR_Wrapper;\r
prvSetMACAddress();\r
}\r
portEXIT_CRITICAL();\r
}\r
/*-----------------------------------------------------------*/\r
\r
-void vApplicationProcessFormInput( portCHAR *pcInputString, portBASE_TYPE xInputLength )\r
+void vApplicationProcessFormInput( char *pcInputString, portBASE_TYPE xInputLength )\r
{\r
char *c, *pcText;\r
-static portCHAR cMessageForDisplay[ 32 ];\r
+static char cMessageForDisplay[ 32 ];\r
extern xQueueHandle xLCDQueue;\r
xLCDMessage xLCDMessage;\r
\r
{\r
IntEnable = INT_RX_DONE;\r
VICIntEnable |= 0x00200000;\r
- VICVectAddr21 = ( portLONG ) vEMAC_ISR_Wrapper;\r
+ VICVectAddr21 = ( long ) vEMAC_ISR_Wrapper;\r
prvSetMACAddress();\r
}\r
portEXIT_CRITICAL();\r
}\r
/*-----------------------------------------------------------*/\r
\r
-void vApplicationProcessFormInput( portCHAR *pcInputString, portBASE_TYPE xInputLength )\r
+void vApplicationProcessFormInput( char *pcInputString, portBASE_TYPE xInputLength )\r
{\r
char *c, *pcText;\r
-static portCHAR cMessageForDisplay[ 32 ];\r
+static char cMessageForDisplay[ 32 ];\r
extern xQueueHandle xLCDQueue;\r
xLCDMessage xLCDMessage;\r
\r
* Simple parallel port IO routines.\r
*-----------------------------------------------------------*/\r
\r
-#define partstALL_OUTPUTS_OFF ( ( unsigned portCHAR ) 0x00 )\r
+#define partstALL_OUTPUTS_OFF ( ( unsigned char ) 0x00 )\r
#if( BOARD==EVK1100 )\r
-# define partstMAX_OUTPUT_LED ( ( unsigned portCHAR ) 8 )\r
+# define partstMAX_OUTPUT_LED ( ( unsigned char ) 8 )\r
\r
#elif( BOARD==EVK1101 )\r
-# define partstMAX_OUTPUT_LED ( ( unsigned portCHAR ) 4 )\r
+# define partstMAX_OUTPUT_LED ( ( unsigned char ) 4 )\r
#endif\r
\r
-static volatile unsigned portCHAR ucCurrentOutputValue = partstALL_OUTPUTS_OFF; /*lint !e956 File scope parameters okay here. */\r
+static volatile unsigned char ucCurrentOutputValue = partstALL_OUTPUTS_OFF; /*lint !e956 File scope parameters okay here. */\r
\r
/*-----------------------------------------------------------*/\r
\r
\r
void vParTestSetLED( unsigned portBASE_TYPE uxLED, signed portBASE_TYPE xValue )\r
{\r
-unsigned portCHAR ucBit;\r
+unsigned char ucBit;\r
\r
if( uxLED >= partstMAX_OUTPUT_LED )\r
{\r
return;\r
}\r
\r
- ucBit = ( ( unsigned portCHAR ) 1 ) << uxLED;\r
+ ucBit = ( ( unsigned char ) 1 ) << uxLED;\r
\r
vTaskSuspendAll();\r
{\r
\r
void vParTestToggleLED( unsigned portBASE_TYPE uxLED )\r
{\r
-unsigned portCHAR ucBit;\r
+unsigned char ucBit;\r
\r
if( uxLED >= partstMAX_OUTPUT_LED )\r
{\r
return;\r
}\r
\r
- ucBit = ( ( unsigned portCHAR ) 1 ) << uxLED;\r
+ ucBit = ( ( unsigned char ) 1 ) << uxLED;\r
\r
vTaskSuspendAll();\r
{\r
//! @}\r
\r
//! Baud rate used by the serial port tasks.\r
-#define mainCOM_TEST_BAUD_RATE ( ( unsigned portLONG ) 57600 )\r
+#define mainCOM_TEST_BAUD_RATE ( ( unsigned long ) 57600 )\r
\r
//! LED used by the serial port tasks. This is toggled on each character Tx,\r
//! and mainCOM_TEST_LED + 1 is toggled on each character Rx.\r
/*! \name Constants used by the vMemCheckTask() task.\r
*/\r
//! @{\r
-#define mainCOUNT_INITIAL_VALUE ( ( unsigned portLONG ) 0 )\r
+#define mainCOUNT_INITIAL_VALUE ( ( unsigned long ) 0 )\r
#define mainNO_TASK ( 0 )\r
//! @}\r
\r
*/\r
static void vErrorChecks( void *pvParameters )\r
{\r
-static volatile unsigned portLONG ulDummyVariable = 3UL;\r
-unsigned portLONG ulMemCheckTaskRunningCount;\r
+static volatile unsigned long ulDummyVariable = 3UL;\r
+unsigned long ulMemCheckTaskRunningCount;\r
xTaskHandle xCreatedTask;\r
portBASE_TYPE bSuicidalTask = 0;\r
\r
*/\r
static void vMemCheckTask( void *pvParameters )\r
{\r
-unsigned portLONG *pulMemCheckTaskRunningCounter;\r
+unsigned long *pulMemCheckTaskRunningCounter;\r
void *pvMem1, *pvMem2, *pvMem3;\r
-static portLONG lErrorOccurred = pdFALSE;\r
+static long lErrorOccurred = pdFALSE;\r
\r
/* This task is dynamically created then deleted during each cycle of the\r
vErrorChecks task to check the operation of the memory allocator. Each time\r
pulMemCheckTaskRunningCounter is incremented each cycle to indicate to the\r
vErrorChecks() task that this task is still executing without error. */\r
\r
- pulMemCheckTaskRunningCounter = ( unsigned portLONG * ) pvParameters;\r
+ pulMemCheckTaskRunningCounter = ( unsigned long * ) pvParameters;\r
\r
for( ;; )\r
{\r
static portBASE_TYPE prvUSART_ISR_NonNakedBehaviour( void )\r
{\r
/* Now we can declare the local variables. */\r
- signed portCHAR cChar;\r
+ signed char cChar;\r
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;\r
- unsigned portLONG ulStatus;\r
+ unsigned long ulStatus;\r
volatile avr32_usart_t *usart = serialPORT_USART;\r
portBASE_TYPE retstatus;\r
\r
/*\r
* Init the serial port for the Minimal implementation.\r
*/\r
-xComPortHandle xSerialPortInitMinimal( unsigned portLONG ulWantedBaud, unsigned portBASE_TYPE uxQueueLength )\r
+xComPortHandle xSerialPortInitMinimal( unsigned long ulWantedBaud, unsigned portBASE_TYPE uxQueueLength )\r
{\r
static const gpio_map_t USART_GPIO_MAP =\r
{\r
/* Configure USART. */\r
if( ( xRxedChars != serINVALID_QUEUE ) &&\r
( xCharsForTx != serINVALID_QUEUE ) &&\r
- ( ulWantedBaud != ( unsigned portLONG ) 0 ) )\r
+ ( ulWantedBaud != ( unsigned long ) 0 ) )\r
{\r
portENTER_CRITICAL();\r
{\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed portCHAR *pcRxedChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime )\r
{\r
/* The port handle is not required as this driver only supports UART0. */\r
( void ) pxPort;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-void vSerialPutString( xComPortHandle pxPort, const signed portCHAR * const pcString, unsigned portSHORT usStringLength )\r
+void vSerialPutString( xComPortHandle pxPort, const signed char * const pcString, unsigned short usStringLength )\r
{\r
-signed portCHAR *pxNext;\r
+signed char *pxNext;\r
\r
/* NOTE: This implementation does not handle the queue being full as no\r
block time is used! */\r
( void ) pxPort;\r
\r
/* Send each character in the string, one at a time. */\r
- pxNext = ( signed portCHAR * ) pcString;\r
+ pxNext = ( signed char * ) pcString;\r
while( *pxNext )\r
{\r
xSerialPutChar( pxPort, *pxNext, serNO_BLOCK );\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed portCHAR cOutChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime )\r
{\r
volatile avr32_usart_t *usart = serialPORT_USART;\r
\r
static void vprvSerialCreateQueues( unsigned portBASE_TYPE uxQueueLength, xQueueHandle *pxRxedChars, xQueueHandle *pxCharsForTx )\r
{\r
/* Create the queues used to hold Rx and Tx characters. */\r
- xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed portCHAR ) );\r
- xCharsForTx = xQueueCreate( uxQueueLength + 1, ( unsigned portBASE_TYPE ) sizeof( signed portCHAR ) );\r
+ xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed char ) );\r
+ xCharsForTx = xQueueCreate( uxQueueLength + 1, ( unsigned portBASE_TYPE ) sizeof( signed char ) );\r
\r
/* Pass back a reference to the queues so the serial API file can\r
post/receive characters. */\r
/*\r
* See the serial2.h header file.\r
*/\r
-xComPortHandle xSerialPortInitMinimal( unsigned portLONG ulWantedBaud, unsigned portBASE_TYPE uxQueueLength )\r
+xComPortHandle xSerialPortInitMinimal( unsigned long ulWantedBaud, unsigned portBASE_TYPE uxQueueLength )\r
{\r
/* Baud is set in IoInitScif2(), called in prvSetupHardware() in main.c. */\r
( void ) ulWantedBaud;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-void vSerialPutString( xComPortHandle pxPort, const signed char * const pcString, unsigned portSHORT usStringLength )\r
+void vSerialPutString( xComPortHandle pxPort, const signed char * const pcString, unsigned short usStringLength )\r
{\r
signed char *pxNext;\r
\r
\r
/* The set frequency of the interrupt. Deviations from this are measured as\r
the jitter. */\r
-#define timerINTERRUPT_FREQUENCY ( ( unsigned portSHORT ) 20000 )\r
+#define timerINTERRUPT_FREQUENCY ( ( unsigned short ) 20000 )\r
\r
/* The expected time between each of the timer interrupts - if the jitter was\r
zero. */\r
CY_ISR_PROTO(vTimer20KHzISR);\r
\r
/* Stores the value of the maximum recorded jitter between interrupts. */\r
-volatile unsigned portSHORT usMaxJitter = 0;\r
+volatile unsigned short usMaxJitter = 0;\r
/*---------------------------------------------------------------------------*/\r
\r
void vSetupTimerTest( void )\r
#define mainCOM_LED ( 3 )\r
\r
/* The number of nano seconds between each processor clock. */\r
-#define mainNS_PER_CLOCK ( ( unsigned portLONG ) ( ( 1.0 / ( double ) configCPU_CLOCK_HZ ) * 1000000000.0 ) )\r
+#define mainNS_PER_CLOCK ( ( unsigned long ) ( ( 1.0 / ( double ) configCPU_CLOCK_HZ ) * 1000000000.0 ) )\r
\r
/* Task priorities. */\r
#define mainQUEUE_POLL_PRIORITY ( tskIDLE_PRIORITY + 2 )\r
portTickType xDelay = 0;\r
unsigned short usErrorCode = 0;\r
unsigned long ulIteration = 0;\r
-extern unsigned portSHORT usMaxJitter;\r
+extern unsigned short usMaxJitter;\r
\r
/* Intialise the sleeper. */\r
xDelay = xTaskGetTickCount();\r
\r
/* The set frequency of the interrupt. Deviations from this are measured as\r
the jitter. */\r
-#define timerINTERRUPT_FREQUENCY ( ( unsigned portSHORT ) 20000 )\r
+#define timerINTERRUPT_FREQUENCY ( ( unsigned short ) 20000 )\r
\r
/* The expected time between each of the timer interrupts - if the jitter was\r
zero. */\r
CY_ISR_PROTO(vTimer20KHzISR);\r
\r
/* Stores the value of the maximum recorded jitter between interrupts. */\r
-volatile unsigned portSHORT usMaxJitter = 0;\r
+volatile unsigned short usMaxJitter = 0;\r
/*---------------------------------------------------------------------------*/\r
\r
void vSetupTimerTest( void )\r
#define mainCOM_LED ( 3 )\r
\r
/* The number of nano seconds between each processor clock. */\r
-#define mainNS_PER_CLOCK ( ( unsigned portLONG ) ( ( 1.0 / ( double ) configCPU_CLOCK_HZ ) * 1000000000.0 ) )\r
+#define mainNS_PER_CLOCK ( ( unsigned long ) ( ( 1.0 / ( double ) configCPU_CLOCK_HZ ) * 1000000000.0 ) )\r
\r
/* Task priorities. */\r
#define mainQUEUE_POLL_PRIORITY ( tskIDLE_PRIORITY + 2 )\r
portTickType xDelay = 0;\r
unsigned short usErrorCode = 0;\r
unsigned long ulIteration = 0;\r
-extern unsigned portSHORT usMaxJitter;\r
+extern unsigned short usMaxJitter;\r
\r
/* Intialise the sleeper. */\r
xDelay = xTaskGetTickCount();\r
\r
/* The set frequency of the interrupt. Deviations from this are measured as\r
the jitter. */\r
-#define timerINTERRUPT_FREQUENCY ( ( unsigned portSHORT ) 20000 )\r
+#define timerINTERRUPT_FREQUENCY ( ( unsigned short ) 20000 )\r
\r
/* The expected time between each of the timer interrupts - if the jitter was\r
zero. */\r
CY_ISR_PROTO(vTimer20KHzISR);\r
\r
/* Stores the value of the maximum recorded jitter between interrupts. */\r
-volatile unsigned portSHORT usMaxJitter = 0;\r
+volatile unsigned short usMaxJitter = 0;\r
/*---------------------------------------------------------------------------*/\r
\r
void vSetupTimerTest( void )\r
#define mainCOM_LED ( 3 )\r
\r
/* The number of nano seconds between each processor clock. */\r
-#define mainNS_PER_CLOCK ( ( unsigned portLONG ) ( ( 1.0 / ( double ) configCPU_CLOCK_HZ ) * 1000000000.0 ) )\r
+#define mainNS_PER_CLOCK ( ( unsigned long ) ( ( 1.0 / ( double ) configCPU_CLOCK_HZ ) * 1000000000.0 ) )\r
\r
/* Task priorities. */\r
#define mainQUEUE_POLL_PRIORITY ( tskIDLE_PRIORITY + 2 )\r
portTickType xDelay = 0;\r
unsigned short usErrorCode = 0;\r
unsigned long ulIteration = 0;\r
-extern unsigned portSHORT usMaxJitter;\r
+extern unsigned short usMaxJitter;\r
\r
/* Intialise the sleeper. */\r
xDelay = xTaskGetTickCount();\r
{\r
int iData;\r
extern int periph_clk_khz;\r
-const unsigned portCHAR ucMACAddress[] =\r
+const unsigned char ucMACAddress[] =\r
{\r
configMAC_ADDR0, configMAC_ADDR1, configMAC_ADDR2, configMAC_ADDR3, configMAC_ADDR4, configMAC_ADDR5\r
};\r
{\r
/* Half duplex */\r
ENET_RCR |= ENET_RCR_DRT_MASK;\r
- ENET_TCR &= (unsigned portLONG)~ENET_TCR_FDEN_MASK;\r
+ ENET_TCR &= (unsigned long)~ENET_TCR_FDEN_MASK;\r
}\r
\r
if( iData & emacPHY_SPEED_STATUS )\r
* The co-routine that periodically initiates the transmission of the string on\r
* the UART.\r
*/\r
-static void vSerialTxCoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex );\r
+static void vSerialTxCoRoutine( CoRoutineHandle_t xHandle, unsigned portBASE_TYPE uxIndex );\r
\r
/* \r
* Writes a string the the LCD.\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void vSerialTxCoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex )\r
+static void vSerialTxCoRoutine( CoRoutineHandle_t xHandle, unsigned portBASE_TYPE uxIndex )\r
{\r
portTickType xDelayPeriod;\r
static unsigned long *pulRandomBytes = mainFIRST_PROGRAM_BYTES;\r
/*\r
* The task that receives the characters from UART 0.\r
*/\r
-static void vCommsRxCoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex );\r
+static void vCommsRxCoRoutine( CoRoutineHandle_t xHandle, unsigned portBASE_TYPE uxIndex );\r
\r
/*\r
* The co-routine that periodically initiates the transmission of the string on\r
* the UART.\r
*/\r
-static void vSerialTxCoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex );\r
+static void vSerialTxCoRoutine( CoRoutineHandle_t xHandle, unsigned portBASE_TYPE uxIndex );\r
\r
/* \r
* Writes a string the the LCD.\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void vCommsRxCoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex )\r
+static void vCommsRxCoRoutine( CoRoutineHandle_t xHandle, unsigned portBASE_TYPE uxIndex )\r
{\r
static char cRxedChar, cExpectedChar = mainFIRST_TX_CHAR;\r
portBASE_TYPE xResult;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void vSerialTxCoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex )\r
+static void vSerialTxCoRoutine( CoRoutineHandle_t xHandle, unsigned portBASE_TYPE uxIndex )\r
{\r
portTickType xDelayPeriod;\r
static unsigned long *pulRandomBytes = mainFIRST_PROGRAM_BYTES;\r
* The co-routine that periodically initiates the transmission of the string on\r
* the UART.\r
*/\r
-static void vSerialTxCoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex );\r
+static void vSerialTxCoRoutine( CoRoutineHandle_t xHandle, unsigned portBASE_TYPE uxIndex );\r
\r
/* \r
* Writes a string the the LCD.\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void vSerialTxCoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex )\r
+static void vSerialTxCoRoutine( CoRoutineHandle_t xHandle, unsigned portBASE_TYPE uxIndex )\r
{\r
portTickType xDelayPeriod;\r
static unsigned long *pulRandomBytes = mainFIRST_PROGRAM_BYTES;\r
* The co-routine that periodically initiates the transmission of the string on\r
* the UART.\r
*/\r
-static void vSerialTxCoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex );\r
+static void vSerialTxCoRoutine( CoRoutineHandle_t xHandle, unsigned portBASE_TYPE uxIndex );\r
\r
/* \r
* Writes a string the the LCD.\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void vSerialTxCoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex )\r
+static void vSerialTxCoRoutine( CoRoutineHandle_t xHandle, unsigned portBASE_TYPE uxIndex )\r
{\r
portTickType xDelayPeriod;\r
static unsigned long *pulRandomBytes = mainFIRST_PROGRAM_BYTES;\r
/*\r
* The task that receives the characters from UART 0.\r
*/\r
-static void vCommsRxCoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex );\r
+static void vCommsRxCoRoutine( CoRoutineHandle_t xHandle, unsigned portBASE_TYPE uxIndex );\r
\r
/*\r
* The co-routine that periodically initiates the transmission of the string on\r
* the UART.\r
*/\r
-static void vSerialTxCoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex );\r
+static void vSerialTxCoRoutine( CoRoutineHandle_t xHandle, unsigned portBASE_TYPE uxIndex );\r
\r
/* \r
* Writes a string the the LCD.\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void vCommsRxCoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex )\r
+static void vCommsRxCoRoutine( CoRoutineHandle_t xHandle, unsigned portBASE_TYPE uxIndex )\r
{\r
static char cRxedChar, cExpectedChar = mainFIRST_TX_CHAR;\r
portBASE_TYPE xResult;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void vSerialTxCoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex )\r
+static void vSerialTxCoRoutine( CoRoutineHandle_t xHandle, unsigned portBASE_TYPE uxIndex )\r
{\r
portTickType xDelayPeriod;\r
static unsigned long *pulRandomBytes = mainFIRST_PROGRAM_BYTES;\r
static void prvSetupHardware( void );\r
\r
/* The co-routines as described at the top of the file. */\r
-static void vI2CCoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex );\r
-static void vFlashCoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex );\r
+static void vI2CCoRoutine( CoRoutineHandle_t xHandle, unsigned portBASE_TYPE uxIndex );\r
+static void vFlashCoRoutine( CoRoutineHandle_t xHandle, unsigned portBASE_TYPE uxIndex );\r
\r
/*-----------------------------------------------------------*/\r
\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void vI2CCoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex )\r
+static void vI2CCoRoutine( CoRoutineHandle_t xHandle, unsigned portBASE_TYPE uxIndex )\r
{\r
portTickType xADCResult;\r
static portBASE_TYPE xResult = 0, xMilliSecs, xLED;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void vFlashCoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex )\r
+static void vFlashCoRoutine( CoRoutineHandle_t xHandle, unsigned portBASE_TYPE uxIndex )\r
{\r
portBASE_TYPE xResult, xNothing;\r
\r
}\r
/*-----------------------------------------------------------*/\r
\r
-void vSerialTxCoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex )\r
+void vSerialTxCoRoutine( CoRoutineHandle_t xHandle, unsigned portBASE_TYPE uxIndex )\r
{\r
portTickType xDelayPeriod;\r
static unsigned long *pulRandomBytes = commsFIRST_PROGRAM_BYTES;\r
* The co-routine that periodically initiates the transmission of the string on\r
* the UART.\r
*/\r
-void vSerialTxCoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex );\r
+void vSerialTxCoRoutine( CoRoutineHandle_t xHandle, unsigned portBASE_TYPE uxIndex );\r
\r
unsigned portBASE_TYPE uxGetCommsStatus( void );\r
\r
* The co-routine that reads the ADC and sends messages for display on the\r
* bottom row of the LCD.\r
*/\r
-static void prvADCCoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex );\r
+static void prvADCCoRoutine( CoRoutineHandle_t xHandle, unsigned portBASE_TYPE uxIndex );\r
\r
/*\r
* Function to simply set a known value into the general purpose registers\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void prvADCCoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex )\r
+static void prvADCCoRoutine( CoRoutineHandle_t xHandle, unsigned portBASE_TYPE uxIndex )\r
{\r
static unsigned long ulADCValue;\r
static char cMessageBuffer[ mainMAX_ADC_STRING_LEN ];\r
static void vPrintTask( void *pvParameter );\r
\r
/* String that is transmitted on the UART. */\r
-static portCHAR *cMessage = "Task woken by button interrupt! --- ";\r
-static volatile portCHAR *pcNextChar;\r
+static char *cMessage = "Task woken by button interrupt! --- ";\r
+static volatile char *pcNextChar;\r
\r
/* The semaphore used to wake the button handler task from within the GPIO\r
interrupt handler. */\r
xSemaphoreTake( xButtonSemaphore, 0 );\r
\r
/* Create the queue used to pass message to vPrintTask. */\r
- xPrintQueue = xQueueCreate( mainQUEUE_SIZE, sizeof( portCHAR * ) );\r
+ xPrintQueue = xQueueCreate( mainQUEUE_SIZE, sizeof( char * ) );\r
\r
/* Start the standard demo tasks. */\r
vStartIntegerMathTasks( tskIDLE_PRIORITY );\r
{\r
portBASE_TYPE xErrorOccurred = pdFALSE;\r
portTickType xLastExecutionTime;\r
-const portCHAR *pcPassMessage = "PASS";\r
-const portCHAR *pcFailMessage = "FAIL";\r
+const char *pcPassMessage = "PASS";\r
+const char *pcFailMessage = "FAIL";\r
\r
/* Initialise xLastExecutionTime so the first call to vTaskDelayUntil()\r
works correctly. */\r
\r
static void vButtonHandlerTask( void *pvParameters )\r
{\r
-const portCHAR *pcInterruptMessage = "Int";\r
+const char *pcInterruptMessage = "Int";\r
\r
for( ;; )\r
{\r
\r
void vUART_ISR(void)\r
{\r
-unsigned portLONG ulStatus;\r
+unsigned long ulStatus;\r
\r
/* What caused the interrupt. */\r
ulStatus = UARTIntStatus( UART0_BASE, pdTRUE );\r
\r
static void vPrintTask( void *pvParameters )\r
{\r
-portCHAR *pcMessage;\r
+char *pcMessage;\r
unsigned portBASE_TYPE uxLine = 0, uxRow = 0;\r
\r
for( ;; )\r
static void vPrintTask( void *pvParameter );\r
\r
/* String that is transmitted on the UART. */\r
-static portCHAR *cMessage = "Task woken by button interrupt! --- ";\r
-static volatile portCHAR *pcNextChar;\r
+static char *cMessage = "Task woken by button interrupt! --- ";\r
+static volatile char *pcNextChar;\r
\r
/* The semaphore used to wake the button handler task from within the GPIO\r
interrupt handler. */\r
xSemaphoreTake( xButtonSemaphore, 0 );\r
\r
/* Create the queue used to pass message to vPrintTask. */\r
- xPrintQueue = xQueueCreate( mainQUEUE_SIZE, sizeof( portCHAR * ) );\r
+ xPrintQueue = xQueueCreate( mainQUEUE_SIZE, sizeof( char * ) );\r
\r
/* Start the standard demo tasks. */\r
vStartIntegerMathTasks( tskIDLE_PRIORITY );\r
{\r
portBASE_TYPE xErrorOccurred = pdFALSE;\r
portTickType xLastExecutionTime;\r
-const portCHAR *pcPassMessage = "PASS";\r
-const portCHAR *pcFailMessage = "FAIL";\r
+const char *pcPassMessage = "PASS";\r
+const char *pcFailMessage = "FAIL";\r
\r
/* Initialise xLastExecutionTime so the first call to vTaskDelayUntil()\r
works correctly. */\r
\r
static void vButtonHandlerTask( void *pvParameters )\r
{\r
-const portCHAR *pcInterruptMessage = "Int";\r
+const char *pcInterruptMessage = "Int";\r
\r
for( ;; )\r
{\r
\r
void vUART_ISR(void)\r
{\r
-unsigned portLONG ulStatus;\r
+unsigned long ulStatus;\r
\r
/* What caused the interrupt. */\r
ulStatus = UARTIntStatus( UART0_BASE, pdTRUE );\r
\r
static void vPrintTask( void *pvParameters )\r
{\r
-portCHAR *pcMessage;\r
+char *pcMessage;\r
unsigned portBASE_TYPE uxLine = 0, uxRow = 0;\r
\r
for( ;; )\r
\r
/* The period of the system clock in nano seconds. This is used to calculate\r
the jitter time in nano seconds. */\r
-#define mainNS_PER_CLOCK ( ( unsigned portLONG ) ( ( 1.0 / ( double ) configCPU_CLOCK_HZ ) * 1000000000.0 ) )\r
+#define mainNS_PER_CLOCK ( ( unsigned long ) ( ( 1.0 / ( double ) configCPU_CLOCK_HZ ) * 1000000000.0 ) )\r
\r
/* Constants used when writing strings to the display. */\r
#define mainCHARACTER_HEIGHT ( 9 )\r
xQueueHandle xOLEDQueue;\r
\r
/* The welcome text. */\r
-const portCHAR * const pcWelcomeMessage = " www.FreeRTOS.org";\r
+const char * const pcWelcomeMessage = " www.FreeRTOS.org";\r
\r
/* Variables used to detect the test in the idle hook failing. */\r
-unsigned portLONG ulIdleError = pdFALSE;\r
+unsigned long ulIdleError = pdFALSE;\r
\r
/*-----------------------------------------------------------*/\r
\r
void vApplicationTickHook( void )\r
{\r
static xOLEDMessage xMessage = { "PASS" };\r
-static unsigned portLONG ulTicksSinceLastDisplay = 0;\r
+static unsigned long ulTicksSinceLastDisplay = 0;\r
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;\r
\r
/* Called from every tick interrupt. Have enough ticks passed to make it\r
void vOLEDTask( void *pvParameters )\r
{\r
xOLEDMessage xMessage;\r
-unsigned portLONG ulY, ulMaxY;\r
-static portCHAR cMessage[ mainMAX_MSG_LEN ];\r
-extern volatile unsigned portLONG ulMaxJitter;\r
+unsigned long ulY, ulMaxY;\r
+static char cMessage[ mainMAX_MSG_LEN ];\r
+extern volatile unsigned long ulMaxJitter;\r
unsigned portBASE_TYPE uxUnusedStackOnEntry, uxUnusedStackNow;\r
-const unsigned portCHAR *pucImage;\r
+const unsigned char *pucImage;\r
\r
/* Functions to access the OLED. The one used depends on the dev kit\r
being used. */\r
-void ( *vOLEDInit )( unsigned portLONG ) = NULL;\r
-void ( *vOLEDStringDraw )( const portCHAR *, unsigned portLONG, unsigned portLONG, unsigned portCHAR ) = NULL;\r
-void ( *vOLEDImageDraw )( const unsigned portCHAR *, unsigned portLONG, unsigned portLONG, unsigned portLONG, unsigned portLONG ) = NULL;\r
+void ( *vOLEDInit )( unsigned long ) = NULL;\r
+void ( *vOLEDStringDraw )( const char *, unsigned long, unsigned long, unsigned char ) = NULL;\r
+void ( *vOLEDImageDraw )( const unsigned char *, unsigned long, unsigned long, unsigned long, unsigned long ) = NULL;\r
void ( *vOLEDClear )( void ) = NULL;\r
\r
/* Just for demo purposes. */\r
}\r
/*-----------------------------------------------------------*/\r
\r
-void vApplicationStackOverflowHook( xTaskHandle *pxTask, signed portCHAR *pcTaskName )\r
+void vApplicationStackOverflowHook( xTaskHandle *pxTask, signed char *pcTaskName )\r
{\r
for( ;; );\r
}\r
void Timer0IntHandler( void );\r
\r
/* Stores the value of the maximum recorded jitter between interrupts. */\r
-volatile unsigned portLONG ulMaxJitter = 0UL;\r
+volatile unsigned long ulMaxJitter = 0UL;\r
\r
/* Counts the total number of times that the high frequency timer has 'ticked'.\r
This value is used by the run time stats function to work out what percentage\r
of CPU time each task is taking. */\r
-volatile unsigned portLONG ulHighFrequencyTimerTicks = 0UL;\r
+volatile unsigned long ulHighFrequencyTimerTicks = 0UL;\r
/*-----------------------------------------------------------*/\r
\r
void vSetupHighFrequencyTimer( void )\r
\r
void Timer0IntHandler( void )\r
{\r
-unsigned portLONG ulDifference;\r
-volatile unsigned portLONG ulCurrentCount;\r
-static unsigned portLONG ulMaxDifference = 0, ulLastCount = 0;\r
+unsigned long ulDifference;\r
+volatile unsigned long ulCurrentCount;\r
+static unsigned long ulMaxDifference = 0, ulLastCount = 0;\r
\r
/* We use the timer 1 counter value to measure the clock cycles between\r
the timer 0 interrupts. */\r
\r
/* The buffer used by the uIP stack. In this case the pointer is used to\r
point to one of the Rx buffers. */\r
-unsigned portCHAR *uip_buf;\r
+unsigned char *uip_buf;\r
\r
/* Buffers into which Rx data is placed. */\r
-static unsigned portCHAR ucRxBuffers[ emacNUM_RX_BUFFERS ][ UIP_BUFSIZE + ( 4 * emacFRAM_SIZE_BYTES ) ];\r
+static unsigned char ucRxBuffers[ emacNUM_RX_BUFFERS ][ UIP_BUFSIZE + ( 4 * emacFRAM_SIZE_BYTES ) ];\r
\r
/* The length of the data within each of the Rx buffers. */\r
-static unsigned portLONG ulRxLength[ emacNUM_RX_BUFFERS ];\r
+static unsigned long ulRxLength[ emacNUM_RX_BUFFERS ];\r
\r
/* Used to keep a track of the number of bytes to transmit. */\r
-static unsigned portLONG ulNextTxSpace;\r
+static unsigned long ulNextTxSpace;\r
\r
/*-----------------------------------------------------------*/\r
\r
}\r
/*-----------------------------------------------------------*/\r
\r
-void vIncrementTxLength( unsigned portLONG ulLength )\r
+void vIncrementTxLength( unsigned long ulLength )\r
{\r
ulNextTxSpace += ulLength;\r
}\r
void vSendBufferToMAC( void )\r
{\r
unsigned long *pulSource;\r
-unsigned portSHORT * pus;\r
-unsigned portLONG ulNextWord;\r
+unsigned short * pus;\r
+unsigned long ulNextWord;\r
\r
/* Locate the data to be send. */\r
- pus = ( unsigned portSHORT * ) uip_buf;\r
+ pus = ( unsigned short * ) uip_buf;\r
\r
/* Add in the size of the data. */\r
pus--;\r
vTaskDelay( macWAIT_SEND_TIME );\r
}\r
\r
- pulSource = ( unsigned portLONG * ) pus;\r
+ pulSource = ( unsigned long * ) pus;\r
\r
- for( ulNextWord = 0; ulNextWord < ulNextTxSpace; ulNextWord += sizeof( unsigned portLONG ) )\r
+ for( ulNextWord = 0; ulNextWord < ulNextTxSpace; ulNextWord += sizeof( unsigned long ) )\r
{\r
HWREG(ETH_BASE + MAC_O_DATA) = *pulSource;\r
pulSource++;\r
void vEMAC_ISR( void )\r
{\r
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;\r
-unsigned portLONG ulTemp;\r
+unsigned long ulTemp;\r
\r
/* Clear the interrupt. */\r
ulTemp = EthernetIntStatus( ETH_BASE, pdFALSE );\r
void vMACHandleTask( void *pvParameters )\r
{\r
unsigned long ulLen = 0, i;\r
-unsigned portLONG ulLength, ulInt;\r
+unsigned long ulLength, ulInt;\r
unsigned long *pulBuffer;\r
-static unsigned portLONG ulNextRxBuffer = 0;\r
+static unsigned long ulNextRxBuffer = 0;\r
portBASE_TYPE xSwitchRequired = pdFALSE;\r
\r
for( ;; )\r
}\r
\r
/* Read out the data into our buffer. */\r
- for( i = 0; i < ulLength; i += sizeof( unsigned portLONG ) )\r
+ for( i = 0; i < ulLength; i += sizeof( unsigned long ) )\r
{\r
*pulBuffer = HWREG( ETH_BASE + MAC_O_DATA );\r
pulBuffer++;\r
\r
static void prvSetMACAddress( void )\r
{\r
-unsigned portLONG ulUser0, ulUser1;\r
+unsigned long ulUser0, ulUser1;\r
unsigned char pucMACArray[8];\r
struct uip_eth_addr xAddr;\r
\r
}\r
/*-----------------------------------------------------------*/\r
\r
-void vApplicationProcessFormInput( portCHAR *pcInputString, portBASE_TYPE xInputLength )\r
+void vApplicationProcessFormInput( char *pcInputString, portBASE_TYPE xInputLength )\r
{\r
char *c, *pcText;\r
-static portCHAR cMessageForDisplay[ 32 ];\r
+static char cMessageForDisplay[ 32 ];\r
extern xQueueHandle xOLEDQueue;\r
xOLEDMessage xOLEDMessage;\r
\r
\r
/* The period of the system clock in nano seconds. This is used to calculate\r
the jitter time in nano seconds. */\r
-#define mainNS_PER_CLOCK ( ( unsigned portLONG ) ( ( 1.0 / ( double ) configCPU_CLOCK_HZ ) * 1000000000.0 ) )\r
+#define mainNS_PER_CLOCK ( ( unsigned long ) ( ( 1.0 / ( double ) configCPU_CLOCK_HZ ) * 1000000000.0 ) )\r
\r
/* Constants used when writing strings to the display. */\r
#define mainCHARACTER_HEIGHT ( 9 )\r
/*\r
* Hook functions that can get called by the kernel.\r
*/\r
-void vApplicationStackOverflowHook( xTaskHandle *pxTask, signed portCHAR *pcTaskName );\r
+void vApplicationStackOverflowHook( xTaskHandle *pxTask, signed char *pcTaskName );\r
void vApplicationTickHook( void );\r
\r
\r
xQueueHandle xOLEDQueue;\r
\r
/* The welcome text. */\r
-const portCHAR * const pcWelcomeMessage = " www.FreeRTOS.org";\r
+const char * const pcWelcomeMessage = " www.FreeRTOS.org";\r
\r
/*-----------------------------------------------------------*/\r
\r
void vApplicationTickHook( void )\r
{\r
static xOLEDMessage xMessage = { "PASS" };\r
-static unsigned portLONG ulTicksSinceLastDisplay = 0;\r
+static unsigned long ulTicksSinceLastDisplay = 0;\r
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;\r
\r
/* Called from every tick interrupt. Have enough ticks passed to make it\r
void vOLEDTask( void *pvParameters )\r
{\r
xOLEDMessage xMessage;\r
-unsigned portLONG ulY, ulMaxY;\r
-static portCHAR cMessage[ mainMAX_MSG_LEN ];\r
-extern volatile unsigned portLONG ulMaxJitter;\r
-const unsigned portCHAR *pucImage;\r
+unsigned long ulY, ulMaxY;\r
+static char cMessage[ mainMAX_MSG_LEN ];\r
+extern volatile unsigned long ulMaxJitter;\r
+const unsigned char *pucImage;\r
\r
/* Functions to access the OLED. The one used depends on the dev kit\r
being used. */\r
-void ( *vOLEDInit )( unsigned portLONG ) = NULL;\r
-void ( *vOLEDStringDraw )( const portCHAR *, unsigned portLONG, unsigned portLONG, unsigned portCHAR ) = NULL;\r
-void ( *vOLEDImageDraw )( const unsigned portCHAR *, unsigned portLONG, unsigned portLONG, unsigned portLONG, unsigned portLONG ) = NULL;\r
+void ( *vOLEDInit )( unsigned long ) = NULL;\r
+void ( *vOLEDStringDraw )( const char *, unsigned long, unsigned long, unsigned char ) = NULL;\r
+void ( *vOLEDImageDraw )( const unsigned char *, unsigned long, unsigned long, unsigned long, unsigned long ) = NULL;\r
void ( *vOLEDClear )( void ) = NULL;\r
\r
/* Map the OLED access functions to the driver functions that are appropriate\r
}\r
/*-----------------------------------------------------------*/\r
\r
-void vApplicationStackOverflowHook( xTaskHandle *pxTask, signed portCHAR *pcTaskName )\r
+void vApplicationStackOverflowHook( xTaskHandle *pxTask, signed char *pcTaskName )\r
{\r
( void ) pxTask;\r
( void ) pcTaskName;\r
\r
/* Misc defines. */\r
#define timerMAX_32BIT_VALUE ( 0xffffffffUL )\r
-#define timerTIMER_1_COUNT_VALUE ( * ( ( volatile unsigned long * ) ( ( unsigned portLONG ) TIMER1_BASE + 0x48UL ) ) )\r
+#define timerTIMER_1_COUNT_VALUE ( * ( ( volatile unsigned long * ) ( ( unsigned long ) TIMER1_BASE + 0x48UL ) ) )\r
\r
/*-----------------------------------------------------------*/\r
\r
void Timer0IntHandler( void );\r
\r
/* Stores the value of the maximum recorded jitter between interrupts. */\r
-volatile unsigned portLONG ulMaxJitter = 0;\r
+volatile unsigned long ulMaxJitter = 0;\r
\r
/*-----------------------------------------------------------*/\r
\r
\r
void Timer0IntHandler( void )\r
{\r
-unsigned portLONG ulDifference;\r
-volatile unsigned portLONG ulCurrentCount;\r
-static unsigned portLONG ulMaxDifference = 0, ulLastCount = 0;\r
+unsigned long ulDifference;\r
+volatile unsigned long ulCurrentCount;\r
+static unsigned long ulMaxDifference = 0, ulLastCount = 0;\r
\r
/* We use the timer 1 counter value to measure the clock cycles between\r
the timer 0 interrupts. */\r
\r
/* The buffer used by the uIP stack. In this case the pointer is used to\r
point to one of the Rx buffers. */\r
-unsigned portCHAR *uip_buf;\r
+unsigned char *uip_buf;\r
\r
/* Buffers into which Rx data is placed. */\r
static union\r
{\r
- unsigned portLONG ulJustForAlignment;\r
- unsigned portCHAR ucRxBuffers[ emacNUM_RX_BUFFERS ][ UIP_BUFSIZE + ( 4 * emacFRAM_SIZE_BYTES ) ];\r
+ unsigned long ulJustForAlignment;\r
+ unsigned char ucRxBuffers[ emacNUM_RX_BUFFERS ][ UIP_BUFSIZE + ( 4 * emacFRAM_SIZE_BYTES ) ];\r
} uxRxBuffers;\r
\r
/* The length of the data within each of the Rx buffers. */\r
-static unsigned portLONG ulRxLength[ emacNUM_RX_BUFFERS ];\r
+static unsigned long ulRxLength[ emacNUM_RX_BUFFERS ];\r
\r
/* Used to keep a track of the number of bytes to transmit. */\r
-static unsigned portLONG ulNextTxSpace;\r
+static unsigned long ulNextTxSpace;\r
\r
/*-----------------------------------------------------------*/\r
\r
}\r
/*-----------------------------------------------------------*/\r
\r
-void vIncrementTxLength( unsigned portLONG ulLength )\r
+void vIncrementTxLength( unsigned long ulLength )\r
{\r
ulNextTxSpace += ulLength;\r
}\r
void vSendBufferToMAC( void )\r
{\r
unsigned long *pulSource;\r
-unsigned portSHORT * pus;\r
-unsigned portLONG ulNextWord;\r
+unsigned short * pus;\r
+unsigned long ulNextWord;\r
\r
/* Locate the data to be send. */\r
- pus = ( unsigned portSHORT * ) uip_buf;\r
+ pus = ( unsigned short * ) uip_buf;\r
\r
/* Add in the size of the data. */\r
pus--;\r
vTaskDelay( macWAIT_SEND_TIME );\r
}\r
\r
- pulSource = ( unsigned portLONG * ) pus;\r
+ pulSource = ( unsigned long * ) pus;\r
\r
- for( ulNextWord = 0; ulNextWord < ulNextTxSpace; ulNextWord += sizeof( unsigned portLONG ) )\r
+ for( ulNextWord = 0; ulNextWord < ulNextTxSpace; ulNextWord += sizeof( unsigned long ) )\r
{\r
HWREG(ETH_BASE + MAC_O_DATA) = *pulSource;\r
pulSource++;\r
void vEMAC_ISR( void )\r
{\r
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;\r
-unsigned portLONG ulTemp;\r
+unsigned long ulTemp;\r
\r
/* Clear the interrupt. */\r
ulTemp = EthernetIntStatus( ETH_BASE, pdFALSE );\r
void vMACHandleTask( void *pvParameters )\r
{\r
unsigned long i, ulInt;\r
-unsigned portLONG ulLength;\r
+unsigned long ulLength;\r
unsigned long *pulBuffer;\r
-static unsigned portLONG ulNextRxBuffer = 0;\r
+static unsigned long ulNextRxBuffer = 0;\r
\r
for( ;; )\r
{\r
}\r
\r
/* Read out the data into our buffer. */\r
- for( i = 0; i < ulLength; i += sizeof( unsigned portLONG ) )\r
+ for( i = 0; i < ulLength; i += sizeof( unsigned long ) )\r
{\r
*pulBuffer = HWREG( ETH_BASE + MAC_O_DATA );\r
pulBuffer++;\r
\r
static void prvSetMACAddress( void )\r
{\r
-unsigned portLONG ulUser0, ulUser1;\r
+unsigned long ulUser0, ulUser1;\r
unsigned char pucMACArray[8];\r
struct uip_eth_addr xAddr;\r
\r
}\r
/*-----------------------------------------------------------*/\r
\r
-void vApplicationProcessFormInput( portCHAR *pcInputString, portBASE_TYPE xInputLength )\r
+void vApplicationProcessFormInput( char *pcInputString, portBASE_TYPE xInputLength )\r
{\r
char *c, *pcText;\r
-static portCHAR cMessageForDisplay[ 32 ];\r
+static char cMessageForDisplay[ 32 ];\r
extern xQueueHandle xOLEDQueue;\r
xOLEDMessage xOLEDMessage;\r
\r
\r
/* Write the message to the LCD. */\r
strcpy( cMessageForDisplay, pcText );\r
- xOLEDMessage.pcMessage = ( signed portCHAR * ) cMessageForDisplay;\r
+ xOLEDMessage.pcMessage = ( signed char * ) cMessageForDisplay;\r
xQueueSend( xOLEDQueue, &xOLEDMessage, portMAX_DELAY );\r
}\r
}\r
#define configUSE_TICK_HOOK 1\r
#define configUSE_TRACE_FACILITY 0\r
#define configUSE_16_BIT_TICKS 0\r
-#define configCPU_CLOCK_HZ ( ( unsigned portLONG ) 50000000 ) /* Timer clock. */\r
+#define configCPU_CLOCK_HZ ( ( unsigned long ) 50000000 ) /* Timer clock. */\r
#define configTICK_RATE_HZ ( ( portTickType ) 1000 )\r
#define configMAX_PRIORITIES ( 8 )\r
-#define configMINIMAL_STACK_SIZE ( ( unsigned portSHORT ) 128 )\r
+#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 128 )\r
#define configTOTAL_HEAP_SIZE ( ( size_t ) 32768 )\r
#define configMAX_TASK_NAME_LEN ( 16 )\r
#define configIDLE_SHOULD_YIELD 1\r
}\r
/*-----------------------------------------------------------*/\r
\r
-void vSerialPutString( xComPortHandle pxPort, const signed char * const pcString, unsigned portSHORT usStringLength )\r
+void vSerialPutString( xComPortHandle pxPort, const signed char * const pcString, unsigned short usStringLength )\r
{\r
signed char *pxNext;\r
\r
#define partstMAX_OUTPUT_LED ( 4 )\r
#define partstFIRST_LED GPIO_Pin_6\r
\r
-static unsigned portSHORT usOutputValue = 0;\r
+static unsigned short usOutputValue = 0;\r
\r
/*-----------------------------------------------------------*/\r
\r
\r
void vParTestSetLED( unsigned portBASE_TYPE uxLED, signed portBASE_TYPE xValue )\r
{\r
-unsigned portSHORT usBit;\r
+unsigned short usBit;\r
\r
vTaskSuspendAll();\r
{\r
\r
if( xValue == pdFALSE )\r
{\r
- usBit ^= ( unsigned portSHORT ) 0xffff;\r
+ usBit ^= ( unsigned short ) 0xffff;\r
usOutputValue &= usBit;\r
}\r
else\r
\r
void vParTestToggleLED( unsigned portBASE_TYPE uxLED )\r
{\r
-unsigned portSHORT usBit;\r
+unsigned short usBit;\r
\r
vTaskSuspendAll();\r
{\r
#define partstMAX_OUTPUT_LED ( 4 )\r
#define partstFIRST_LED GPIO_Pin_6\r
\r
-static unsigned portSHORT usOutputValue = 0;\r
+static unsigned short usOutputValue = 0;\r
\r
/*-----------------------------------------------------------*/\r
\r
\r
void vParTestSetLED( unsigned portBASE_TYPE uxLED, signed portBASE_TYPE xValue )\r
{\r
-unsigned portSHORT usBit;\r
+unsigned short usBit;\r
\r
vTaskSuspendAll();\r
{\r
\r
if( xValue == pdFALSE )\r
{\r
- usBit ^= ( unsigned portSHORT ) 0xffff;\r
+ usBit ^= ( unsigned short ) 0xffff;\r
usOutputValue &= usBit;\r
}\r
else\r
\r
void vParTestToggleLED( unsigned portBASE_TYPE uxLED )\r
{\r
-unsigned portSHORT usBit;\r
+unsigned short usBit;\r
\r
vTaskSuspendAll();\r
{\r
#define mainCHECK_DELAY ( ( portTickType ) 5000 / portTICK_RATE_MS )\r
\r
/* The number of nano seconds between each processor clock. */\r
-#define mainNS_PER_CLOCK ( ( unsigned portLONG ) ( ( 1.0 / ( double ) configCPU_CLOCK_HZ ) * 1000000000.0 ) )\r
+#define mainNS_PER_CLOCK ( ( unsigned long ) ( ( 1.0 / ( double ) configCPU_CLOCK_HZ ) * 1000000000.0 ) )\r
\r
/* Baud rate used by the comtest tasks. */\r
#define mainCOM_TEST_BAUD_RATE ( 115200 )\r
\r
/* Initialise the LCD and display a startup message. */\r
prvConfigureLCD();\r
- LCD_DrawMonoPict( ( unsigned portLONG * ) pcBitmap );\r
+ LCD_DrawMonoPict( ( unsigned long * ) pcBitmap );\r
\r
for( ;; )\r
{\r
while( xQueueReceive( xLCDQueue, &xMessage, portMAX_DELAY ) != pdPASS );\r
\r
/* Display the message. Print each message to a different position. */\r
- printf( ( portCHAR const * ) xMessage.pcMessage );\r
+ printf( ( char const * ) xMessage.pcMessage );\r
}\r
}\r
/*-----------------------------------------------------------*/\r
{\r
portTickType xLastExecutionTime;\r
xLCDMessage xMessage;\r
-static signed portCHAR cPassMessage[ mainMAX_MSG_LEN ];\r
-extern unsigned portSHORT usMaxJitter;\r
+static signed char cPassMessage[ mainMAX_MSG_LEN ];\r
+extern unsigned short usMaxJitter;\r
\r
xLastExecutionTime = xTaskGetTickCount();\r
xMessage.pcMessage = cPassMessage;\r
}\r
else\r
{\r
- sprintf( ( portCHAR * ) cPassMessage, "PASS [%uns]\n", ( ( unsigned portLONG ) usMaxJitter ) * mainNS_PER_CLOCK );\r
+ sprintf( ( char * ) cPassMessage, "PASS [%uns]\n", ( ( unsigned long ) usMaxJitter ) * mainNS_PER_CLOCK );\r
}\r
\r
/* Send the message to the LCD gatekeeper for display. */\r
}\r
\r
/* 2 wait states required on the flash. */\r
- *( ( unsigned portLONG * ) 0x40022000 ) = 0x02;\r
+ *( ( unsigned long * ) 0x40022000 ) = 0x02;\r
\r
/* HCLK = SYSCLK */\r
RCC_HCLKConfig( RCC_SYSCLK_Div1 );\r
\r
int fputc( int ch, FILE *f )\r
{\r
-static unsigned portSHORT usColumn = 0, usRefColumn = mainCOLUMN_START;\r
-static unsigned portCHAR ucLine = 0;\r
+static unsigned short usColumn = 0, usRefColumn = mainCOLUMN_START;\r
+static unsigned char ucLine = 0;\r
\r
if( ( usColumn == 0 ) && ( ucLine == 0 ) )\r
{\r
\r
#ifdef DEBUG\r
/* Keep the linker happy. */\r
-void assert_failed( unsigned portCHAR* pcFile, unsigned portLONG ulLine )\r
+void assert_failed( unsigned char* pcFile, unsigned long ulLine )\r
{\r
for( ;; )\r
{\r
/*\r
* See the serial2.h header file.\r
*/\r
-xComPortHandle xSerialPortInitMinimal( unsigned portLONG ulWantedBaud, unsigned portBASE_TYPE uxQueueLength )\r
+xComPortHandle xSerialPortInitMinimal( unsigned long ulWantedBaud, unsigned portBASE_TYPE uxQueueLength )\r
{\r
xComPortHandle xReturn;\r
USART_InitTypeDef USART_InitStructure;\r
GPIO_InitTypeDef GPIO_InitStructure;\r
\r
/* Create the queues used to hold Rx/Tx characters. */\r
- xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed portCHAR ) );\r
- xCharsForTx = xQueueCreate( uxQueueLength + 1, ( unsigned portBASE_TYPE ) sizeof( signed portCHAR ) );\r
+ xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed char ) );\r
+ xCharsForTx = xQueueCreate( uxQueueLength + 1, ( unsigned portBASE_TYPE ) sizeof( signed char ) );\r
\r
/* If the queue/semaphore was created correctly then setup the serial port\r
hardware. */\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed portCHAR *pcRxedChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime )\r
{\r
/* The port handle is not required as this driver only supports one port. */\r
( void ) pxPort;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-void vSerialPutString( xComPortHandle pxPort, const signed portCHAR * const pcString, unsigned portSHORT usStringLength )\r
+void vSerialPutString( xComPortHandle pxPort, const signed char * const pcString, unsigned short usStringLength )\r
{\r
-signed portCHAR *pxNext;\r
+signed char *pxNext;\r
\r
/* A couple of parameters that this port does not use. */\r
( void ) usStringLength;\r
( void ) pxPort;\r
\r
/* Send each character in the string, one at a time. */\r
- pxNext = ( signed portCHAR * ) pcString;\r
+ pxNext = ( signed char * ) pcString;\r
while( *pxNext )\r
{\r
xSerialPutChar( pxPort, *pxNext, serNO_BLOCK );\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed portCHAR cOutChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime )\r
{\r
signed portBASE_TYPE xReturn;\r
\r
void vUARTInterruptHandler( void )\r
{\r
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;\r
-portCHAR cChar;\r
+char cChar;\r
\r
if( USART_GetITStatus( USART1, USART_IT_TXE ) == SET )\r
{\r
\r
/* The set frequency of the interrupt. Deviations from this are measured as\r
the jitter. */\r
-#define timerINTERRUPT_FREQUENCY ( ( unsigned portSHORT ) 20000 )\r
+#define timerINTERRUPT_FREQUENCY ( ( unsigned short ) 20000 )\r
\r
/* The expected time between each of the timer interrupts - if the jitter was\r
zero. */\r
void vTimer2IntHandler( void );\r
\r
/* Stores the value of the maximum recorded jitter between interrupts. */\r
-volatile unsigned portSHORT usMaxJitter = 0;\r
+volatile unsigned short usMaxJitter = 0;\r
\r
/*-----------------------------------------------------------*/\r
\r
\r
/* Time base configuration for timer 2 - which generates the interrupts. */\r
ulFrequency = configCPU_CLOCK_HZ / timerINTERRUPT_FREQUENCY; \r
- TIM_TimeBaseStructure.TIM_Period = ( unsigned portSHORT ) ( ulFrequency & 0xffffUL );\r
+ TIM_TimeBaseStructure.TIM_Period = ( unsigned short ) ( ulFrequency & 0xffffUL );\r
TIM_TimeBaseStructure.TIM_Prescaler = 0x0;\r
TIM_TimeBaseStructure.TIM_ClockDivision = 0x0;\r
TIM_TimeBaseStructure.TIM_CounterMode = TIM_CounterMode_Up;\r
\r
/* Configuration for timer 3 which is used as a high resolution time\r
measurement. */\r
- TIM_TimeBaseStructure.TIM_Period = ( unsigned portSHORT ) 0xffff;\r
+ TIM_TimeBaseStructure.TIM_Period = ( unsigned short ) 0xffff;\r
TIM_TimeBaseInit( TIM3, &TIM_TimeBaseStructure );\r
TIM_ARRPreloadConfig( TIM3, ENABLE );\r
\r
\r
void vTimer2IntHandler( void )\r
{\r
-static unsigned portSHORT usLastCount = 0, usSettleCount = 0, usMaxDifference = 0;\r
-unsigned portSHORT usThisCount, usDifference;\r
+static unsigned short usLastCount = 0, usSettleCount = 0, usMaxDifference = 0;\r
+unsigned short usThisCount, usDifference;\r
\r
/* Capture the free running timer 3 value as we enter the interrupt. */\r
usThisCount = TIM3->CNT;\r
#define partstMAX_OUTPUT_LED ( 4 )\r
#define partstFIRST_LED GPIO_Pin_6\r
\r
-static unsigned portSHORT usOutputValue = 0;\r
+static unsigned short usOutputValue = 0;\r
\r
/*-----------------------------------------------------------*/\r
\r
\r
void vParTestSetLED( unsigned portBASE_TYPE uxLED, signed portBASE_TYPE xValue )\r
{\r
-unsigned portSHORT usBit;\r
+unsigned short usBit;\r
\r
vTaskSuspendAll();\r
{\r
\r
if( xValue == pdFALSE )\r
{\r
- usBit ^= ( unsigned portSHORT ) 0xffff;\r
+ usBit ^= ( unsigned short ) 0xffff;\r
usOutputValue &= usBit;\r
}\r
else\r
\r
void vParTestToggleLED( unsigned portBASE_TYPE uxLED )\r
{\r
-unsigned portSHORT usBit;\r
+unsigned short usBit;\r
\r
vTaskSuspendAll();\r
{\r
#define mainCHECK_DELAY ( ( portTickType ) 5000 / portTICK_RATE_MS )\r
\r
/* The number of nano seconds between each processor clock. */\r
-#define mainNS_PER_CLOCK ( ( unsigned portLONG ) ( ( 1.0 / ( double ) configCPU_CLOCK_HZ ) * 1000000000.0 ) )\r
+#define mainNS_PER_CLOCK ( ( unsigned long ) ( ( 1.0 / ( double ) configCPU_CLOCK_HZ ) * 1000000000.0 ) )\r
\r
/* Baud rate used by the comtest tasks. */\r
#define mainCOM_TEST_BAUD_RATE ( 115200 )\r
\r
/* Initialise the LCD and display a startup message. */\r
prvConfigureLCD();\r
- LCD_DrawMonoPict( ( unsigned portLONG * ) pcBitmap );\r
+ LCD_DrawMonoPict( ( unsigned long * ) pcBitmap );\r
\r
for( ;; )\r
{\r
while( xQueueReceive( xLCDQueue, &xMessage, portMAX_DELAY ) != pdPASS );\r
\r
/* Display the message. Print each message to a different position. */\r
- printf( ( portCHAR const * ) xMessage.pcMessage );\r
+ printf( ( char const * ) xMessage.pcMessage );\r
}\r
}\r
/*-----------------------------------------------------------*/\r
{\r
portTickType xLastExecutionTime;\r
xLCDMessage xMessage;\r
-static signed portCHAR cPassMessage[ mainMAX_MSG_LEN ];\r
-extern unsigned portSHORT usMaxJitter;\r
+static signed char cPassMessage[ mainMAX_MSG_LEN ];\r
+extern unsigned short usMaxJitter;\r
\r
xLastExecutionTime = xTaskGetTickCount();\r
xMessage.pcMessage = cPassMessage;\r
}\r
else\r
{\r
- sprintf( ( portCHAR * ) cPassMessage, "PASS [%uns]\n", ( ( unsigned portLONG ) usMaxJitter ) * mainNS_PER_CLOCK );\r
+ sprintf( ( char * ) cPassMessage, "PASS [%uns]\n", ( ( unsigned long ) usMaxJitter ) * mainNS_PER_CLOCK );\r
}\r
\r
/* Send the message to the LCD gatekeeper for display. */\r
}\r
\r
/* 2 wait states required on the flash. */\r
- *( ( unsigned portLONG * ) 0x40022000 ) = 0x02;\r
+ *( ( unsigned long * ) 0x40022000 ) = 0x02;\r
\r
/* HCLK = SYSCLK */\r
RCC_HCLKConfig( RCC_SYSCLK_Div1 );\r
\r
int fputc( int ch, FILE *f )\r
{\r
-static unsigned portSHORT usColumn = 0, usRefColumn = mainCOLUMN_START;\r
-static unsigned portCHAR ucLine = 0;\r
+static unsigned short usColumn = 0, usRefColumn = mainCOLUMN_START;\r
+static unsigned char ucLine = 0;\r
\r
if( ( usColumn == 0 ) && ( ucLine == 0 ) )\r
{\r
\r
#ifdef DEBUG\r
/* Keep the linker happy. */\r
-void assert_failed( unsigned portCHAR* pcFile, unsigned portLONG ulLine )\r
+void assert_failed( unsigned char* pcFile, unsigned long ulLine )\r
{\r
for( ;; )\r
{\r
/*\r
* See the serial2.h header file.\r
*/\r
-xComPortHandle xSerialPortInitMinimal( unsigned portLONG ulWantedBaud, unsigned portBASE_TYPE uxQueueLength )\r
+xComPortHandle xSerialPortInitMinimal( unsigned long ulWantedBaud, unsigned portBASE_TYPE uxQueueLength )\r
{\r
xComPortHandle xReturn;\r
USART_InitTypeDef USART_InitStructure;\r
GPIO_InitTypeDef GPIO_InitStructure;\r
\r
/* Create the queues used to hold Rx/Tx characters. */\r
- xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed portCHAR ) );\r
- xCharsForTx = xQueueCreate( uxQueueLength + 1, ( unsigned portBASE_TYPE ) sizeof( signed portCHAR ) );\r
+ xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed char ) );\r
+ xCharsForTx = xQueueCreate( uxQueueLength + 1, ( unsigned portBASE_TYPE ) sizeof( signed char ) );\r
\r
/* If the queue/semaphore was created correctly then setup the serial port\r
hardware. */\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed portCHAR *pcRxedChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime )\r
{\r
/* The port handle is not required as this driver only supports one port. */\r
( void ) pxPort;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-void vSerialPutString( xComPortHandle pxPort, const signed portCHAR * const pcString, unsigned portSHORT usStringLength )\r
+void vSerialPutString( xComPortHandle pxPort, const signed char * const pcString, unsigned short usStringLength )\r
{\r
-signed portCHAR *pxNext;\r
+signed char *pxNext;\r
\r
/* A couple of parameters that this port does not use. */\r
( void ) usStringLength;\r
( void ) pxPort;\r
\r
/* Send each character in the string, one at a time. */\r
- pxNext = ( signed portCHAR * ) pcString;\r
+ pxNext = ( signed char * ) pcString;\r
while( *pxNext )\r
{\r
xSerialPutChar( pxPort, *pxNext, serNO_BLOCK );\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed portCHAR cOutChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime )\r
{\r
signed portBASE_TYPE xReturn;\r
\r
void vUARTInterruptHandler( void )\r
{\r
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;\r
-portCHAR cChar;\r
+char cChar;\r
\r
if( USART_GetITStatus( USART1, USART_IT_TXE ) == SET )\r
{\r
\r
/* The set frequency of the interrupt. Deviations from this are measured as\r
the jitter. */\r
-#define timerINTERRUPT_FREQUENCY ( ( unsigned portSHORT ) 20000 )\r
+#define timerINTERRUPT_FREQUENCY ( ( unsigned short ) 20000 )\r
\r
/* The expected time between each of the timer interrupts - if the jitter was\r
zero. */\r
void vTimer2IntHandler( void );\r
\r
/* Stores the value of the maximum recorded jitter between interrupts. */\r
-volatile unsigned portSHORT usMaxJitter = 0;\r
+volatile unsigned short usMaxJitter = 0;\r
\r
/*-----------------------------------------------------------*/\r
\r
\r
/* Time base configuration for timer 2 - which generates the interrupts. */\r
ulFrequency = configCPU_CLOCK_HZ / timerINTERRUPT_FREQUENCY; \r
- TIM_TimeBaseStructure.TIM_Period = ( unsigned portSHORT ) ( ulFrequency & 0xffffUL );\r
+ TIM_TimeBaseStructure.TIM_Period = ( unsigned short ) ( ulFrequency & 0xffffUL );\r
TIM_TimeBaseStructure.TIM_Prescaler = 0x0;\r
TIM_TimeBaseStructure.TIM_ClockDivision = 0x0;\r
TIM_TimeBaseStructure.TIM_CounterMode = TIM_CounterMode_Up;\r
\r
/* Configuration for timer 3 which is used as a high resolution time\r
measurement. */\r
- TIM_TimeBaseStructure.TIM_Period = ( unsigned portSHORT ) 0xffff;\r
+ TIM_TimeBaseStructure.TIM_Period = ( unsigned short ) 0xffff;\r
TIM_TimeBaseInit( TIM3, &TIM_TimeBaseStructure );\r
TIM_ARRPreloadConfig( TIM3, ENABLE );\r
\r
\r
void vTimer2IntHandler( void )\r
{\r
-static unsigned portSHORT usLastCount = 0, usSettleCount = 0, usMaxDifference = 0;\r
-unsigned portSHORT usThisCount, usDifference;\r
+static unsigned short usLastCount = 0, usSettleCount = 0, usMaxDifference = 0;\r
+unsigned short usThisCount, usDifference;\r
\r
/* Capture the free running timer 3 value as we enter the interrupt. */\r
usThisCount = TIM3->CNT;\r
#define partstMAX_OUTPUT_LED ( 2 )\r
#define partstFIRST_LED GPIO_Pin_8\r
\r
-static unsigned portSHORT usOutputValue = 0;\r
+static unsigned short usOutputValue = 0;\r
\r
/*-----------------------------------------------------------*/\r
\r
\r
void vParTestSetLED( unsigned portBASE_TYPE uxLED, signed portBASE_TYPE xValue )\r
{\r
-unsigned portSHORT usBit;\r
+unsigned short usBit;\r
\r
vTaskSuspendAll();\r
{\r
\r
if( xValue == pdFALSE )\r
{\r
- usBit ^= ( unsigned portSHORT ) 0xffff;\r
+ usBit ^= ( unsigned short ) 0xffff;\r
usOutputValue &= usBit;\r
}\r
else\r
\r
void vParTestToggleLED( unsigned portBASE_TYPE uxLED )\r
{\r
-unsigned portSHORT usBit;\r
+unsigned short usBit;\r
\r
vTaskSuspendAll();\r
{\r
#define mainFLASH_DELAY ( ( portTickType ) 1000 / portTICK_RATE_MS )\r
\r
/* The number of nano seconds between each processor clock. */\r
-#define mainNS_PER_CLOCK ( ( unsigned portLONG ) ( ( 1.0 / ( double ) configCPU_CLOCK_HZ ) * 1000000000.0 ) )\r
+#define mainNS_PER_CLOCK ( ( unsigned long ) ( ( 1.0 / ( double ) configCPU_CLOCK_HZ ) * 1000000000.0 ) )\r
\r
/* The two types of message that can be sent to the LCD task. */\r
#define mainUPDATE_BALL_MESSAGE ( 0 )\r
void prvLCDTask( void *pvParameters )\r
{\r
xLCDMessage xMessage;\r
-portCHAR cY = mainLCD_CHAR_HEIGHT;\r
-const portCHAR * const pcString = "www.FreeRTOS.org";\r
-const portCHAR * const pcBlankLine = " ";\r
+char cY = mainLCD_CHAR_HEIGHT;\r
+const char * const pcString = "www.FreeRTOS.org";\r
+const char * const pcBlankLine = " ";\r
\r
DRAW_Init();\r
\r
{\r
portTickType xLastExecutionTime;\r
xLCDMessage xMessage;\r
-static signed portCHAR cPassMessage[ mainMAX_MSG_LEN ];\r
-extern unsigned portSHORT usMaxJitter;\r
+static signed char cPassMessage[ mainMAX_MSG_LEN ];\r
+extern unsigned short usMaxJitter;\r
\r
/* Initialise the xLastExecutionTime variable on task entry. */\r
xLastExecutionTime = xTaskGetTickCount();\r
with the max measured jitter time also included (as per the\r
fast interrupt test described at the top of this file and on\r
the online documentation page for this demo application). */\r
- sprintf( ( portCHAR * ) cPassMessage, "PASS [%uns]", ( ( unsigned portLONG ) usMaxJitter ) * mainNS_PER_CLOCK );\r
+ sprintf( ( char * ) cPassMessage, "PASS [%uns]", ( ( unsigned long ) usMaxJitter ) * mainNS_PER_CLOCK );\r
}\r
\r
/* Send the message to the LCD gatekeeper for display. */\r
\r
void vApplicationTickHook( void )\r
{\r
-static unsigned portLONG ulCallCount;\r
+static unsigned long ulCallCount;\r
static const xLCDMessage xMemsMessage = { mainUPDATE_BALL_MESSAGE, NULL };\r
static portBASE_TYPE xHigherPriorityTaskWoken;\r
\r
}\r
\r
/* 2 wait states required on the flash. */\r
- *( ( unsigned portLONG * ) 0x40022000 ) = 0x02;\r
+ *( ( unsigned long * ) 0x40022000 ) = 0x02;\r
\r
/* HCLK = SYSCLK */\r
RCC_HCLKConfig( RCC_SYSCLK_Div1 );\r
\r
/* The set frequency of the interrupt. Deviations from this are measured as\r
the jitter. */\r
-#define timerINTERRUPT_FREQUENCY ( ( unsigned portSHORT ) 20000 )\r
+#define timerINTERRUPT_FREQUENCY ( ( unsigned short ) 20000 )\r
\r
/* The expected time between each of the timer interrupts - if the jitter was\r
zero. */\r
void vTimer2IntHandler( void );\r
\r
/* Stores the value of the maximum recorded jitter between interrupts. */\r
-volatile unsigned portSHORT usMaxJitter = 0;\r
+volatile unsigned short usMaxJitter = 0;\r
\r
/*-----------------------------------------------------------*/\r
\r
\r
/* Time base configuration for timer 2 - which generates the interrupts. */\r
ulFrequency = configCPU_CLOCK_HZ / timerINTERRUPT_FREQUENCY; \r
- TIM_TimeBaseStructure.TIM_Period = ( unsigned portSHORT ) ( ulFrequency & 0xffffUL );\r
+ TIM_TimeBaseStructure.TIM_Period = ( unsigned short ) ( ulFrequency & 0xffffUL );\r
TIM_TimeBaseStructure.TIM_Prescaler = 0x0;\r
TIM_TimeBaseStructure.TIM_ClockDivision = 0x0;\r
TIM_TimeBaseStructure.TIM_CounterMode = TIM_CounterMode_Up;\r
\r
/* Configuration for timer 3 which is used as a high resolution time\r
measurement. */\r
- TIM_TimeBaseStructure.TIM_Period = ( unsigned portSHORT ) 0xffff;\r
+ TIM_TimeBaseStructure.TIM_Period = ( unsigned short ) 0xffff;\r
TIM_TimeBaseInit( TIM3, &TIM_TimeBaseStructure );\r
TIM_ARRPreloadConfig( TIM3, ENABLE );\r
\r
\r
void vTimer2IntHandler( void )\r
{\r
-static unsigned portSHORT usLastCount = 0, usSettleCount = 0, usMaxDifference = 0;\r
-unsigned portSHORT usThisCount, usDifference;\r
+static unsigned short usLastCount = 0, usSettleCount = 0, usMaxDifference = 0;\r
+unsigned short usThisCount, usDifference;\r
\r
/* Capture the free running timer 3 value as we enter the interrupt. */\r
usThisCount = TIM3->CNT;\r
/*\r
* See the serial2.h header file.\r
*/\r
-xComPortHandle xSerialPortInitMinimal( unsigned portLONG ulWantedBaud, unsigned portBASE_TYPE uxQueueLength )\r
+xComPortHandle xSerialPortInitMinimal( unsigned long ulWantedBaud, unsigned portBASE_TYPE uxQueueLength )\r
{\r
USART_InitTypeDef USART_InitStructure;\r
xComPortHandle xReturn;\r
NVIC_InitTypeDef NVIC_InitStructure;\r
\r
/* Create the queues used to hold Rx/Tx characters. */\r
- xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed portCHAR ) );\r
- xCharsForTx = xQueueCreate( uxQueueLength + 1, ( unsigned portBASE_TYPE ) sizeof( signed portCHAR ) );\r
+ xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed char ) );\r
+ xCharsForTx = xQueueCreate( uxQueueLength + 1, ( unsigned portBASE_TYPE ) sizeof( signed char ) );\r
\r
/* If the queues were created correctly then setup the serial port\r
hardware. */\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed portCHAR *pcRxedChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime )\r
{\r
/* The port handle is not required as this driver only supports one port. */\r
( void ) pxPort;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-void vSerialPutString( xComPortHandle pxPort, const signed portCHAR * const pcString, unsigned portSHORT usStringLength )\r
+void vSerialPutString( xComPortHandle pxPort, const signed char * const pcString, unsigned short usStringLength )\r
{\r
-signed portCHAR *pxNext;\r
+signed char *pxNext;\r
\r
/* A couple of parameters that this port does not use. */\r
( void ) usStringLength;\r
( void ) pxPort;\r
\r
/* Send each character in the string, one at a time. */\r
- pxNext = ( signed portCHAR * ) pcString;\r
+ pxNext = ( signed char * ) pcString;\r
while( *pxNext )\r
{\r
xSerialPutChar( pxPort, *pxNext, serNO_BLOCK );\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed portCHAR cOutChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime )\r
{\r
signed portBASE_TYPE xReturn;\r
\r
void USART3_IRQHandler( void )\r
{\r
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;\r
-portCHAR cChar;\r
+char cChar;\r
\r
if( USART_GetITStatus( USART3, USART_IT_TXE ) == SET )\r
{\r
*/\r
void vApplicationSetupInterrupts( void )\r
{\r
-const unsigned portSHORT usCompareMatchValue = ( ( configCPU_CLOCK_HZ / portPRESCALE_VALUE ) / configTICK_RATE_HZ );\r
+const unsigned short usCompareMatchValue = ( ( configCPU_CLOCK_HZ / portPRESCALE_VALUE ) / configTICK_RATE_HZ );\r
\r
/* Configure interrupt priority and level and unmask interrupt for PIT0. */\r
MCF_INTC0_ICR55 = ( 1 | ( configKERNEL_INTERRUPT_PRIORITY << 3 ) );\r
\r
__declspec(interrupt:0) void vPIT0InterruptHandler( void )\r
{\r
-unsigned portLONG ulSavedInterruptMask;\r
+unsigned long ulSavedInterruptMask;\r
\r
/* Clear the PIT0 interrupt. */\r
MCF_PIT0_PCSR |= MCF_PIT_PCSR_PIF;\r
#define mainCHECK_LED ( 3 )\r
\r
/* ComTest constants - there is no free LED for the comtest tasks. */\r
-#define mainCOM_TEST_BAUD_RATE ( ( unsigned portLONG ) 19200 )\r
+#define mainCOM_TEST_BAUD_RATE ( ( unsigned long ) 19200 )\r
#define mainCOM_TEST_LED ( 5 )\r
\r
/* Task priorities. */\r
/*-----------------------------------------------------------*/\r
\r
/* Counters used to detect errors within the reg test tasks. */\r
-static volatile unsigned portLONG ulRegTest1Counter = 0x11111111, ulRegTest2Counter = 0x22222222;\r
+static volatile unsigned long ulRegTest1Counter = 0x11111111, ulRegTest2Counter = 0x22222222;\r
\r
/*-----------------------------------------------------------*/\r
\r
\r
static void prvCheckTask( void *pvParameters )\r
{\r
-unsigned portLONG ulTicksToWait = mainNO_ERROR_PERIOD, ulError = 0, ulLastRegTest1Count = 0, ulLastRegTest2Count = 0;\r
+unsigned long ulTicksToWait = mainNO_ERROR_PERIOD, ulError = 0, ulLastRegTest1Count = 0, ulLastRegTest2Count = 0;\r
portTickType xLastExecutionTime;\r
volatile unsigned portBASE_TYPE uxUnusedStack;\r
\r
}\r
/*-----------------------------------------------------------*/\r
\r
-void vApplicationStackOverflowHook( xTaskHandle *pxTask, signed portCHAR *pcTaskName )\r
+void vApplicationStackOverflowHook( xTaskHandle *pxTask, signed char *pcTaskName )\r
{\r
/* This will get called if a stack overflow is detected during the context\r
switch. Set configCHECK_FOR_STACK_OVERFLOWS to 2 to also check for stack\r
#include "serial.h"\r
\r
/* Hardware definitions. */\r
-#define serNO_PARITY ( ( unsigned portCHAR ) 0x02 << 3 )\r
-#define ser8DATA_BITS ( ( unsigned portCHAR ) 0x03 )\r
-#define ser1STOP_BIT ( ( unsigned portCHAR ) 0x07 )\r
-#define serSYSTEM_CLOCK ( ( unsigned portCHAR ) 0xdd )\r
-#define serTX_ENABLE ( ( unsigned portCHAR ) 0x04 )\r
-#define serRX_ENABLE ( ( unsigned portCHAR ) 0x01 )\r
-#define serTX_INT ( ( unsigned portCHAR ) 0x01 )\r
-#define serRX_INT ( ( unsigned portCHAR ) 0x02 )\r
+#define serNO_PARITY ( ( unsigned char ) 0x02 << 3 )\r
+#define ser8DATA_BITS ( ( unsigned char ) 0x03 )\r
+#define ser1STOP_BIT ( ( unsigned char ) 0x07 )\r
+#define serSYSTEM_CLOCK ( ( unsigned char ) 0xdd )\r
+#define serTX_ENABLE ( ( unsigned char ) 0x04 )\r
+#define serRX_ENABLE ( ( unsigned char ) 0x01 )\r
+#define serTX_INT ( ( unsigned char ) 0x01 )\r
+#define serRX_INT ( ( unsigned char ) 0x02 )\r
\r
\r
/* The queues used to communicate between tasks and ISR's. */\r
\r
/*-----------------------------------------------------------*/\r
\r
-xComPortHandle xSerialPortInitMinimal( unsigned portLONG ulWantedBaud, unsigned portBASE_TYPE uxQueueLength )\r
+xComPortHandle xSerialPortInitMinimal( unsigned long ulWantedBaud, unsigned portBASE_TYPE uxQueueLength )\r
{\r
-const unsigned portLONG ulBaudRateDivisor = ( configCPU_CLOCK_HZ / ( 32UL * ulWantedBaud ) );\r
+const unsigned long ulBaudRateDivisor = ( configCPU_CLOCK_HZ / ( 32UL * ulWantedBaud ) );\r
\r
/* Create the queues used by the com test task. */\r
- xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed portCHAR ) );\r
- xCharsForTx = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed portCHAR ) );\r
+ xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed char ) );\r
+ xCharsForTx = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed char ) );\r
\r
xTxHasEnded = pdTRUE;\r
\r
MCF_UART0_UMR2 = ser1STOP_BIT;\r
MCF_UART0_UCSR = serSYSTEM_CLOCK;\r
\r
- MCF_UART0_UBG1 = ( unsigned portCHAR ) ( ( ulBaudRateDivisor >> 8UL ) & 0xffUL );\r
- MCF_UART0_UBG2 = ( unsigned portCHAR ) ( ulBaudRateDivisor & 0xffUL );\r
+ MCF_UART0_UBG1 = ( unsigned char ) ( ( ulBaudRateDivisor >> 8UL ) & 0xffUL );\r
+ MCF_UART0_UBG2 = ( unsigned char ) ( ulBaudRateDivisor & 0xffUL );\r
\r
/* Turn it on. */\r
MCF_UART0_UCR = serTX_ENABLE | serRX_ENABLE;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed portCHAR *pcRxedChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime )\r
{\r
/* Only one port is supported. */\r
( void ) pxPort;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed portCHAR cOutChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime )\r
{\r
/* Only one port is supported. */\r
( void ) pxPort;\r
\r
__declspec(interrupt:0) void vUART0InterruptHandler( void )\r
{\r
-unsigned portCHAR ucChar;\r
+unsigned char ucChar;\r
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE, xDoneSomething = pdTRUE;\r
\r
while( xDoneSomething != pdFALSE )\r
*/\r
void vApplicationSetupInterrupts( void )\r
{\r
-const unsigned portSHORT usCompareMatchValue = ( ( configCPU_CLOCK_HZ / portPRESCALE_VALUE ) / configTICK_RATE_HZ );\r
+const unsigned short usCompareMatchValue = ( ( configCPU_CLOCK_HZ / portPRESCALE_VALUE ) / configTICK_RATE_HZ );\r
\r
/* Configure interrupt priority and level and unmask interrupt for PIT0. */\r
MCF_INTC0_ICR55 = ( 1 | ( configKERNEL_INTERRUPT_PRIORITY << 3 ) );\r
\r
void __attribute__ ((interrupt)) __cs3_isr_interrupt_119( void )\r
{\r
-unsigned portLONG ulSavedInterruptMask;\r
+unsigned long ulSavedInterruptMask;\r
\r
/* Clear the PIT0 interrupt. */\r
MCF_PIT0_PCSR |= MCF_PIT_PCSR_PIF;\r
{\r
taskENTER_CRITICAL();\r
{\r
- if( ( MCF_GPIO_PORTTC & ( 1 << uxLED ) ) == ( unsigned portCHAR ) 0 )\r
+ if( ( MCF_GPIO_PORTTC & ( 1 << uxLED ) ) == ( unsigned char ) 0 )\r
{\r
MCF_GPIO_PORTTC |= ( 1 << uxLED );\r
}\r
/*-----------------------------------------------------------*/\r
\r
/* Counters used to detect errors within the reg test tasks. */\r
-static volatile unsigned portLONG ulRegTest1Counter = 0x11111111, ulRegTest2Counter = 0x22222222;\r
+static volatile unsigned long ulRegTest1Counter = 0x11111111, ulRegTest2Counter = 0x22222222;\r
\r
/* Any errors that the check task finds in any tasks are latched into\r
ulErrorCode, and then displayed via the WEB server. */\r
-static unsigned portLONG ulErrorCode = 0UL;\r
+static unsigned long ulErrorCode = 0UL;\r
\r
/*-----------------------------------------------------------*/\r
\r
}\r
/*-----------------------------------------------------------*/\r
\r
-unsigned portLONG ulGetErrorCode( void )\r
+unsigned long ulGetErrorCode( void )\r
{\r
/* Returns the error code for display via the WEB server. */\r
return ulErrorCode;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-void vApplicationStackOverflowHook( xTaskHandle *pxTask, signed portCHAR *pcTaskName )\r
+void vApplicationStackOverflowHook( xTaskHandle *pxTask, signed char *pcTaskName )\r
{\r
/* This will get called if a stack overflow is detected during the context\r
switch. Set configCHECK_FOR_STACK_OVERFLOWS to 2 to also check for stack\r
\r
/* The buffer used by the uIP stack. In this case the pointer is used to\r
point to one of the Rx buffers to effect a zero copy policy. */\r
-unsigned portCHAR *uip_buf;\r
+unsigned char *uip_buf;\r
\r
/* The DMA descriptors. This is a char array to allow us to align it correctly. */\r
-static unsigned portCHAR xFECTxDescriptors_unaligned[ ( fecNUM_FEC_TX_BUFFERS * sizeof( FECBD ) ) + 16 ];\r
-static unsigned portCHAR xFECRxDescriptors_unaligned[ ( configNUM_FEC_RX_BUFFERS * sizeof( FECBD ) ) + 16 ];\r
+static unsigned char xFECTxDescriptors_unaligned[ ( fecNUM_FEC_TX_BUFFERS * sizeof( FECBD ) ) + 16 ];\r
+static unsigned char xFECRxDescriptors_unaligned[ ( configNUM_FEC_RX_BUFFERS * sizeof( FECBD ) ) + 16 ];\r
static FECBD *xFECTxDescriptors;\r
static FECBD *xFECRxDescriptors;\r
\r
/* The DMA buffers. These are char arrays to allow them to be aligned correctly. */\r
-static unsigned portCHAR ucFECRxBuffers[ ( configNUM_FEC_RX_BUFFERS * configFEC_BUFFER_SIZE ) + 16 ];\r
+static unsigned char ucFECRxBuffers[ ( configNUM_FEC_RX_BUFFERS * configFEC_BUFFER_SIZE ) + 16 ];\r
static unsigned portBASE_TYPE uxNextRxBuffer = 0, uxIndexToBufferOwner = 0;\r
\r
/*-----------------------------------------------------------*/\r
* If after a suitable amount of time the event isn't triggered, a\r
* value of 0 is returned.\r
*/\r
-static int fec_mii_read( int phy_addr, int reg_addr, unsigned portSHORT* data )\r
+static int fec_mii_read( int phy_addr, int reg_addr, unsigned short* data )\r
{\r
int timeout, iReturn;\r
uint32 eimr;\r
* Return Value:\r
* The 6 most significant bits of the 32-bit CRC result\r
*/\r
-static unsigned portCHAR fec_hash_address( const unsigned portCHAR* addr )\r
+static unsigned char fec_hash_address( const unsigned char* addr )\r
{\r
-unsigned portLONG crc;\r
-unsigned portCHAR byte;\r
+unsigned long crc;\r
+unsigned char byte;\r
int i, j;\r
\r
crc = 0xFFFFFFFF;\r
}\r
}\r
\r
- return (unsigned portCHAR)(crc >> 26);\r
+ return (unsigned char)(crc >> 26);\r
}\r
\r
/********************************************************************/\r
* ch FEC channel\r
* pa Physical (Hardware) Address for the selected FEC\r
*/\r
-static void fec_set_address( const unsigned portCHAR *pa )\r
+static void fec_set_address( const unsigned char *pa )\r
{\r
- unsigned portCHAR crc;\r
+ unsigned char crc;\r
\r
/*\r
* Set the Physical Address\r
crc = fec_hash_address( pa );\r
if( crc >= 32 )\r
{\r
- MCF_FEC_IAUR |= (unsigned portLONG)(1 << (crc - 32));\r
+ MCF_FEC_IAUR |= (unsigned long)(1 << (crc - 32));\r
}\r
else\r
{\r
- MCF_FEC_IALR |= (unsigned portLONG)(1 << crc);\r
+ MCF_FEC_IALR |= (unsigned long)(1 << crc);\r
}\r
}\r
/*-----------------------------------------------------------*/\r
static void prvInitialiseFECBuffers( void )\r
{\r
unsigned portBASE_TYPE ux;\r
-unsigned portCHAR *pcBufPointer;\r
+unsigned char *pcBufPointer;\r
\r
/* Correctly align the Tx descriptor pointer. */\r
pcBufPointer = &( xFECTxDescriptors_unaligned[ 0 ] );\r
- while( ( ( unsigned portLONG ) pcBufPointer & 0x0fUL ) != 0 )\r
+ while( ( ( unsigned long ) pcBufPointer & 0x0fUL ) != 0 )\r
{\r
pcBufPointer++;\r
}\r
\r
/* Likewise the Rx descriptor pointer. */\r
pcBufPointer = &( xFECRxDescriptors_unaligned[ 0 ] );\r
- while( ( ( unsigned portLONG ) pcBufPointer & 0x0fUL ) != 0 )\r
+ while( ( ( unsigned long ) pcBufPointer & 0x0fUL ) != 0 )\r
{\r
pcBufPointer++;\r
}\r
/* Setup the Rx buffers and descriptors, having first ensured correct\r
alignment. */\r
pcBufPointer = &( ucFECRxBuffers[ 0 ] );\r
- while( ( ( unsigned portLONG ) pcBufPointer & 0x0fUL ) != 0 )\r
+ while( ( ( unsigned long ) pcBufPointer & 0x0fUL ) != 0 )\r
{\r
pcBufPointer++;\r
}\r
\r
void vFECInit( void )\r
{\r
-unsigned portSHORT usData;\r
+unsigned short usData;\r
struct uip_eth_addr xAddr;\r
unsigned portBASE_TYPE ux;\r
\r
/* The MAC address is set at the foot of FreeRTOSConfig.h. */\r
-const unsigned portCHAR ucMACAddress[6] =\r
+const unsigned char ucMACAddress[6] =\r
{\r
configMAC_0, configMAC_1,configMAC_2, configMAC_3, configMAC_4, configMAC_5\r
};\r
\r
if( ( usData & PHY_ANLPAR_100BTX_FDX ) || ( usData & PHY_ANLPAR_10BTX_FDX ) )\r
{\r
- MCF_FEC_RCR &= (unsigned portLONG)~MCF_FEC_RCR_DRT;\r
+ MCF_FEC_RCR &= (unsigned long)~MCF_FEC_RCR_DRT;\r
MCF_FEC_TCR |= MCF_FEC_TCR_FDEN;\r
}\r
else\r
{\r
MCF_FEC_RCR |= MCF_FEC_RCR_DRT;\r
- MCF_FEC_TCR &= (unsigned portLONG)~MCF_FEC_TCR_FDEN;\r
+ MCF_FEC_TCR &= (unsigned long)~MCF_FEC_TCR_FDEN;\r
}\r
\r
/* Clear the Individual and Group Address Hash registers */\r
fec_set_address( ucMACAddress );\r
\r
/* Set Rx Buffer Size */\r
- MCF_FEC_EMRBR = (unsigned portSHORT)configFEC_BUFFER_SIZE;\r
+ MCF_FEC_EMRBR = (unsigned short)configFEC_BUFFER_SIZE;\r
\r
/* Point to the start of the circular Rx buffer descriptor queue */\r
- MCF_FEC_ERDSR = ( volatile unsigned portLONG ) &( xFECRxDescriptors[ 0 ] );\r
+ MCF_FEC_ERDSR = ( volatile unsigned long ) &( xFECRxDescriptors[ 0 ] );\r
\r
/* Point to the start of the circular Tx buffer descriptor queue */\r
- MCF_FEC_ETSDR = ( volatile unsigned portLONG ) &( xFECTxDescriptors[ 0 ] );\r
+ MCF_FEC_ETSDR = ( volatile unsigned long ) &( xFECTxDescriptors[ 0 ] );\r
\r
/* Mask all FEC interrupts */\r
- MCF_FEC_EIMR = ( unsigned portLONG ) -1;\r
+ MCF_FEC_EIMR = ( unsigned long ) -1;\r
\r
/* Clear all FEC interrupt events */\r
- MCF_FEC_EIR = ( unsigned portLONG ) -1;\r
+ MCF_FEC_EIR = ( unsigned long ) -1;\r
\r
/* Initialize the Receive Control Register */\r
MCF_FEC_RCR = MCF_FEC_RCR_MAX_FL(ETH_MAX_FRM) | MCF_FEC_RCR_FCE;\r
\r
unsigned short usFECGetRxedData( void )\r
{\r
-unsigned portSHORT usLen;\r
+unsigned short usLen;\r
\r
/* Obtain the size of the packet and put it into the "len" variable. */\r
usLen = xFECRxDescriptors[ uxNextRxBuffer ].length;\r
\r
void vFEC_ISR( void )\r
{\r
-unsigned portLONG ulEvent;\r
+unsigned long ulEvent;\r
portBASE_TYPE xHighPriorityTaskWoken = pdFALSE;\r
\r
/* This handler is called in response to any of the many separate FEC\r
*/\r
void vApplicationSetupInterrupts( void )\r
{\r
-const unsigned portSHORT usCompareMatchValue = ( ( configCPU_CLOCK_HZ / portPRESCALE_VALUE ) / configTICK_RATE_HZ );\r
+const unsigned short usCompareMatchValue = ( ( configCPU_CLOCK_HZ / portPRESCALE_VALUE ) / configTICK_RATE_HZ );\r
\r
/* Configure interrupt priority and level and unmask interrupt for PIT0. */\r
MCF_INTC0_ICR55 = ( 1 | ( configKERNEL_INTERRUPT_PRIORITY << 3 ) );\r
\r
__declspec(interrupt:0) void vPIT0InterruptHandler( void )\r
{\r
-unsigned portLONG ulSavedInterruptMask;\r
+unsigned long ulSavedInterruptMask;\r
\r
/* Clear the PIT0 interrupt. */\r
MCF_PIT0_PCSR |= MCF_PIT_PCSR_PIF;\r
*/\r
static void vProcessConnection( struct netconn *pxNetCon )\r
{\r
- static portCHAR cDynamicPage[webMAX_PAGE_SIZE], cPageHits[11];\r
+ static char cDynamicPage[webMAX_PAGE_SIZE], cPageHits[11];\r
struct netbuf *pxRxBuffer;\r
- portCHAR *pcRxString;\r
- unsigned portSHORT usLength;\r
- static unsigned portLONG ulPageHits = 0;\r
+ char *pcRxString;\r
+ unsigned short usLength;\r
+ static unsigned long ulPageHits = 0;\r
\r
/* We expect to immediately get data. */\r
pxRxBuffer = netconn_recv( pxNetCon );\r
#define mainCHECK_LED ( 3 )\r
\r
/* ComTest constants - there is no free LED for the comtest tasks. */\r
-#define mainCOM_TEST_BAUD_RATE ( ( unsigned portLONG ) 19200 )\r
+#define mainCOM_TEST_BAUD_RATE ( ( unsigned long ) 19200 )\r
#define mainCOM_TEST_LED ( 5 )\r
\r
/* Task priorities. */\r
/*-----------------------------------------------------------*/\r
\r
/* Counters used to detect errors within the reg test tasks. */\r
-static volatile unsigned portLONG ulRegTest1Counter = 0x11111111, ulRegTest2Counter = 0x22222222;\r
+static volatile unsigned long ulRegTest1Counter = 0x11111111, ulRegTest2Counter = 0x22222222;\r
\r
/*-----------------------------------------------------------*/\r
\r
}\r
/*-----------------------------------------------------------*/\r
\r
-void vApplicationStackOverflowHook( xTaskHandle *pxTask, signed portCHAR *pcTaskName )\r
+void vApplicationStackOverflowHook( xTaskHandle *pxTask, signed char *pcTaskName )\r
{\r
/* This will get called if a stack overflow is detected during the context\r
switch. Set configCHECK_FOR_STACK_OVERFLOWS to 2 to also check for stack\r
*/\r
void vApplicationSetupInterrupts( void )\r
{\r
-const unsigned portSHORT usCompareMatchValue = ( ( configCPU_CLOCK_HZ / portPRESCALE_VALUE ) / configTICK_RATE_HZ );\r
+const unsigned short usCompareMatchValue = ( ( configCPU_CLOCK_HZ / portPRESCALE_VALUE ) / configTICK_RATE_HZ );\r
\r
/* Configure interrupt priority and level and unmask interrupt for PIT0. */\r
MCF_INTC0_ICR55 = ( 1 | ( configKERNEL_INTERRUPT_PRIORITY << 3 ) );\r
\r
void __attribute__ ((interrupt)) __cs3_isr_interrupt_119( void )\r
{\r
-unsigned portLONG ulSavedInterruptMask;\r
+unsigned long ulSavedInterruptMask;\r
\r
/* Clear the PIT0 interrupt. */\r
MCF_PIT0_PCSR |= MCF_PIT_PCSR_PIF;\r
\r
void vInitialiseTimerForIntQueueTest( void )\r
{\r
-const unsigned portSHORT usCompareMatchValue1 = ( unsigned portSHORT ) ( ( configCPU_CLOCK_HZ / timerPRESCALE_VALUE ) / timerINTERRUPT1_FREQUENCY );\r
-const unsigned portSHORT usCompareMatchValue2 = ( unsigned portSHORT ) ( ( configCPU_CLOCK_HZ / timerPRESCALE_VALUE ) / timerINTERRUPT2_FREQUENCY );\r
+const unsigned short usCompareMatchValue1 = ( unsigned short ) ( ( configCPU_CLOCK_HZ / timerPRESCALE_VALUE ) / timerINTERRUPT1_FREQUENCY );\r
+const unsigned short usCompareMatchValue2 = ( unsigned short ) ( ( configCPU_CLOCK_HZ / timerPRESCALE_VALUE ) / timerINTERRUPT2_FREQUENCY );\r
\r
/* Configure interrupt priority and level and unmask interrupt. */\r
MCF_INTC0_ICR56 = ( ( configMAX_SYSCALL_INTERRUPT_PRIORITY - 1 ) << 3 );\r
#define LED2_POS 0x01\r
#define LED3_POS 0x04\r
\r
-static const unsigned portCHAR ucLEDDefinitions[ partstNUM_LEDs ] = { LED0_POS, LED1_POS, LED2_POS, LED3_POS };\r
+static const unsigned char ucLEDDefinitions[ partstNUM_LEDs ] = { LED0_POS, LED1_POS, LED2_POS, LED3_POS };\r
\r
/*-----------------------------------------------------------\r
* Simple parallel port IO routines.\r
{\r
taskENTER_CRITICAL();\r
{\r
- if( ( MCF_GPIO_PORTTD & ucLEDDefinitions[ uxLED ] ) == ( unsigned portCHAR ) 0 )\r
+ if( ( MCF_GPIO_PORTTD & ucLEDDefinitions[ uxLED ] ) == ( unsigned char ) 0 )\r
{\r
MCF_GPIO_PORTTD |= ucLEDDefinitions[ uxLED ];\r
}\r
{\r
taskENTER_CRITICAL();\r
{\r
- if( ( MCF_GPIO_PORTTC & ucLEDDefinitions[ uxLED ] ) == ( unsigned portCHAR ) 0 )\r
+ if( ( MCF_GPIO_PORTTC & ucLEDDefinitions[ uxLED ] ) == ( unsigned char ) 0 )\r
{\r
MCF_GPIO_PORTTC |= ucLEDDefinitions[ uxLED ];\r
}\r
#define mainCHECK_LED ( 3 )\r
\r
/* ComTest constants - there is no free LED for the comtest tasks. */\r
-#define mainCOM_TEST_BAUD_RATE ( ( unsigned portLONG ) 19200 )\r
+#define mainCOM_TEST_BAUD_RATE ( ( unsigned long ) 19200 )\r
#define mainCOM_TEST_LED ( 5 )\r
\r
/* Task priorities. */\r
/*-----------------------------------------------------------*/\r
\r
/* Counters used to detect errors within the reg test tasks. */\r
-static volatile unsigned portLONG ulRegTest1Counter = 0x11111111, ulRegTest2Counter = 0x22222222;\r
+static volatile unsigned long ulRegTest1Counter = 0x11111111, ulRegTest2Counter = 0x22222222;\r
\r
/*-----------------------------------------------------------*/\r
\r
\r
void prvSetupHardware( void )\r
{\r
-extern void mcf5xxx_wr_cacr( unsigned portLONG );\r
+extern void mcf5xxx_wr_cacr( unsigned long );\r
\r
portDISABLE_INTERRUPTS();\r
\r
}\r
/*-----------------------------------------------------------*/\r
\r
-void vApplicationStackOverflowHook( xTaskHandle *pxTask, signed portCHAR *pcTaskName )\r
+void vApplicationStackOverflowHook( xTaskHandle *pxTask, signed char *pcTaskName )\r
{\r
/* This will get called if a stack overflow is detected during the context\r
switch. Set configCHECK_FOR_STACK_OVERFLOWS to 2 to also check for stack\r
#include "serial.h"\r
\r
/* Hardware definitions. */\r
-#define serNO_PARITY ( ( unsigned portCHAR ) 0x02 << 3 )\r
-#define ser8DATA_BITS ( ( unsigned portCHAR ) 0x03 )\r
-#define ser1STOP_BIT ( ( unsigned portCHAR ) 0x07 )\r
-#define serSYSTEM_CLOCK ( ( unsigned portCHAR ) 0xdd )\r
-#define serTX_OUTPUT ( ( unsigned portCHAR ) 0x04 )\r
-#define serRX_INPUT ( ( unsigned portCHAR ) 0x08 )\r
-#define serTX_ENABLE ( ( unsigned portCHAR ) 0x04 )\r
-#define serRX_ENABLE ( ( unsigned portCHAR ) 0x01 )\r
-#define serTX_INT ( ( unsigned portCHAR ) 0x01 )\r
-#define serRX_INT ( ( unsigned portCHAR ) 0x02 )\r
+#define serNO_PARITY ( ( unsigned char ) 0x02 << 3 )\r
+#define ser8DATA_BITS ( ( unsigned char ) 0x03 )\r
+#define ser1STOP_BIT ( ( unsigned char ) 0x07 )\r
+#define serSYSTEM_CLOCK ( ( unsigned char ) 0xdd )\r
+#define serTX_OUTPUT ( ( unsigned char ) 0x04 )\r
+#define serRX_INPUT ( ( unsigned char ) 0x08 )\r
+#define serTX_ENABLE ( ( unsigned char ) 0x04 )\r
+#define serRX_ENABLE ( ( unsigned char ) 0x01 )\r
+#define serTX_INT ( ( unsigned char ) 0x01 )\r
+#define serRX_INT ( ( unsigned char ) 0x02 )\r
\r
\r
/* The queues used to communicate between tasks and ISR's. */\r
\r
/*-----------------------------------------------------------*/\r
\r
-xComPortHandle xSerialPortInitMinimal( unsigned portLONG ulWantedBaud, unsigned portBASE_TYPE uxQueueLength )\r
+xComPortHandle xSerialPortInitMinimal( unsigned long ulWantedBaud, unsigned portBASE_TYPE uxQueueLength )\r
{\r
-const unsigned portLONG ulBaudRateDivisor = ( configCPU_CLOCK_HZ / ( 32UL * ulWantedBaud ) );\r
+const unsigned long ulBaudRateDivisor = ( configCPU_CLOCK_HZ / ( 32UL * ulWantedBaud ) );\r
\r
/* Create the queues used by the com test task. */\r
- xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed portCHAR ) );\r
- xCharsForTx = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed portCHAR ) );\r
+ xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed char ) );\r
+ xCharsForTx = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed char ) );\r
\r
xTxHasEnded = pdTRUE;\r
\r
MCF_UART1_UMR2 = ser1STOP_BIT;\r
MCF_UART1_UCSR = serSYSTEM_CLOCK;\r
\r
- MCF_UART1_UBG1 = ( unsigned portCHAR ) ( ( ulBaudRateDivisor >> 8UL ) & 0xffUL );\r
- MCF_UART1_UBG2 = ( unsigned portCHAR ) ( ulBaudRateDivisor & 0xffUL );\r
+ MCF_UART1_UBG1 = ( unsigned char ) ( ( ulBaudRateDivisor >> 8UL ) & 0xffUL );\r
+ MCF_UART1_UBG2 = ( unsigned char ) ( ulBaudRateDivisor & 0xffUL );\r
\r
/* Turn it on. */\r
MCF_UART1_UCR = serTX_ENABLE | serRX_ENABLE;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed portCHAR *pcRxedChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime )\r
{\r
/* Only one port is supported. */\r
( void ) pxPort;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed portCHAR cOutChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime )\r
{\r
/* Only one port is supported. */\r
( void ) pxPort;\r
\r
void __cs3_isr_interrupt_78( void )\r
{\r
-unsigned portCHAR ucChar;\r
+unsigned char ucChar;\r
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE, xDoneSomething = pdTRUE;\r
\r
while( xDoneSomething != pdFALSE )\r
{\r
xQueueHandle xQueue; /*< The queue to be used by the task. */\r
portTickType xBlockTime; /*< The block time to use on queue reads/writes. */\r
- volatile portSHORT *psCheckVariable; /*< Incremented on each successful cycle to check the task is still running. */\r
+ volatile short *psCheckVariable; /*< Incremented on each successful cycle to check the task is still running. */\r
} xBlockingQueueParameters;\r
\r
/* Task function that creates an incrementing number and posts it on a queue. */\r
/* Variables which are incremented each time an item is removed from a queue, and\r
found to be the expected value.\r
These are used to check that the tasks are still running. */\r
-static volatile portSHORT sBlockingConsumerCount[ blckqNUM_TASK_SETS ] = { ( unsigned portSHORT ) 0, ( unsigned portSHORT ) 0, ( unsigned portSHORT ) 0 };\r
+static volatile short sBlockingConsumerCount[ blckqNUM_TASK_SETS ] = { ( unsigned short ) 0, ( unsigned short ) 0, ( unsigned short ) 0 };\r
\r
/* Variable which are incremented each time an item is posted on a queue. These\r
are used to check that the tasks are still running. */\r
-static volatile portSHORT sBlockingProducerCount[ blckqNUM_TASK_SETS ] = { ( unsigned portSHORT ) 0, ( unsigned portSHORT ) 0, ( unsigned portSHORT ) 0 };\r
+static volatile short sBlockingProducerCount[ blckqNUM_TASK_SETS ] = { ( unsigned short ) 0, ( unsigned short ) 0, ( unsigned short ) 0 };\r
\r
/*-----------------------------------------------------------*/\r
\r
\r
/* Create the queue used by the first two tasks to pass the incrementing number.\r
Pass a pointer to the queue in the parameter structure. */\r
- pxQueueParameters1->xQueue = xQueueCreate( uxQueueSize1, ( unsigned portBASE_TYPE ) sizeof( unsigned portSHORT ) );\r
+ pxQueueParameters1->xQueue = xQueueCreate( uxQueueSize1, ( unsigned portBASE_TYPE ) sizeof( unsigned short ) );\r
\r
/* The consumer is created first so gets a block time as described above. */\r
pxQueueParameters1->xBlockTime = xBlockTime;\r
the same mechanism but reverses the task priorities. */\r
\r
pxQueueParameters3 = ( xBlockingQueueParameters * ) pvPortMalloc( sizeof( xBlockingQueueParameters ) );\r
- pxQueueParameters3->xQueue = xQueueCreate( uxQueueSize1, ( unsigned portBASE_TYPE ) sizeof( unsigned portSHORT ) );\r
+ pxQueueParameters3->xQueue = xQueueCreate( uxQueueSize1, ( unsigned portBASE_TYPE ) sizeof( unsigned short ) );\r
pxQueueParameters3->xBlockTime = xDontBlock;\r
pxQueueParameters3->psCheckVariable = &( sBlockingProducerCount[ 1 ] );\r
\r
/* Create the last two tasks as described above. The mechanism is again just\r
the same. This time both parameter structures are given a block time. */\r
pxQueueParameters5 = ( xBlockingQueueParameters * ) pvPortMalloc( sizeof( xBlockingQueueParameters ) );\r
- pxQueueParameters5->xQueue = xQueueCreate( uxQueueSize5, ( unsigned portBASE_TYPE ) sizeof( unsigned portSHORT ) );\r
+ pxQueueParameters5->xQueue = xQueueCreate( uxQueueSize5, ( unsigned portBASE_TYPE ) sizeof( unsigned short ) );\r
pxQueueParameters5->xBlockTime = xBlockTime;\r
pxQueueParameters5->psCheckVariable = &( sBlockingProducerCount[ 2 ] );\r
\r
\r
static portTASK_FUNCTION( vBlockingQueueProducer, pvParameters )\r
{\r
-unsigned portSHORT usValue = 0;\r
+unsigned short usValue = 0;\r
xBlockingQueueParameters *pxQueueParameters;\r
-portSHORT sErrorEverOccurred = pdFALSE;\r
+short sErrorEverOccurred = pdFALSE;\r
\r
#ifdef USE_STDIO\r
- void vPrintDisplayMessage( const portCHAR * const * ppcMessageToSend );\r
+ void vPrintDisplayMessage( const char * const * ppcMessageToSend );\r
\r
- const portCHAR * const pcTaskStartMsg = "Alt blocking queue producer task started.\r\n";\r
+ const char * const pcTaskStartMsg = "Alt blocking queue producer task started.\r\n";\r
\r
/* Queue a message for printing to say the task has started. */\r
vPrintDisplayMessage( &pcTaskStartMsg );\r
\r
static portTASK_FUNCTION( vBlockingQueueConsumer, pvParameters )\r
{\r
-unsigned portSHORT usData, usExpectedValue = 0;\r
+unsigned short usData, usExpectedValue = 0;\r
xBlockingQueueParameters *pxQueueParameters;\r
-portSHORT sErrorEverOccurred = pdFALSE;\r
+short sErrorEverOccurred = pdFALSE;\r
\r
#ifdef USE_STDIO\r
- void vPrintDisplayMessage( const portCHAR * const * ppcMessageToSend );\r
+ void vPrintDisplayMessage( const char * const * ppcMessageToSend );\r
\r
- const portCHAR * const pcTaskStartMsg = "Alt blocking queue consumer task started.\r\n";\r
+ const char * const pcTaskStartMsg = "Alt blocking queue consumer task started.\r\n";\r
\r
/* Queue a message for printing to say the task has started. */\r
vPrintDisplayMessage( &pcTaskStartMsg );\r
/* This is called to check that all the created tasks are still running. */\r
portBASE_TYPE xAreAltBlockingQueuesStillRunning( void )\r
{\r
-static portSHORT sLastBlockingConsumerCount[ blckqNUM_TASK_SETS ] = { ( unsigned portSHORT ) 0, ( unsigned portSHORT ) 0, ( unsigned portSHORT ) 0 };\r
-static portSHORT sLastBlockingProducerCount[ blckqNUM_TASK_SETS ] = { ( unsigned portSHORT ) 0, ( unsigned portSHORT ) 0, ( unsigned portSHORT ) 0 };\r
+static short sLastBlockingConsumerCount[ blckqNUM_TASK_SETS ] = { ( unsigned short ) 0, ( unsigned short ) 0, ( unsigned short ) 0 };\r
+static short sLastBlockingProducerCount[ blckqNUM_TASK_SETS ] = { ( unsigned short ) 0, ( unsigned short ) 0, ( unsigned short ) 0 };\r
portBASE_TYPE xReturn = pdPASS, xTasks;\r
\r
/* Not too worried about mutual exclusion on these variables as they are 16\r
portTickType xTimeToBlock, xBlockedTime;\r
\r
#ifdef USE_STDIO\r
- void vPrintDisplayMessage( const portCHAR * const * ppcMessageToSend );\r
+ void vPrintDisplayMessage( const char * const * ppcMessageToSend );\r
\r
- const portCHAR * const pcTaskStartMsg = "Alt primary block time test started.\r\n";\r
+ const char * const pcTaskStartMsg = "Alt primary block time test started.\r\n";\r
\r
/* Queue a message for printing to say the task has started. */\r
vPrintDisplayMessage( &pcTaskStartMsg );\r
portBASE_TYPE xData;\r
\r
#ifdef USE_STDIO\r
- void vPrintDisplayMessage( const portCHAR * const * ppcMessageToSend );\r
+ void vPrintDisplayMessage( const char * const * ppcMessageToSend );\r
\r
- const portCHAR * const pcTaskStartMsg = "Alt secondary block time test started.\r\n";\r
+ const char * const pcTaskStartMsg = "Alt secondary block time test started.\r\n";\r
\r
/* Queue a message for printing to say the task has started. */\r
vPrintDisplayMessage( &pcTaskStartMsg );\r
Changes from V2.0.0\r
\r
+ Delay periods are now specified using variables and constants of\r
- portTickType rather than unsigned portLONG.\r
+ portTickType rather than unsigned long.\r
*/\r
\r
#include <stdlib.h>\r
static xQueueHandle xPolledQueue;\r
\r
/* Create the queue used by the producer and consumer. */\r
- xPolledQueue = xQueueCreate( pollqQUEUE_SIZE, ( unsigned portBASE_TYPE ) sizeof( unsigned portSHORT ) );\r
+ xPolledQueue = xQueueCreate( pollqQUEUE_SIZE, ( unsigned portBASE_TYPE ) sizeof( unsigned short ) );\r
\r
/* vQueueAddToRegistry() adds the queue to the queue registry, if one is\r
in use. The queue registry is provided as a means for kernel aware \r
\r
static portTASK_FUNCTION( vPolledQueueProducer, pvParameters )\r
{\r
-unsigned portSHORT usValue = ( unsigned portSHORT ) 0;\r
+unsigned short usValue = ( unsigned short ) 0;\r
signed portBASE_TYPE xError = pdFALSE, xLoop;\r
\r
#ifdef USE_STDIO\r
- void vPrintDisplayMessage( const portCHAR * const * ppcMessageToSend );\r
+ void vPrintDisplayMessage( const char * const * ppcMessageToSend );\r
\r
- const portCHAR * const pcTaskStartMsg = "Alt polling queue producer task started.\r\n";\r
+ const char * const pcTaskStartMsg = "Alt polling queue producer task started.\r\n";\r
\r
/* Queue a message for printing to say the task has started. */\r
vPrintDisplayMessage( &pcTaskStartMsg );\r
\r
static portTASK_FUNCTION( vPolledQueueConsumer, pvParameters )\r
{\r
-unsigned portSHORT usData, usExpectedValue = ( unsigned portSHORT ) 0;\r
+unsigned short usData, usExpectedValue = ( unsigned short ) 0;\r
signed portBASE_TYPE xError = pdFALSE;\r
\r
#ifdef USE_STDIO\r
- void vPrintDisplayMessage( const portCHAR * const * ppcMessageToSend );\r
+ void vPrintDisplayMessage( const char * const * ppcMessageToSend );\r
\r
- const portCHAR * const pcTaskStartMsg = "Alt blocking queue consumer task started.\r\n";\r
+ const char * const pcTaskStartMsg = "Alt blocking queue consumer task started.\r\n";\r
\r
/* Queue a message for printing to say the task has started. */\r
vPrintDisplayMessage( &pcTaskStartMsg );\r
\r
/* Counters that are incremented on each cycle of a test. This is used to\r
detect a stalled task - a test that is no longer running. */\r
-static volatile unsigned portLONG ulLoopCounter = 0;\r
-static volatile unsigned portLONG ulLoopCounter2 = 0;\r
+static volatile unsigned long ulLoopCounter = 0;\r
+static volatile unsigned long ulLoopCounter2 = 0;\r
\r
/* The variable that is guarded by the mutex in the mutex demo tasks. */\r
-static volatile unsigned portLONG ulGuardedVariable = 0;\r
+static volatile unsigned long ulGuardedVariable = 0;\r
\r
/* Handles used in the mutext test to suspend and resume the high and medium\r
priority mutex test tasks. */\r
\r
/* Create the queue that we are going to use for the\r
prvSendFrontAndBackTest demo. */\r
- xQueue = xQueueCreate( genqQUEUE_LENGTH, sizeof( unsigned portLONG ) );\r
+ xQueue = xQueueCreate( genqQUEUE_LENGTH, sizeof( unsigned long ) );\r
\r
/* vQueueAddToRegistry() adds the queue to the queue registry, if one is\r
in use. The queue registry is provided as a means for kernel aware \r
\r
static void prvSendFrontAndBackTest( void *pvParameters )\r
{\r
-unsigned portLONG ulData, ulData2;\r
+unsigned long ulData, ulData2;\r
xQueueHandle xQueue;\r
\r
#ifdef USE_STDIO\r
- void vPrintDisplayMessage( const portCHAR * const * ppcMessageToSend );\r
+ void vPrintDisplayMessage( const char * const * ppcMessageToSend );\r
\r
- const portCHAR * const pcTaskStartMsg = "Alt queue SendToFront/SendToBack/Peek test started.\r\n";\r
+ const char * const pcTaskStartMsg = "Alt queue SendToFront/SendToBack/Peek test started.\r\n";\r
\r
/* Queue a message for printing to say the task has started. */\r
vPrintDisplayMessage( &pcTaskStartMsg );\r
xSemaphoreHandle xMutex = ( xSemaphoreHandle ) pvParameters;\r
\r
#ifdef USE_STDIO\r
- void vPrintDisplayMessage( const portCHAR * const * ppcMessageToSend );\r
+ void vPrintDisplayMessage( const char * const * ppcMessageToSend );\r
\r
- const portCHAR * const pcTaskStartMsg = "Fast mutex with priority inheritance test started.\r\n";\r
+ const char * const pcTaskStartMsg = "Fast mutex with priority inheritance test started.\r\n";\r
\r
/* Queue a message for printing to say the task has started. */\r
vPrintDisplayMessage( &pcTaskStartMsg );\r
/* This is called to check that all the created tasks are still running. */\r
portBASE_TYPE xAreAltGenericQueueTasksStillRunning( void )\r
{\r
-static unsigned portLONG ulLastLoopCounter = 0, ulLastLoopCounter2 = 0;\r
+static unsigned long ulLastLoopCounter = 0, ulLastLoopCounter2 = 0;\r
\r
/* If the demo task is still running then we expect the loopcounters to\r
have incremented since this function was last called. */\r
static volatile unsigned long ulSetBitCycles = 0, ulWaitBitCycles = 0;\r
\r
/* The event group used by all the tests. */\r
-static xEventGroupHandle xEventBits = NULL;\r
+static EventGroupHandle_t xEventBits = NULL;\r
\r
/* Handles to the tasks that only take part in the synchronisation calls. */\r
static xTaskHandle xSyncTask1 = NULL, xSyncTask2 = NULL;\r
\r
static void prvSyncTask( void *pvParameters )\r
{\r
-xEventBitsType uxSynchronisationBit, uxReturned;\r
+EventBits_t uxSynchronisationBit, uxReturned;\r
\r
/* The bit to use to indicate this task is at the synchronisation point is\r
passed in as the task parameter. */\r
- uxSynchronisationBit = ( xEventBitsType ) pvParameters;\r
+ uxSynchronisationBit = ( EventBits_t ) pvParameters;\r
\r
/* A few tests are performed before entering the main demo loop. */\r
prvPreSyncSelectiveWakeTest();\r
\r
static void prvWaitBitsTask( void *pvParameters )\r
{\r
-xEventBitsType uxReturned;\r
+EventBits_t uxReturned;\r
portBASE_TYPE xError = pdFALSE;\r
\r
/* Avoid compiler warnings. */\r
\r
static void prvSetBitsTask( void *pvParameters )\r
{\r
-xEventBitsType uxBits;\r
+EventBits_t uxBits;\r
portBASE_TYPE xError;\r
\r
/* The handle to the other task is passed in as the task parameter. */\r
\r
static void prvPreSyncSelectiveWakeTest( void )\r
{\r
-xEventBitsType uxPendBits, uxReturned;\r
+EventBits_t uxPendBits, uxReturned;\r
\r
if( xTaskGetCurrentTaskHandle() == xSyncTask1 )\r
{\r
vTaskSuspend( NULL );\r
uxReturned = xEventGroupWaitBits( xEventBits, uxPendBits, pdTRUE, pdFALSE, portMAX_DELAY );\r
\r
- if( uxReturned == ( xEventBitsType ) 0 )\r
+ if( uxReturned == ( EventBits_t ) 0 )\r
{\r
break;\r
}\r
static portBASE_TYPE prvTestSelectiveBits( void )\r
{\r
portBASE_TYPE xError = pdFALSE;\r
-xEventBitsType uxBit;\r
+EventBits_t uxBit;\r
\r
/* Both tasks should start in the suspended state. */\r
if( eTaskGetState( xSyncTask1 ) != eSuspended )\r
\r
/* Counters that are incremented on each cycle of a test. This is used to\r
detect a stalled task - a test that is no longer running. */\r
-static volatile unsigned portLONG ulLoopCounter = 0;\r
-static volatile unsigned portLONG ulLoopCounter2 = 0;\r
+static volatile unsigned long ulLoopCounter = 0;\r
+static volatile unsigned long ulLoopCounter2 = 0;\r
\r
/* The variable that is guarded by the mutex in the mutex demo tasks. */\r
-static volatile unsigned portLONG ulGuardedVariable = 0;\r
+static volatile unsigned long ulGuardedVariable = 0;\r
\r
/* Handles used in the mutext test to suspend and resume the high and medium\r
priority mutex test tasks. */\r
\r
/* Create the queue that we are going to use for the\r
prvSendFrontAndBackTest demo. */\r
- xQueue = xQueueCreate( genqQUEUE_LENGTH, sizeof( unsigned portLONG ) );\r
+ xQueue = xQueueCreate( genqQUEUE_LENGTH, sizeof( unsigned long ) );\r
\r
/* vQueueAddToRegistry() adds the queue to the queue registry, if one is\r
in use. The queue registry is provided as a means for kernel aware\r
\r
static void prvSendFrontAndBackTest( void *pvParameters )\r
{\r
-unsigned portLONG ulData, ulData2;\r
+unsigned long ulData, ulData2;\r
xQueueHandle xQueue;\r
\r
#ifdef USE_STDIO\r
- void vPrintDisplayMessage( const portCHAR * const * ppcMessageToSend );\r
+ void vPrintDisplayMessage( const char * const * ppcMessageToSend );\r
\r
- const portCHAR * const pcTaskStartMsg = "Queue SendToFront/SendToBack/Peek test started.\r\n";\r
+ const char * const pcTaskStartMsg = "Queue SendToFront/SendToBack/Peek test started.\r\n";\r
\r
/* Queue a message for printing to say the task has started. */\r
vPrintDisplayMessage( &pcTaskStartMsg );\r
xSemaphoreHandle xMutex = ( xSemaphoreHandle ) pvParameters;\r
\r
#ifdef USE_STDIO\r
- void vPrintDisplayMessage( const portCHAR * const * ppcMessageToSend );\r
+ void vPrintDisplayMessage( const char * const * ppcMessageToSend );\r
\r
- const portCHAR * const pcTaskStartMsg = "Mutex with priority inheritance test started.\r\n";\r
+ const char * const pcTaskStartMsg = "Mutex with priority inheritance test started.\r\n";\r
\r
/* Queue a message for printing to say the task has started. */\r
vPrintDisplayMessage( &pcTaskStartMsg );\r
/* This is called to check that all the created tasks are still running. */\r
portBASE_TYPE xAreGenericQueueTasksStillRunning( void )\r
{\r
-static unsigned portLONG ulLastLoopCounter = 0, ulLastLoopCounter2 = 0;\r
+static unsigned long ulLastLoopCounter = 0, ulLastLoopCounter2 = 0;\r
\r
/* If the demo task is still running then we expect the loopcounters to\r
have incremented since this function was last called. */\r
the array position of the value is set to a the identifier of the task or\r
interrupt that accessed the queue. This way missing or duplicate values can be\r
detected. */\r
-static unsigned portCHAR ucNormallyEmptyReceivedValues[ intqNUM_VALUES_TO_LOG ] = { 0 };\r
-static unsigned portCHAR ucNormallyFullReceivedValues[ intqNUM_VALUES_TO_LOG ] = { 0 };\r
+static unsigned char ucNormallyEmptyReceivedValues[ intqNUM_VALUES_TO_LOG ] = { 0 };\r
+static unsigned char ucNormallyFullReceivedValues[ intqNUM_VALUES_TO_LOG ] = { 0 };\r
\r
/* The test tasks themselves. */\r
static void prvLowerPriorityNormallyEmptyTask( void *pvParameters );\r
\r
/* Counter that is incremented on each cycle of a test. This is used to\r
detect a stalled task - a test that is no longer running. */\r
-static volatile unsigned portLONG ulLoopCounter = 0;\r
+static volatile unsigned long ulLoopCounter = 0;\r
\r
/* Handles to the test tasks. */\r
xTaskHandle xMediumPriorityTask, xHighPriorityTask, xHighestPriorityTask;\r
xQueueHandle xQueue;\r
\r
/* Create the queue that we are going to use for the test/demo. */\r
- xQueue = xQueueCreate( qpeekQUEUE_LENGTH, sizeof( unsigned portLONG ) );\r
+ xQueue = xQueueCreate( qpeekQUEUE_LENGTH, sizeof( unsigned long ) );\r
\r
/* vQueueAddToRegistry() adds the queue to the queue registry, if one is\r
in use. The queue registry is provided as a means for kernel aware\r
static void prvHighestPriorityPeekTask( void *pvParameters )\r
{\r
xQueueHandle xQueue = ( xQueueHandle ) pvParameters;\r
-unsigned portLONG ulValue;\r
+unsigned long ulValue;\r
\r
#ifdef USE_STDIO\r
{\r
- void vPrintDisplayMessage( const portCHAR * const * ppcMessageToSend );\r
+ void vPrintDisplayMessage( const char * const * ppcMessageToSend );\r
\r
- const portCHAR * const pcTaskStartMsg = "Queue peek test started.\r\n";\r
+ const char * const pcTaskStartMsg = "Queue peek test started.\r\n";\r
\r
/* Queue a message for printing to say the task has started. */\r
vPrintDisplayMessage( &pcTaskStartMsg );\r
static void prvHighPriorityPeekTask( void *pvParameters )\r
{\r
xQueueHandle xQueue = ( xQueueHandle ) pvParameters;\r
-unsigned portLONG ulValue;\r
+unsigned long ulValue;\r
\r
for( ;; )\r
{\r
static void prvMediumPriorityPeekTask( void *pvParameters )\r
{\r
xQueueHandle xQueue = ( xQueueHandle ) pvParameters;\r
-unsigned portLONG ulValue;\r
+unsigned long ulValue;\r
\r
for( ;; )\r
{\r
static void prvLowPriorityPeekTask( void *pvParameters )\r
{\r
xQueueHandle xQueue = ( xQueueHandle ) pvParameters;\r
-unsigned portLONG ulValue;\r
+unsigned long ulValue;\r
\r
for( ;; )\r
{\r
/* This is called to check that all the created tasks are still running. */\r
portBASE_TYPE xAreQueuePeekTasksStillRunning( void )\r
{\r
-static unsigned portLONG ulLastLoopCounter = 0;\r
+static unsigned long ulLastLoopCounter = 0;\r
\r
/* If the demo task is still running then we expect the loopcounter to\r
have incremented since this function was last called. */\r
xCountSemStruct *pxParameter;\r
\r
#ifdef USE_STDIO\r
- void vPrintDisplayMessage( const portCHAR * const * ppcMessageToSend );\r
+ void vPrintDisplayMessage( const char * const * ppcMessageToSend );\r
\r
- const portCHAR * const pcTaskStartMsg = "Counting semaphore demo started.\r\n";\r
+ const char * const pcTaskStartMsg = "Counting semaphore demo started.\r\n";\r
\r
/* Queue a message for printing to say the task has started. */\r
vPrintDisplayMessage( &pcTaskStartMsg );\r
/*\r
* The 'fixed delay' co-routine as described at the top of the file.\r
*/\r
-static void prvFixedDelayCoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex );\r
+static void prvFixedDelayCoRoutine( CoRoutineHandle_t xHandle, unsigned portBASE_TYPE uxIndex );\r
\r
/*\r
* The 'flash' co-routine as described at the top of the file.\r
*/\r
-static void prvFlashCoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex );\r
+static void prvFlashCoRoutine( CoRoutineHandle_t xHandle, unsigned portBASE_TYPE uxIndex );\r
\r
/* The queue used to pass data between the 'fixed delay' co-routines and the\r
'flash' co-routine. */\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void prvFixedDelayCoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex )\r
+static void prvFixedDelayCoRoutine( CoRoutineHandle_t xHandle, unsigned portBASE_TYPE uxIndex )\r
{\r
/* Even though this is a co-routine the xResult variable does not need to be\r
static as we do not need it to maintain its state between blocks. */\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void prvFlashCoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex )\r
+static void prvFlashCoRoutine( CoRoutineHandle_t xHandle, unsigned portBASE_TYPE uxIndex )\r
{\r
/* Even though this is a co-routine the variable do not need to be\r
static as we do not need it to maintain their state between blocks. */\r
/*\r
* The co-routine function itself.\r
*/\r
-static void prvHookCoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex );\r
+static void prvHookCoRoutine( CoRoutineHandle_t xHandle, unsigned portBASE_TYPE uxIndex );\r
\r
\r
/*\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void prvHookCoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex )\r
+static void prvHookCoRoutine( CoRoutineHandle_t xHandle, unsigned portBASE_TYPE uxIndex )\r
{\r
static unsigned portBASE_TYPE uxReceivedValue[ hookNUM_HOOK_CO_ROUTINES ];\r
portBASE_TYPE xResult;\r
{\r
struct pbuf *q;\r
u32_t l = 0;\r
- unsigned portCHAR *pcTxData;\r
+ unsigned char *pcTxData;\r
\r
#if ETH_PAD_SIZE\r
pbuf_header(p, -ETH_PAD_SIZE); /* drop the padding word */\r
/*\r
* The 'fixed delay' co-routine as described at the top of the file.\r
*/\r
-static void prvFixedDelayCoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex );\r
+static void prvFixedDelayCoRoutine( CoRoutineHandle_t xHandle, unsigned portBASE_TYPE uxIndex );\r
\r
/*\r
* The 'flash' co-routine as described at the top of the file.\r
*/\r
-static void prvFlashCoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex );\r
+static void prvFlashCoRoutine( CoRoutineHandle_t xHandle, unsigned portBASE_TYPE uxIndex );\r
\r
/* The queue used to pass data between the 'fixed delay' co-routines and the\r
'flash' co-routine. */\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void prvFixedDelayCoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex )\r
+static void prvFixedDelayCoRoutine( CoRoutineHandle_t xHandle, unsigned portBASE_TYPE uxIndex )\r
{\r
/* Even though this is a co-routine the xResult variable does not need to be\r
static as we do not need it to maintain its state between blocks. */\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void prvFlashCoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex )\r
+static void prvFlashCoRoutine( CoRoutineHandle_t xHandle, unsigned portBASE_TYPE uxIndex )\r
{\r
/* Even though this is a co-routine the variable do not need to be\r
static as we do not need it to maintain their state between blocks. */\r
#define mainGENERIC_QUEUE_PRIORITY ( tskIDLE_PRIORITY )\r
\r
/* Baud rate used by the COM test tasks. */\r
-#define mainCOM_TEST_BAUD_RATE ( ( unsigned portLONG ) 19200 )\r
+#define mainCOM_TEST_BAUD_RATE ( ( unsigned long ) 19200 )\r
\r
/* The frequency at which the 'Check' tasks executes. See the comments at the\r
top of the page. When the system is operating error free the 'Check' task\r
* Called by the Check task. Returns pdPASS if all the other tasks are found\r
* to be operating without error - otherwise returns pdFAIL.\r
*/\r
-static portSHORT prvCheckOtherTasksAreStillRunning( void );\r
+static short prvCheckOtherTasksAreStillRunning( void );\r
\r
/*\r
* Setup the microcontroller as used by this demo.\r
\r
/* The variable that is set to true should an error be found in one of the\r
register test tasks. */\r
-unsigned portLONG ulRegTestError = pdFALSE;\r
+unsigned long ulRegTestError = pdFALSE;\r
\r
/*---------------------------------------------------------------------------*/\r
\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static portSHORT prvCheckOtherTasksAreStillRunning( void )\r
+static short prvCheckOtherTasksAreStillRunning( void )\r
{\r
portBASE_TYPE lReturn = pdPASS;\r
\r
\r
static void vFirstRegisterTestTask( void *pvParameters )\r
{\r
-extern volatile unsigned portLONG ulCriticalNesting;\r
+extern volatile unsigned long ulCriticalNesting;\r
\r
/* Fills the registers with known values (different to the values\r
used in vSecondRegisterTestTask()), then checks that the registers still\r
\r
static void vSecondRegisterTestTask( void *pvParameters )\r
{\r
-extern volatile unsigned portLONG ulCriticalNesting;\r
+extern volatile unsigned long ulCriticalNesting;\r
\r
/* Fills the registers with known values (different to the values\r
used in vFirstRegisterTestTask()), then checks that the registers still\r
\r
#define partstNUM_LEDs 8\r
\r
-static unsigned portCHAR sState[ partstNUM_LEDs ] = { pdFALSE };\r
-static unsigned portCHAR sState1[ partstNUM_LEDs ] = { pdFALSE };\r
+static unsigned char sState[ partstNUM_LEDs ] = { pdFALSE };\r
+static unsigned char sState1[ partstNUM_LEDs ] = { pdFALSE };\r
\r
\r
/*-----------------------------------------------------------*/\r
/* The queue used to hold characters waiting transmission. */\r
static xQueueHandle xCharsForTx; \r
\r
-static volatile portSHORT sTHREEmpty;\r
+static volatile short sTHREEmpty;\r
\r
/*-----------------------------------------------------------*/\r
\r
-xComPortHandle xSerialPortInitMinimal( unsigned portLONG ulWantedBaud, unsigned portBASE_TYPE uxQueueLength )\r
+xComPortHandle xSerialPortInitMinimal( unsigned long ulWantedBaud, unsigned portBASE_TYPE uxQueueLength )\r
{\r
portENTER_CRITICAL();\r
{\r
/* Create the queues used by the com test task. */\r
- xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed portCHAR ) );\r
- xCharsForTx = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed portCHAR ) );\r
+ xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed char ) );\r
+ xCharsForTx = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed char ) );\r
\r
/* Initialize UART asynchronous mode */\r
BGR02 = configPER_CLOCK_HZ / ulWantedBaud;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed portCHAR *pcRxedChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime )\r
{\r
/* Get the next character from the buffer. Return false if no characters\r
are available, or arrive before xBlockTime expires. */\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed portCHAR cOutChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime )\r
{\r
signed portBASE_TYPE xReturn;\r
\r
*/\r
__interrupt void UART2_RxISR (void)\r
{\r
- signed portCHAR cChar;\r
+ signed char cChar;\r
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;\r
\r
/* Get the character from the UART and post it on the queue of Rxed \r
*/\r
__interrupt void UART2_TxISR (void)\r
{\r
- signed portCHAR cChar;\r
+ signed char cChar;\r
signed portBASE_TYPE xTaskWoken = pdFALSE;\r
\r
/* The previous character has been transmitted. See if there are any\r
\r
void Puts5( const char *Name5 ) /* Puts a String to UART */\r
{\r
- volatile portSHORT i, len;\r
+ volatile short i, len;\r
len = strlen( Name5 );\r
\r
for( i = 0; i < len; i++ ) /* go through string */\r
\r
void Puthex5( unsigned long n, unsigned char digits )\r
{\r
- unsigned portCHAR digit = 0, div = 0, i;\r
+ unsigned char digit = 0, div = 0, i;\r
\r
div = ( 4 * (digits - 1) ); /* init shift divisor */\r
for( i = 0; i < digits; i++ )\r
\r
void Putdec5( unsigned long x, int digits )\r
{\r
- portSHORT i;\r
- portCHAR buf[10], sign = 1;\r
+ short i;\r
+ char buf[10], sign = 1;\r
\r
if( digits < 0 )\r
{ /* should be print of zero? */\r
\r
static void vUART5Task( void *pvParameters )\r
{\r
- static portCHAR buff[ 900 ] = { 0 };\r
- unsigned portLONG trace_len, j;\r
+ static char buff[ 900 ] = { 0 };\r
+ unsigned long trace_len, j;\r
\r
- unsigned portCHAR ch;\r
+ unsigned char ch;\r
\r
SSR05_RIE = 1;\r
Puts5( "\n -------------MB91467D FreeRTOS DEMO Task List and Trace Utility----------- \n" );\r
\r
__interrupt void UART5_RxISR( void )\r
{\r
-unsigned portCHAR ch;\r
+unsigned char ch;\r
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;\r
\r
ch = RDR05;\r
* The below function creates hardware watchdog task.\r
*---------------------------------------------------------------------------*/\r
#if WATCHDOG == WTC_IN_TASK\r
-void vStartWatchdogTask( unsigned portSHORT uxPriority )\r
+void vStartWatchdogTask( unsigned short uxPriority )\r
{\r
xTaskCreate( prvWatchdogTask , "KickWTC", portMINIMAL_STACK_SIZE, ( void * ) NULL, uxPriority, ( xTaskHandle * ) NULL );\r
}\r
/*\r
* The 'fixed delay' co-routine as described at the top of the file.\r
*/\r
-static void prvFixedDelayCoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex );\r
+static void prvFixedDelayCoRoutine( CoRoutineHandle_t xHandle, unsigned portBASE_TYPE uxIndex );\r
\r
/*\r
* The 'flash' co-routine as described at the top of the file.\r
*/\r
-static void prvFlashCoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex );\r
+static void prvFlashCoRoutine( CoRoutineHandle_t xHandle, unsigned portBASE_TYPE uxIndex );\r
\r
/* The queue used to pass data between the 'fixed delay' co-routines and the\r
'flash' co-routine. */\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void prvFixedDelayCoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex )\r
+static void prvFixedDelayCoRoutine( CoRoutineHandle_t xHandle, unsigned portBASE_TYPE uxIndex )\r
{\r
/* Even though this is a co-routine the xResult variable does not need to be\r
static as we do not need it to maintain its state between blocks. */\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void prvFlashCoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex )\r
+static void prvFlashCoRoutine( CoRoutineHandle_t xHandle, unsigned portBASE_TYPE uxIndex )\r
{\r
/* Even though this is a co-routine the variable do not need to be\r
static as we do not need it to maintain their state between blocks. */\r
\r
#define partstNUM_LEDs 8\r
\r
-static unsigned portCHAR sState[ partstNUM_LEDs ] = { pdFALSE };\r
-static unsigned portCHAR sState1[ partstNUM_LEDs ] = { pdFALSE };\r
+static unsigned char sState[ partstNUM_LEDs ] = { pdFALSE };\r
+static unsigned char sState1[ partstNUM_LEDs ] = { pdFALSE };\r
\r
\r
/*-----------------------------------------------------------*/\r
/* The queue used to hold characters waiting transmission. */\r
static xQueueHandle xCharsForTx;\r
\r
-static volatile portSHORT sTHREEmpty;\r
+static volatile short sTHREEmpty;\r
\r
-static volatile portSHORT queueFail = pdFALSE;\r
+static volatile short queueFail = pdFALSE;\r
\r
/*-----------------------------------------------------------*/\r
-xComPortHandle xSerialPortInitMinimal( unsigned portLONG ulWantedBaud, unsigned portBASE_TYPE uxQueueLength )\r
+xComPortHandle xSerialPortInitMinimal( unsigned long ulWantedBaud, unsigned portBASE_TYPE uxQueueLength )\r
{\r
/* Initialise the hardware. */\r
portENTER_CRITICAL();\r
{\r
/* Create the queues used by the com test task. */\r
- xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof(signed portCHAR) );\r
- xCharsForTx = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof(signed portCHAR) );\r
+ xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof(signed char) );\r
+ xCharsForTx = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof(signed char) );\r
\r
if( xRxedChars == 0 )\r
{\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed portCHAR *pcRxedChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime )\r
{\r
/* Get the next character from the buffer. Return false if no characters\r
are available, or arrive before xBlockTime expires. */\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed portCHAR cOutChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime )\r
{\r
signed portBASE_TYPE xReturn;\r
\r
*/\r
__interrupt void UART0_RxISR( void )\r
{\r
-volatile signed portCHAR cChar;\r
+volatile signed char cChar;\r
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;\r
\r
/* Get the character from the UART and post it on the queue of Rxed \r
*/\r
__interrupt void UART0_TxISR( void )\r
{\r
-signed portCHAR cChar;\r
+signed char cChar;\r
signed portBASE_TYPE xTaskWoken = pdFALSE;\r
\r
/* The previous character has been transmitted. See if there are any\r
\r
void Puts0( const char *Name1 ) /* Puts a String to UART */\r
{\r
- volatile portSHORT i, len;\r
+ volatile short i, len;\r
len = strlen( Name1 );\r
\r
for( i = 0; i < len; i++ ) /* go through string */\r
\r
void Puthex0( unsigned long n, unsigned char digits )\r
{\r
- unsigned portCHAR digit = 0, div = 0, i;\r
+ unsigned char digit = 0, div = 0, i;\r
\r
div = ( 4 * (digits - 1) ); /* init shift divisor */\r
for( i = 0; i < digits; i++ )\r
\r
void Putdec0( unsigned long x, int digits )\r
{\r
- portSHORT i;\r
- portCHAR buf[10], sign = 1;\r
+ short i;\r
+ char buf[10], sign = 1;\r
\r
if( digits < 0 )\r
{ /* should be print of zero? */\r
\r
static void vUART0Task( void *pvParameters )\r
{\r
- static portCHAR buff[ 800 ] = { 0 };\r
- unsigned portLONG trace_len;\r
- signed portLONG i, j, l = 0;\r
+ static char buff[ 800 ] = { 0 };\r
+ unsigned long trace_len;\r
+ signed long i, j, l = 0;\r
\r
- unsigned portCHAR ch;\r
+ unsigned char ch;\r
( void ) pvParameters;\r
\r
SSR0_RIE = 1;\r
\r
__interrupt void UART0_TraceRxISR( void )\r
{\r
-unsigned portCHAR ch;\r
+unsigned char ch;\r
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;\r
\r
ch = RDR0;\r
#define partstTOTAL_NUM_LEDs 16\r
#define partstNUM_LEDs_PER_DISPLAY 8\r
\r
-volatile unsigned char *pucDisplayOutput[ 2 ] = { ( unsigned portCHAR * ) 3, ( unsigned portCHAR * ) 5 };\r
+volatile unsigned char *pucDisplayOutput[ 2 ] = { ( unsigned char * ) 3, ( unsigned char * ) 5 };\r
\r
void vParTestInitialise( void )\r
{\r
static void vLEDFlashTask( void *pvParameters );\r
\r
/* The co-routine that is created 7 times. */\r
-static void prvFixedDelayCoRoutine( xCoRoutineHandle xHandle, unsigned short usIndex );\r
+static void prvFixedDelayCoRoutine( CoRoutineHandle_t xHandle, unsigned short usIndex );\r
\r
/* This task is created once, but itself creates 7 co-routines. */\r
static void vLEDCoRoutineControlTask( void *pvParameters );\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void prvFixedDelayCoRoutine( xCoRoutineHandle xHandle, unsigned short usIndex )\r
+static void prvFixedDelayCoRoutine( CoRoutineHandle_t xHandle, unsigned short usIndex )\r
{\r
/* The usIndex parameter of the co-routine function is used as an index into\r
the xFlashRates array to obtain the delay period to use. */\r
\r
/*-----------------------------------------------------------*/\r
\r
-xComPortHandle xSerialPortInitMinimal( unsigned portLONG ulWantedBaud, unsigned portBASE_TYPE uxQueueLength )\r
+xComPortHandle xSerialPortInitMinimal( unsigned long ulWantedBaud, unsigned portBASE_TYPE uxQueueLength )\r
{\r
-unsigned portLONG ulBaudRateCount;\r
+unsigned long ulBaudRateCount;\r
\r
/* Initialise the hardware. */\r
\r
UCA1CTL1 = UCSSEL0 | UCSSEL1;\r
\r
/* Setup baud rate low byte. */\r
- UCA1BR0 = ( unsigned portCHAR ) ( ulBaudRateCount & ( unsigned long ) 0xff );\r
+ UCA1BR0 = ( unsigned char ) ( ulBaudRateCount & ( unsigned long ) 0xff );\r
\r
/* Setup baud rate high byte. */\r
ulBaudRateCount >>= 8UL;\r
- UCA1BR1 = ( unsigned portCHAR ) ( ulBaudRateCount & ( unsigned long ) 0xff );\r
+ UCA1BR1 = ( unsigned char ) ( ulBaudRateCount & ( unsigned long ) 0xff );\r
\r
/* UCLISTEN sets loopback mode! */\r
UCA1STAT = UCLISTEN;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed portCHAR *pcRxedChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime )\r
{\r
/* Get the next character from the buffer. Return false if no characters\r
are available, or arrive before xBlockTime expires. */\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed portCHAR cOutChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime )\r
{\r
signed portBASE_TYPE xReturn;\r
\r
\r
/*-----------------------------------------------------------*/\r
\r
-xComPortHandle xSerialPortInitMinimal( unsigned portLONG ulWantedBaud, unsigned portBASE_TYPE uxQueueLength )\r
+xComPortHandle xSerialPortInitMinimal( unsigned long ulWantedBaud, unsigned portBASE_TYPE uxQueueLength )\r
{\r
-unsigned portLONG ulBaudRateCount;\r
+unsigned long ulBaudRateCount;\r
\r
/* Initialise the hardware. */\r
\r
portENTER_CRITICAL();\r
{\r
/* Create the queues used by the com test task. */\r
- xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed portCHAR ) );\r
- xCharsForTx = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed portCHAR ) );\r
+ xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed char ) );\r
+ xCharsForTx = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed char ) );\r
\r
/* Reset UART. */\r
UCA1CTL1 |= UCSWRST;\r
UCA1CTL1 = UCSSEL0 | UCSSEL1;\r
\r
/* Setup baud rate low byte. */\r
- UCA1BR0 = ( unsigned portCHAR ) ( ulBaudRateCount & ( unsigned portLONG ) 0xff );\r
+ UCA1BR0 = ( unsigned char ) ( ulBaudRateCount & ( unsigned long ) 0xff );\r
\r
/* Setup baud rate high byte. */\r
ulBaudRateCount >>= 8UL;\r
- UCA1BR1 = ( unsigned portCHAR ) ( ulBaudRateCount & ( unsigned portLONG ) 0xff );\r
+ UCA1BR1 = ( unsigned char ) ( ulBaudRateCount & ( unsigned long ) 0xff );\r
\r
/* UCLISTEN sets loopback mode! */\r
UCA1STAT = UCLISTEN;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed portCHAR *pcRxedChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime )\r
{\r
/* Get the next character from the buffer. Return false if no characters\r
are available, or arrive before xBlockTime expires. */\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed portCHAR cOutChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime )\r
{\r
signed portBASE_TYPE xReturn;\r
\r
\r
/* 78K0R Option Byte Definition. Watchdog disabled, LVI enabled, OCD interface\r
enabled. */\r
-__root __far const unsigned portCHAR OptionByte[] @ 0x00C0 =\r
+__root __far const unsigned char OptionByte[] @ 0x00C0 =\r
{\r
WATCHDOG_DISABLED, LVI_ENABLED, RESERVED_FF, OCD_ENABLED\r
};\r
\r
/* Security byte definition */\r
-__root __far const unsigned portCHAR SecuIDCode[] @ 0x00C4 =\r
+__root __far const unsigned char SecuIDCode[] @ 0x00C4 =\r
{\r
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff\r
};\r
\r
int __low_level_init(void)\r
{\r
-unsigned portCHAR ucResetFlag = RESF;\r
+unsigned char ucResetFlag = RESF;\r
\r
portDISABLE_INTERRUPTS();\r
\r
\r
/* Set clock speed. */\r
CSS = 0;\r
- CKC &= (unsigned portCHAR)~0x07;\r
+ CKC &= (unsigned char)~0x07;\r
CKC |= 0x00;\r
}\r
#else\r
/*-----------------------------------------------------------*/\r
\r
/* Called by the startup code to initialise the run time system. */\r
-unsigned portCHAR __low_level_init(void);\r
+unsigned char __low_level_init(void);\r
\r
/*-----------------------------------------------------------*/\r
\r
-unsigned portCHAR __low_level_init(void)\r
+unsigned char __low_level_init(void)\r
{\r
-unsigned portCHAR resetflag = RESF;\r
-unsigned portCHAR psval = 0;\r
+unsigned char resetflag = RESF;\r
+unsigned char psval = 0;\r
unsigned portBASE_TYPE i = 0; \r
\r
/* Setup provided by NEC. */\r
/*-----------------------------------------------------------*/\r
\r
/* Called by the startup code to initialise the run time system. */\r
-unsigned portCHAR __low_level_init(void);\r
+unsigned char __low_level_init(void);\r
\r
/*-----------------------------------------------------------*/\r
\r
-unsigned portCHAR __low_level_init(void)\r
+unsigned char __low_level_init(void)\r
{\r
-unsigned portCHAR resetflag = RESF;\r
-unsigned portCHAR psval = 0;\r
+unsigned char resetflag = RESF;\r
+unsigned char psval = 0;\r
\r
/* Setup provided by NEC. */\r
\r
/*-----------------------------------------------------------*/\r
\r
/* Called by the startup code to initialise the run time system. */\r
-unsigned portCHAR __low_level_init( void );\r
+unsigned char __low_level_init( void );\r
\r
/*-----------------------------------------------------------*/\r
\r
-unsigned portCHAR __low_level_init( void )\r
+unsigned char __low_level_init( void )\r
{\r
-unsigned portCHAR resetflag = RESF;\r
+unsigned char resetflag = RESF;\r
unsigned portBASE_TYPE i = 0; \r
\r
portDISABLE_INTERRUPTS(); /* disable global interrupts */ \r
\r
/* A variable that will get set to fail if a RegTest task finds an error. The\r
variable is inspected by the 'Check' task. */\r
-static volatile portLONG lRegTestStatus = pdPASS;\r
+static volatile long lRegTestStatus = pdPASS;\r
\r
/*-----------------------------------------------------------*/\r
\r
/*\r
* See the serial2.h header file.\r
*/\r
-xComPortHandle xSerialPortInitMinimal( unsigned portLONG ulWantedBaud, unsigned portBASE_TYPE uxQueueLength )\r
+xComPortHandle xSerialPortInitMinimal( unsigned long ulWantedBaud, unsigned portBASE_TYPE uxQueueLength )\r
{\r
xComPortHandle xReturn = serHANDLE;\r
-const unsigned portLONG ulFuclk = ( configCPU_CLOCK_HZ / 2 ) / 8UL;\r
+const unsigned long ulFuclk = ( configCPU_CLOCK_HZ / 2 ) / 8UL;\r
\r
/* Create the queues used to hold Rx and Tx characters. */\r
- xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed portCHAR ) );\r
- xCharsForTx = xQueueCreate( uxQueueLength + 1, ( unsigned portBASE_TYPE ) sizeof( signed portCHAR ) );\r
+ xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed char ) );\r
+ xCharsForTx = xQueueCreate( uxQueueLength + 1, ( unsigned portBASE_TYPE ) sizeof( signed char ) );\r
\r
/* If the queues were created correctly then setup the serial port\r
hardware. */\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed portCHAR *pcRxedChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime )\r
{\r
/* The port handle is not required as this driver only supports one port. */\r
( void ) pxPort;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-void vSerialPutString( xComPortHandle pxPort, const signed portCHAR * const pcString, unsigned portSHORT usStringLength )\r
+void vSerialPutString( xComPortHandle pxPort, const signed char * const pcString, unsigned short usStringLength )\r
{\r
-signed portCHAR *pxNext;\r
+signed char *pxNext;\r
\r
/* A couple of parameters that this port does not use. */\r
( void ) usStringLength;\r
( void ) pxPort;\r
\r
/* Send each character in the string, one at a time. */\r
- pxNext = ( signed portCHAR * ) pcString;\r
+ pxNext = ( signed char * ) pcString;\r
while( *pxNext )\r
{\r
xSerialPutChar( pxPort, *pxNext, serNO_BLOCK );\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed portCHAR cOutChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime )\r
{\r
portBASE_TYPE xReturn = pdPASS;\r
\r
/* Rx interrupt handler. This is called from the asm file wrapper. */\r
void vUARTRxISRHandler( void )\r
{\r
-portCHAR cChar;\r
+char cChar;\r
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;\r
\r
/* Send the received character to the Rx queue. */\r
/* \r
* Move to the first (0) or second (1) row of the LCD. \r
*/\r
-static void prvLCDGotoRow( unsigned portSHORT usRow );\r
+static void prvLCDGotoRow( unsigned short usRow );\r
\r
/* \r
* Write a string of text to the LCD. \r
*/\r
-static void prvLCDPutString( portCHAR *pcString );\r
+static void prvLCDPutString( char *pcString );\r
\r
/* \r
* Clear the LCD. \r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void prvLCDGotoRow( unsigned portSHORT usRow )\r
+static void prvLCDGotoRow( unsigned short usRow )\r
{\r
if( usRow == 0 )\r
{\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void prvLCDPutString( portCHAR *pcString )\r
+static void prvLCDPutString( char *pcString )\r
{\r
/* Write out each character with appropriate delay between each. */\r
while( *pcString )\r
static void vLCDTask( void *pvParameters )\r
{\r
xLCDMessage xMessage;\r
-unsigned portSHORT usRow = 0;\r
+unsigned short usRow = 0;\r
\r
/* Remove compiler warnigns. */\r
( void ) pvParameters;\r
\r
/* The maximum time (in processor clocks) between two consecutive timer\r
interrupts so far. */\r
-unsigned portSHORT usMaxJitter = 0;\r
+unsigned short usMaxJitter = 0;\r
\r
/*-----------------------------------------------------------*/\r
\r
-void vSetupTimerTest( unsigned portSHORT usFrequencyHz )\r
+void vSetupTimerTest( unsigned short usFrequencyHz )\r
{\r
/* T2 is used to generate interrupts. T4 is used to provide an accurate\r
time measurement. */\r
TMR4 = 0;\r
\r
/* Timer 2 is going to interrupt at usFrequencyHz Hz. */\r
- PR2 = ( unsigned portSHORT ) ( configCPU_CLOCK_HZ / ( unsigned portLONG ) usFrequencyHz );\r
+ PR2 = ( unsigned short ) ( configCPU_CLOCK_HZ / ( unsigned long ) usFrequencyHz );\r
\r
/* Timer 4 is going to free run from minimum to maximum value. */\r
- PR4 = ( unsigned portSHORT ) timerMAX_COUNT;\r
+ PR4 = ( unsigned short ) timerMAX_COUNT;\r
\r
/* Setup timer 2 interrupt priority to be above the kernel priority so \r
the timer jitter is not effected by the kernel activity. */\r
\r
static void prvCalculateAndStoreJitter( void )\r
{\r
-static unsigned portSHORT usLastCount = 0, usSettleCount = 0;\r
-unsigned portSHORT usThisCount, usDifference;\r
+static unsigned short usLastCount = 0, usSettleCount = 0;\r
+unsigned short usThisCount, usDifference;\r
\r
/* Capture the timer value as we enter the interrupt. */\r
usThisCount = TMR4;\r
\r
/* Buffers into which the flop registers will be saved. There is a buffer for \r
both tasks. */\r
-static volatile unsigned portLONG ulFlopRegisters[ flopNUMBER_OF_TASKS ][ portNO_FLOP_REGISTERS_TO_SAVE ];\r
+static volatile unsigned long ulFlopRegisters[ flopNUMBER_OF_TASKS ][ portNO_FLOP_REGISTERS_TO_SAVE ];\r
\r
/* Variables that are incremented by the tasks to indicate that they are still\r
running. */\r
-static volatile unsigned portLONG ulFlop1CycleCount = 0, ulFlop2CycleCount = 0;\r
+static volatile unsigned long ulFlop1CycleCount = 0, ulFlop2CycleCount = 0;\r
\r
/*-----------------------------------------------------------*/\r
\r
{\r
portBASE_TYPE xReturn = pdPASS;\r
unsigned portBASE_TYPE x, y, z = flopSTART_VALUE;\r
-static unsigned portLONG ulLastFlop1CycleCount = 0, ulLastFlop2CycleCount = 0;\r
+static unsigned long ulLastFlop1CycleCount = 0, ulLastFlop2CycleCount = 0;\r
\r
/* Called from the 'check' task.\r
\r
\r
/* These variables are used to check that all the tasks are still running. If a \r
task gets a calculation wrong it will stop incrementing its check variable. */\r
-static volatile unsigned portSHORT usTaskCheck[ mathNUMBER_OF_TASKS ] = { ( unsigned portSHORT ) 0 };\r
+static volatile unsigned short usTaskCheck[ mathNUMBER_OF_TASKS ] = { ( unsigned short ) 0 };\r
\r
/* Buffers into which the flop registers will be saved. There is a buffer for \r
each task created within this file. Zeroing out this array is the normal and\r
safe option as this will cause the task to start with all zeros in its flop\r
context. */\r
-static unsigned portLONG ulFlopRegisters[ mathNUMBER_OF_TASKS ][ portNO_FLOP_REGISTERS_TO_SAVE ];\r
+static unsigned long ulFlopRegisters[ mathNUMBER_OF_TASKS ][ portNO_FLOP_REGISTERS_TO_SAVE ];\r
\r
/*-----------------------------------------------------------*/\r
\r
static portTASK_FUNCTION( vCompetingMathTask1, pvParameters )\r
{\r
volatile portFLOAT ff1, ff2, ff3, ff4;\r
-volatile unsigned portSHORT *pusTaskCheckVariable;\r
+volatile unsigned short *pusTaskCheckVariable;\r
volatile portFLOAT fAnswer;\r
-portSHORT sError = pdFALSE;\r
+short sError = pdFALSE;\r
\r
ff1 = 123.4567F;\r
ff2 = 2345.6789F;\r
\r
/* The variable this task increments to show it is still running is passed in \r
as the parameter. */\r
- pusTaskCheckVariable = ( unsigned portSHORT * ) pvParameters;\r
+ pusTaskCheckVariable = ( unsigned short * ) pvParameters;\r
\r
/* Keep performing a calculation and checking the result against a constant. */\r
for(;;)\r
static portTASK_FUNCTION( vCompetingMathTask2, pvParameters )\r
{\r
volatile portFLOAT ff1, ff2, ff3, ff4;\r
-volatile unsigned portSHORT *pusTaskCheckVariable;\r
+volatile unsigned short *pusTaskCheckVariable;\r
volatile portFLOAT fAnswer;\r
-portSHORT sError = pdFALSE;\r
+short sError = pdFALSE;\r
\r
ff1 = -389.38F;\r
ff2 = 32498.2F;\r
\r
/* The variable this task increments to show it is still running is passed in \r
as the parameter. */\r
- pusTaskCheckVariable = ( unsigned portSHORT * ) pvParameters;\r
+ pusTaskCheckVariable = ( unsigned short * ) pvParameters;\r
\r
/* Keep performing a calculation and checking the result against a constant. */\r
for( ;; )\r
static portTASK_FUNCTION( vCompetingMathTask3, pvParameters )\r
{\r
volatile portFLOAT *pfArray, fTotal1, fTotal2, fDifference;\r
-volatile unsigned portSHORT *pusTaskCheckVariable;\r
+volatile unsigned short *pusTaskCheckVariable;\r
const size_t xArraySize = 10;\r
size_t xPosition;\r
-portSHORT sError = pdFALSE;\r
+short sError = pdFALSE;\r
\r
/* The variable this task increments to show it is still running is passed in \r
as the parameter. */\r
- pusTaskCheckVariable = ( unsigned portSHORT * ) pvParameters;\r
+ pusTaskCheckVariable = ( unsigned short * ) pvParameters;\r
\r
pfArray = ( portFLOAT * ) pvPortMalloc( xArraySize * sizeof( portFLOAT ) );\r
\r
static portTASK_FUNCTION( vCompetingMathTask4, pvParameters )\r
{\r
volatile portFLOAT *pfArray, fTotal1, fTotal2, fDifference;\r
-volatile unsigned portSHORT *pusTaskCheckVariable;\r
+volatile unsigned short *pusTaskCheckVariable;\r
const size_t xArraySize = 10;\r
size_t xPosition;\r
-portSHORT sError = pdFALSE;\r
+short sError = pdFALSE;\r
\r
/* The variable this task increments to show it is still running is passed in \r
as the parameter. */\r
- pusTaskCheckVariable = ( unsigned portSHORT * ) pvParameters;\r
+ pusTaskCheckVariable = ( unsigned short * ) pvParameters;\r
\r
pfArray = ( portFLOAT * ) pvPortMalloc( xArraySize * sizeof( portFLOAT ) );\r
\r
{\r
/* Keep a history of the check variables so we know if they have been incremented \r
since the last call. */\r
-static unsigned portSHORT usLastTaskCheck[ mathNUMBER_OF_TASKS ] = { ( unsigned portSHORT ) 0 };\r
+static unsigned short usLastTaskCheck[ mathNUMBER_OF_TASKS ] = { ( unsigned short ) 0 };\r
portBASE_TYPE xReturn = pdTRUE, xTask;\r
\r
/* Check the maths tasks are still running by ensuring their check variables \r
static volatile unsigned portBASE_TYPE xRegTestStatus = pdPASS;\r
\r
/* Counters used to ensure the regtest tasks are still running. */\r
-static volatile unsigned portLONG ulRegTest1Counter = 0UL, ulRegTest2Counter = 0UL;\r
+static volatile unsigned long ulRegTest1Counter = 0UL, ulRegTest2Counter = 0UL;\r
\r
/*-----------------------------------------------------------*/\r
\r
static portBASE_TYPE prvCheckOtherTasksAreStillRunning( void )\r
{\r
portBASE_TYPE lReturn = pdPASS;\r
-static unsigned portLONG ulLastRegTest1Counter= 0UL, ulLastRegTest2Counter = 0UL;\r
+static unsigned long ulLastRegTest1Counter= 0UL, ulLastRegTest2Counter = 0UL;\r
\r
/* The demo tasks maintain a count that increments every cycle of the task\r
provided that the task has never encountered an error. This function \r
/* This hook function will get called if there is a suspected stack overflow.\r
An overflow can cause the task name to be corrupted, in which case the task\r
handle needs to be used to determine the offending task. */\r
-void vApplicationStackOverflowHook( xTaskHandle xTask, signed portCHAR *pcTaskName );\r
-void vApplicationStackOverflowHook( xTaskHandle xTask, signed portCHAR *pcTaskName )\r
+void vApplicationStackOverflowHook( xTaskHandle xTask, signed char *pcTaskName );\r
+void vApplicationStackOverflowHook( xTaskHandle xTask, signed char *pcTaskName )\r
{\r
/* To prevent the optimiser removing the variables. */\r
volatile xTaskHandle xTaskIn = xTask;\r
-volatile signed portCHAR *pcTaskNameIn = pcTaskName;\r
+volatile signed char *pcTaskNameIn = pcTaskName;\r
\r
/* Remove compiler warnings. */\r
( void ) xTaskIn;\r
\r
/*-----------------------------------------------------------*/\r
\r
-xComPortHandle xSerialPortInitMinimal( unsigned portLONG ulWantedBaud, unsigned portBASE_TYPE uxQueueLength )\r
+xComPortHandle xSerialPortInitMinimal( unsigned long ulWantedBaud, unsigned portBASE_TYPE uxQueueLength )\r
{\r
/* NOTE: The baud rate used by this driver is determined by the hardware\r
parameterization of the UART Lite peripheral, and the baud value passed to\r
( void ) ulWantedBaud;\r
\r
/* Create the queues used to hold Rx and Tx characters. */\r
- xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed portCHAR ) );\r
- xCharsForTx = xQueueCreate( uxQueueLength + 1, ( unsigned portBASE_TYPE ) sizeof( signed portCHAR ) );\r
+ xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed char ) );\r
+ xCharsForTx = xQueueCreate( uxQueueLength + 1, ( unsigned portBASE_TYPE ) sizeof( signed char ) );\r
\r
/* Only initialise the UART if the queues were created correctly. */\r
if( ( xRxedChars != NULL ) && ( xCharsForTx != NULL ) )\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed portCHAR *pcRxedChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime )\r
{\r
/* The port handle is not required as this driver only supports one UART. */\r
( void ) pxPort;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed portCHAR cOutChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime )\r
{\r
portBASE_TYPE xReturn = pdTRUE;\r
\r
\r
static void vSerialISR( XUartLite *pxUART )\r
{\r
-unsigned portLONG ulISRStatus;\r
+unsigned long ulISRStatus;\r
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE, lDidSomething;\r
-portCHAR cChar;\r
+char cChar;\r
\r
/* Just to remove compiler warning. */\r
( void ) pxUART;\r
/* A character is available - place it in the queue of received\r
characters. This might wake a task that was blocked waiting for \r
data. */\r
- cChar = ( portCHAR ) XIo_In32( XPAR_RS232_UART_BASEADDR + XUL_RX_FIFO_OFFSET );\r
+ cChar = ( char ) XIo_In32( XPAR_RS232_UART_BASEADDR + XUL_RX_FIFO_OFFSET );\r
xQueueSendFromISR( xRxedChars, &cChar, &xHigherPriorityTaskWoken );\r
lDidSomething = pdTRUE;\r
}\r
\r
/* Buffers into which the flop registers will be saved. There is a buffer for \r
both tasks. */\r
-static volatile unsigned portLONG ulFlopRegisters[ flopNUMBER_OF_TASKS ][ portNO_FLOP_REGISTERS_TO_SAVE ];\r
+static volatile unsigned long ulFlopRegisters[ flopNUMBER_OF_TASKS ][ portNO_FLOP_REGISTERS_TO_SAVE ];\r
\r
/* Variables that are incremented by the tasks to indicate that they are still\r
running. */\r
-static volatile unsigned portLONG ulFlop1CycleCount = 0, ulFlop2CycleCount = 0;\r
+static volatile unsigned long ulFlop1CycleCount = 0, ulFlop2CycleCount = 0;\r
\r
/*-----------------------------------------------------------*/\r
\r
{\r
portBASE_TYPE xReturn = pdPASS;\r
unsigned portBASE_TYPE x, y, z = flopSTART_VALUE;\r
-static unsigned portLONG ulLastFlop1CycleCount = 0, ulLastFlop2CycleCount = 0;\r
+static unsigned long ulLastFlop1CycleCount = 0, ulLastFlop2CycleCount = 0;\r
\r
/* Called from the 'check' task.\r
\r
\r
/* These variables are used to check that all the tasks are still running. If a \r
task gets a calculation wrong it will stop incrementing its check variable. */\r
-static volatile unsigned portSHORT usTaskCheck[ mathNUMBER_OF_TASKS ] = { ( unsigned portSHORT ) 0 };\r
+static volatile unsigned short usTaskCheck[ mathNUMBER_OF_TASKS ] = { ( unsigned short ) 0 };\r
\r
/* Buffers into which the flop registers will be saved. There is a buffer for \r
each task created within this file. Zeroing out this array is the normal and\r
safe option as this will cause the task to start with all zeros in its flop\r
context. */\r
-static unsigned portLONG ulFlopRegisters[ mathNUMBER_OF_TASKS ][ portNO_FLOP_REGISTERS_TO_SAVE ];\r
+static unsigned long ulFlopRegisters[ mathNUMBER_OF_TASKS ][ portNO_FLOP_REGISTERS_TO_SAVE ];\r
\r
/*-----------------------------------------------------------*/\r
\r
static portTASK_FUNCTION( vCompetingMathTask1, pvParameters )\r
{\r
volatile portFLOAT ff1, ff2, ff3, ff4;\r
-volatile unsigned portSHORT *pusTaskCheckVariable;\r
+volatile unsigned short *pusTaskCheckVariable;\r
volatile portFLOAT fAnswer;\r
-portSHORT sError = pdFALSE;\r
+short sError = pdFALSE;\r
\r
ff1 = 123.4567F;\r
ff2 = 2345.6789F;\r
\r
/* The variable this task increments to show it is still running is passed in \r
as the parameter. */\r
- pusTaskCheckVariable = ( unsigned portSHORT * ) pvParameters;\r
+ pusTaskCheckVariable = ( unsigned short * ) pvParameters;\r
\r
/* Keep performing a calculation and checking the result against a constant. */\r
for(;;)\r
static portTASK_FUNCTION( vCompetingMathTask2, pvParameters )\r
{\r
volatile portFLOAT ff1, ff2, ff3, ff4;\r
-volatile unsigned portSHORT *pusTaskCheckVariable;\r
+volatile unsigned short *pusTaskCheckVariable;\r
volatile portFLOAT fAnswer;\r
-portSHORT sError = pdFALSE;\r
+short sError = pdFALSE;\r
\r
ff1 = -389.38F;\r
ff2 = 32498.2F;\r
\r
/* The variable this task increments to show it is still running is passed in \r
as the parameter. */\r
- pusTaskCheckVariable = ( unsigned portSHORT * ) pvParameters;\r
+ pusTaskCheckVariable = ( unsigned short * ) pvParameters;\r
\r
/* Keep performing a calculation and checking the result against a constant. */\r
for( ;; )\r
static portTASK_FUNCTION( vCompetingMathTask3, pvParameters )\r
{\r
volatile portFLOAT *pfArray, fTotal1, fTotal2, fDifference;\r
-volatile unsigned portSHORT *pusTaskCheckVariable;\r
+volatile unsigned short *pusTaskCheckVariable;\r
const size_t xArraySize = 10;\r
size_t xPosition;\r
-portSHORT sError = pdFALSE;\r
+short sError = pdFALSE;\r
\r
/* The variable this task increments to show it is still running is passed in \r
as the parameter. */\r
- pusTaskCheckVariable = ( unsigned portSHORT * ) pvParameters;\r
+ pusTaskCheckVariable = ( unsigned short * ) pvParameters;\r
\r
pfArray = ( portFLOAT * ) pvPortMalloc( xArraySize * sizeof( portFLOAT ) );\r
\r
static portTASK_FUNCTION( vCompetingMathTask4, pvParameters )\r
{\r
volatile portFLOAT *pfArray, fTotal1, fTotal2, fDifference;\r
-volatile unsigned portSHORT *pusTaskCheckVariable;\r
+volatile unsigned short *pusTaskCheckVariable;\r
const size_t xArraySize = 10;\r
size_t xPosition;\r
-portSHORT sError = pdFALSE;\r
+short sError = pdFALSE;\r
\r
/* The variable this task increments to show it is still running is passed in \r
as the parameter. */\r
- pusTaskCheckVariable = ( unsigned portSHORT * ) pvParameters;\r
+ pusTaskCheckVariable = ( unsigned short * ) pvParameters;\r
\r
pfArray = ( portFLOAT * ) pvPortMalloc( xArraySize * sizeof( portFLOAT ) );\r
\r
{\r
/* Keep a history of the check variables so we know if they have been incremented \r
since the last call. */\r
-static unsigned portSHORT usLastTaskCheck[ mathNUMBER_OF_TASKS ] = { ( unsigned portSHORT ) 0 };\r
+static unsigned short usLastTaskCheck[ mathNUMBER_OF_TASKS ] = { ( unsigned short ) 0 };\r
portBASE_TYPE xReturn = pdTRUE, xTask;\r
\r
/* Check the maths tasks are still running by ensuring their check variables \r
static volatile unsigned portBASE_TYPE xRegTestStatus = pdPASS;\r
\r
/* Counters used to ensure the regtest tasks are still running. */\r
-static volatile unsigned portLONG ulRegTest1Counter = 0UL, ulRegTest2Counter = 0UL;\r
+static volatile unsigned long ulRegTest1Counter = 0UL, ulRegTest2Counter = 0UL;\r
\r
/*-----------------------------------------------------------*/\r
\r
static portBASE_TYPE prvCheckOtherTasksAreStillRunning( void )\r
{\r
portBASE_TYPE lReturn = pdPASS;\r
-static unsigned portLONG ulLastRegTest1Counter= 0UL, ulLastRegTest2Counter = 0UL;\r
+static unsigned long ulLastRegTest1Counter= 0UL, ulLastRegTest2Counter = 0UL;\r
\r
/* The demo tasks maintain a count that increments every cycle of the task\r
provided that the task has never encountered an error. This function \r
/* This hook function will get called if there is a suspected stack overflow.\r
An overflow can cause the task name to be corrupted, in which case the task\r
handle needs to be used to determine the offending task. */\r
-void vApplicationStackOverflowHook( xTaskHandle xTask, signed portCHAR *pcTaskName );\r
-void vApplicationStackOverflowHook( xTaskHandle xTask, signed portCHAR *pcTaskName )\r
+void vApplicationStackOverflowHook( xTaskHandle xTask, signed char *pcTaskName );\r
+void vApplicationStackOverflowHook( xTaskHandle xTask, signed char *pcTaskName )\r
{\r
/* To prevent the optimiser removing the variables. */\r
volatile xTaskHandle xTaskIn = xTask;\r
-volatile signed portCHAR *pcTaskNameIn = pcTaskName;\r
+volatile signed char *pcTaskNameIn = pcTaskName;\r
\r
/* Remove compiler warnings. */\r
( void ) xTaskIn;\r
\r
/*-----------------------------------------------------------*/\r
\r
-xComPortHandle xSerialPortInitMinimal( unsigned portLONG ulWantedBaud, unsigned portBASE_TYPE uxQueueLength )\r
+xComPortHandle xSerialPortInitMinimal( unsigned long ulWantedBaud, unsigned portBASE_TYPE uxQueueLength )\r
{\r
/* NOTE: The baud rate used by this driver is determined by the hardware\r
parameterization of the UART Lite peripheral, and the baud value passed to\r
( void ) ulWantedBaud;\r
\r
/* Create the queues used to hold Rx and Tx characters. */\r
- xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed portCHAR ) );\r
- xCharsForTx = xQueueCreate( uxQueueLength + 1, ( unsigned portBASE_TYPE ) sizeof( signed portCHAR ) );\r
+ xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed char ) );\r
+ xCharsForTx = xQueueCreate( uxQueueLength + 1, ( unsigned portBASE_TYPE ) sizeof( signed char ) );\r
\r
/* Only initialise the UART if the queues were created correctly. */\r
if( ( xRxedChars != NULL ) && ( xCharsForTx != NULL ) )\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed portCHAR *pcRxedChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime )\r
{\r
/* The port handle is not required as this driver only supports one UART. */\r
( void ) pxPort;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed portCHAR cOutChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime )\r
{\r
portBASE_TYPE xReturn = pdTRUE;\r
\r
\r
static void vSerialISR( XUartLite *pxUART )\r
{\r
-unsigned portLONG ulISRStatus;\r
+unsigned long ulISRStatus;\r
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE, lDidSomething;\r
-portCHAR cChar;\r
+char cChar;\r
\r
/* Just to remove compiler warning. */\r
( void ) pxUART;\r
/* A character is available - place it in the queue of received\r
characters. This might wake a task that was blocked waiting for \r
data. */\r
- cChar = ( portCHAR ) XIo_In32( XPAR_RS232_UART_BASEADDR + XUL_RX_FIFO_OFFSET );\r
+ cChar = ( char ) XIo_In32( XPAR_RS232_UART_BASEADDR + XUL_RX_FIFO_OFFSET );\r
xQueueSendFromISR( xRxedChars, &cChar, &xHigherPriorityTaskWoken );\r
lDidSomething = pdTRUE;\r
}\r
/* Used to hide the implementation of the co-routine control block. The\r
control block structure however has to be included in the header due to\r
the macro implementation of the co-routine functionality. */\r
-typedef void * xCoRoutineHandle;\r
+typedef void * CoRoutineHandle_t;\r
\r
/* Defines the prototype to which co-routine functions must conform. */\r
-typedef void (*crCOROUTINE_CODE)( xCoRoutineHandle, unsigned portBASE_TYPE );\r
+typedef void (*crCOROUTINE_CODE)( CoRoutineHandle_t, unsigned portBASE_TYPE );\r
\r
typedef struct corCoRoutineControlBlock\r
{\r
unsigned portBASE_TYPE uxPriority; /*< The priority of the co-routine in relation to other co-routines. */\r
unsigned portBASE_TYPE uxIndex; /*< Used to distinguish between co-routines when multiple co-routines use the same co-routine function. */\r
unsigned short uxState; /*< Used internally by the co-routine implementation. */\r
-} corCRCB; /* Co-routine control block. Note must be identical in size down to uxPriority with tskTCB. */\r
+} CRCB_t; /* Co-routine control block. Note must be identical in size down to uxPriority with tskTCB. */\r
\r
/**\r
* croutine. h\r
* Example usage:\r
<pre>\r
// Co-routine to be created.\r
- void vFlashCoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex )\r
+ void vFlashCoRoutine( CoRoutineHandle_t xHandle, unsigned portBASE_TYPE uxIndex )\r
{\r
// Variables in co-routines must be declared static if they must maintain value across a blocking call.\r
// This may not be necessary for const variables.\r
/**\r
* croutine. h\r
* <pre>\r
- crSTART( xCoRoutineHandle xHandle );</pre>\r
+ crSTART( CoRoutineHandle_t xHandle );</pre>\r
*\r
* This macro MUST always be called at the start of a co-routine function.\r
*\r
* Example usage:\r
<pre>\r
// Co-routine to be created.\r
- void vACoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex )\r
+ void vACoRoutine( CoRoutineHandle_t xHandle, unsigned portBASE_TYPE uxIndex )\r
{\r
// Variables in co-routines must be declared static if they must maintain value across a blocking call.\r
static long ulAVariable;\r
* \defgroup crSTART crSTART\r
* \ingroup Tasks\r
*/\r
-#define crSTART( pxCRCB ) switch( ( ( corCRCB * )( pxCRCB ) )->uxState ) { case 0:\r
+#define crSTART( pxCRCB ) switch( ( ( CRCB_t * )( pxCRCB ) )->uxState ) { case 0:\r
\r
/**\r
* croutine. h\r
* Example usage:\r
<pre>\r
// Co-routine to be created.\r
- void vACoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex )\r
+ void vACoRoutine( CoRoutineHandle_t xHandle, unsigned portBASE_TYPE uxIndex )\r
{\r
// Variables in co-routines must be declared static if they must maintain value across a blocking call.\r
static long ulAVariable;\r
* These macros are intended for internal use by the co-routine implementation\r
* only. The macros should not be used directly by application writers.\r
*/\r
-#define crSET_STATE0( xHandle ) ( ( corCRCB * )( xHandle ) )->uxState = (__LINE__ * 2); return; case (__LINE__ * 2):\r
-#define crSET_STATE1( xHandle ) ( ( corCRCB * )( xHandle ) )->uxState = ((__LINE__ * 2)+1); return; case ((__LINE__ * 2)+1):\r
+#define crSET_STATE0( xHandle ) ( ( CRCB_t * )( xHandle ) )->uxState = (__LINE__ * 2); return; case (__LINE__ * 2):\r
+#define crSET_STATE1( xHandle ) ( ( CRCB_t * )( xHandle ) )->uxState = ((__LINE__ * 2)+1); return; case ((__LINE__ * 2)+1):\r
\r
/**\r
* croutine. h\r
*<pre>\r
- crDELAY( xCoRoutineHandle xHandle, portTickType xTicksToDelay );</pre>\r
+ crDELAY( CoRoutineHandle_t xHandle, portTickType xTicksToDelay );</pre>\r
*\r
* Delay a co-routine for a fixed period of time.\r
*\r
* Example usage:\r
<pre>\r
// Co-routine to be created.\r
- void vACoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex )\r
+ void vACoRoutine( CoRoutineHandle_t xHandle, unsigned portBASE_TYPE uxIndex )\r
{\r
// Variables in co-routines must be declared static if they must maintain value across a blocking call.\r
// This may not be necessary for const variables.\r
/**\r
* <pre>\r
crQUEUE_SEND(\r
- xCoRoutineHandle xHandle,\r
+ CoRoutineHandle_t xHandle,\r
xQueueHandle pxQueue,\r
void *pvItemToQueue,\r
portTickType xTicksToWait,\r
<pre>\r
// Co-routine function that blocks for a fixed period then posts a number onto\r
// a queue.\r
- static void prvCoRoutineFlashTask( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex )\r
+ static void prvCoRoutineFlashTask( CoRoutineHandle_t xHandle, unsigned portBASE_TYPE uxIndex )\r
{\r
// Variables in co-routines must be declared static if they must maintain value across a blocking call.\r
static portBASE_TYPE xNumberToPost = 0;\r
* croutine. h\r
* <pre>\r
crQUEUE_RECEIVE(\r
- xCoRoutineHandle xHandle,\r
+ CoRoutineHandle_t xHandle,\r
xQueueHandle pxQueue,\r
void *pvBuffer,\r
portTickType xTicksToWait,\r
<pre>\r
// A co-routine receives the number of an LED to flash from a queue. It\r
// blocks on the queue until the number is received.\r
- static void prvCoRoutineFlashWorkTask( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex )\r
+ static void prvCoRoutineFlashWorkTask( CoRoutineHandle_t xHandle, unsigned portBASE_TYPE uxIndex )\r
{\r
// Variables in co-routines must be declared static if they must maintain value across a blocking call.\r
static portBASE_TYPE xResult;\r
* Example usage:\r
<pre>\r
// A co-routine that blocks on a queue waiting for characters to be received.\r
- static void vReceivingCoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex )\r
+ static void vReceivingCoRoutine( CoRoutineHandle_t xHandle, unsigned portBASE_TYPE uxIndex )\r
{\r
char cRxedChar;\r
portBASE_TYPE xResult;\r
<pre>\r
// A co-routine that posts a character to a queue then blocks for a fixed\r
// period. The character is incremented each time.\r
- static void vSendingCoRoutine( xCoRoutineHandle xHandle, unsigned portBASE_TYPE uxIndex )\r
+ static void vSendingCoRoutine( CoRoutineHandle_t xHandle, unsigned portBASE_TYPE uxIndex )\r
{\r
// cChar holds its value while this co-routine is blocked and must therefore\r
// be declared static.\r
/*-----------------------------------------------------------*/\r
\r
/* Critical section control macros. */\r
-#define portNO_CRITICAL_SECTION_NESTING ( ( unsigned portSHORT ) 0 )\r
+#define portNO_CRITICAL_SECTION_NESTING ( ( unsigned short ) 0 )\r
\r
#define portENTER_CRITICAL() \\r
{ \\r
\r
int __low_level_init(void)\r
{\r
-unsigned portCHAR ucResetFlag = RESF;\r
+unsigned char ucResetFlag = RESF;\r
\r
portDISABLE_INTERRUPTS();\r
\r
/*\r
* Move to the first (0) or second (1) row of the LCD.\r
*/\r
-static void prvLCDGotoRow( unsigned portSHORT usRow );\r
+static void prvLCDGotoRow( unsigned short usRow );\r
\r
/*\r
* Write a string of text to the LCD.\r
*/\r
-static void prvLCDPutString( portCHAR *pcString );\r
+static void prvLCDPutString( char *pcString );\r
\r
/*\r
* Clear the LCD.\r
/* The queue used to send messages to the LCD task. */\r
xQueueHandle xLCDQueue;\r
\r
-static void prvLCDCommand( portCHAR cCommand );\r
-static void prvLCDData( portCHAR cChar );\r
+static void prvLCDCommand( char cCommand );\r
+static void prvLCDData( char cChar );\r
\r
/*-----------------------------------------------------------*/\r
\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void prvLCDGotoRow( unsigned portSHORT usRow )\r
+static void prvLCDGotoRow( unsigned short usRow )\r
{\r
if( usRow == 0 )\r
{\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void prvLCDCommand( portCHAR cCommand )\r
+static void prvLCDCommand( char cCommand )\r
{\r
/* Prepare RD0 - RD7. */\r
lcdDATA &= 0xFF00;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void prvLCDData( portCHAR cChar )\r
+static void prvLCDData( char cChar )\r
{\r
/* ensure lcdRW is 0. */\r
lcdRW = 0;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static void prvLCDPutString( portCHAR *pcString )\r
+static void prvLCDPutString( char *pcString )\r
{\r
/* Write out each character with appropriate delay between each. */\r
while( *pcString )\r
static void vLCDTask( void *pvParameters )\r
{\r
xLCDMessage xMessage;\r
-unsigned portSHORT usRow = 0;\r
+unsigned short usRow = 0;\r
\r
/* Initialise the hardware. This uses delays so must not be called prior\r
to the scheduler being started. */\r
\r
/* The maximum time (in processor clocks) between two consecutive timer\r
interrupts so far. */\r
-unsigned portSHORT usMaxJitter = 0;\r
+unsigned short usMaxJitter = 0;\r
\r
/*-----------------------------------------------------------*/\r
\r
-void vSetupTimerTest( unsigned portSHORT usFrequencyHz )\r
+void vSetupTimerTest( unsigned short usFrequencyHz )\r
{\r
/* T2 is used to generate interrupts. T4 is used to provide an accurate\r
time measurement. */\r
TMR4 = 0;\r
\r
/* Timer 2 is going to interrupt at usFrequencyHz Hz. */\r
- PR2 = ( unsigned portSHORT ) ( configCPU_CLOCK_HZ / ( unsigned portLONG ) usFrequencyHz );\r
+ PR2 = ( unsigned short ) ( configCPU_CLOCK_HZ / ( unsigned long ) usFrequencyHz );\r
\r
/* Timer 4 is going to free run from minimum to maximum value. */\r
- PR4 = ( unsigned portSHORT ) timerMAX_COUNT;\r
+ PR4 = ( unsigned short ) timerMAX_COUNT;\r
\r
/* Setup timer 2 interrupt priority to be above the kernel priority so \r
the timer jitter is not effected by the kernel activity. */\r
\r
static void prvCalculateAndStoreJitter( void )\r
{\r
-static unsigned portSHORT usLastCount = 0, usSettleCount = 0;\r
-unsigned portSHORT usThisCount, usDifference;\r
+static unsigned short usLastCount = 0, usSettleCount = 0;\r
+unsigned short usThisCount, usDifference;\r
\r
/* Capture the timer value as we enter the interrupt. */\r
usThisCount = TMR4;\r
\r
//! Server address\r
#error configure SMTP server address\r
-portCHAR cServer[] = "192.168.0.1";\r
+char cServer[] = "192.168.0.1";\r
\r
//! Fill here the mailfrom with your mail address\r
#error configure SMTP mail sender\r
Bool bSendMail = pdFALSE;\r
\r
//! buffer for SMTP response\r
-portCHAR cTempBuffer[200];\r
+char cTempBuffer[200];\r
\r
\r
//_____ D E C L A R A T I O N S ____________________________________________\r
portTASK_FUNCTION( vBasicSMTPClient, pvParameters )\r
{\r
struct sockaddr_in stServeurSockAddr; \r
- portLONG lRetval;\r
- portLONG lSocket = -1;\r
+ long lRetval;\r
+ long lSocket = -1;\r
\r
// configure push button 0 to produce IT on falling edge\r
gpio_enable_pin_interrupt(GPIO_PUSH_BUTTON_0 , GPIO_FALLING_EDGE);\r
}\r
}\r
\r
-portCHAR cRamBuffer[2048];\r
+char cRamBuffer[2048];\r
int lCurrentBlock = 0;\r
int lTotalLength = 0;\r
\r
return (5);\r
}\r
\r
-int tftpd_read_data_file(int fd, portCHAR * buffer, int length)\r
+int tftpd_read_data_file(int fd, char * buffer, int length)\r
{\r
int lReturnValue;\r
\r
//\r
// callback to store data to the RAM buffer\r
//\r
-int tftpd_write_data_file(int fd, portCHAR * buffer, int length)\r
+int tftpd_write_data_file(int fd, char * buffer, int length)\r
{\r
lTotalLength += length;\r
memcpy(&cRamBuffer[lCurrentBlock * SEGSIZE], buffer, length);\r
int lSocket;\r
int lDataLen, lRecvLen, lFromLen;\r
struct sockaddr_in sLocalAddr, sFromAddr;\r
- portCHAR cData[SEGSIZE+sizeof(struct tftphdr)];\r
+ char cData[SEGSIZE+sizeof(struct tftphdr)];\r
struct tftphdr *sHdr = (struct tftphdr *)cData;\r
\r
// Set up port\r
\r\n</font></BODY>\\r
</html>"\r
\r
-portCHAR cDynamicPage[ webMAX_PAGE_SIZE ];\r
-portCHAR cPageHits[ 11 ];\r
+char cDynamicPage[ webMAX_PAGE_SIZE ];\r
+char cPageHits[ 11 ];\r
\r
\r
/*! Function to process the current connection */\r
static void prvweb_ParseHTMLRequest( struct netconn *pxNetCon )\r
{\r
struct netbuf *pxRxBuffer;\r
-portCHAR *pcRxString;\r
-unsigned portSHORT usLength;\r
-static unsigned portLONG ulPageHits = 0;\r
+char *pcRxString;\r
+unsigned short usLength;\r
+static unsigned long ulPageHits = 0;\r
\r
/* We expect to immediately get data. */\r
pxRxBuffer = netconn_recv( pxNetCon );\r
{\r
struct ip_addr xIpAddr, xNetMask, xGateway;\r
extern err_t ethernetif_init( struct netif *netif );\r
-portCHAR MacAddress[6];\r
+char MacAddress[6];\r
\r
/* Default MAC addr. */\r
MacAddress[0] = ETHERNET_CONF_ETHADDR0;\r
\r
/* Message queue constants. */\r
#define archMESG_QUEUE_LENGTH ( 6 )\r
-#define archPOST_BLOCK_TIME_MS ( ( unsigned portLONG ) 10000 )\r
+#define archPOST_BLOCK_TIME_MS ( ( unsigned long ) 10000 )\r
\r
struct timeoutlist\r
{\r
* Simple parallel port IO routines.\r
*-----------------------------------------------------------*/\r
\r
-#define partstALL_OUTPUTS_OFF ( ( unsigned portCHAR ) 0x00 )\r
-#define partstMAX_OUTPUT_LED ( ( unsigned portCHAR ) 8 )\r
+#define partstALL_OUTPUTS_OFF ( ( unsigned char ) 0x00 )\r
+#define partstMAX_OUTPUT_LED ( ( unsigned char ) 8 )\r
\r
-static volatile unsigned portCHAR ucCurrentOutputValue = partstALL_OUTPUTS_OFF; /*lint !e956 File scope parameters okay here. */\r
+static volatile unsigned char ucCurrentOutputValue = partstALL_OUTPUTS_OFF; /*lint !e956 File scope parameters okay here. */\r
\r
/*-----------------------------------------------------------*/\r
\r
\r
void vParTestSetLED( unsigned portBASE_TYPE uxLED, signed portBASE_TYPE xValue )\r
{\r
-unsigned portCHAR ucBit;\r
+unsigned char ucBit;\r
\r
if( uxLED >= partstMAX_OUTPUT_LED )\r
{\r
return;\r
}\r
\r
- ucBit = ( ( unsigned portCHAR ) 1 ) << uxLED;\r
+ ucBit = ( ( unsigned char ) 1 ) << uxLED;\r
\r
vTaskSuspendAll();\r
{\r
\r
void vParTestToggleLED( unsigned portBASE_TYPE uxLED )\r
{\r
- unsigned portCHAR ucBit;\r
+ unsigned char ucBit;\r
\r
if( uxLED >= partstMAX_OUTPUT_LED )\r
{\r
return;\r
}\r
\r
- ucBit = ( ( unsigned portCHAR ) 1 ) << uxLED;\r
+ ucBit = ( ( unsigned char ) 1 ) << uxLED;\r
\r
vTaskSuspendAll();\r
{\r
static portBASE_TYPE prvUSART0_ISR_NonNakedBehaviour( void )\r
{\r
/* Now we can declare the local variables. */\r
- signed portCHAR cChar;\r
+ signed char cChar;\r
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;\r
- unsigned portLONG ulStatus;\r
+ unsigned long ulStatus;\r
volatile avr32_usart_t *usart0 = &AVR32_USART0;\r
portBASE_TYPE retstatus;\r
\r
/*\r
* Init the serial port for the Minimal implementation.\r
*/\r
-xComPortHandle xSerialPortInitMinimal( unsigned portLONG ulWantedBaud, unsigned portBASE_TYPE uxQueueLength )\r
+xComPortHandle xSerialPortInitMinimal( unsigned long ulWantedBaud, unsigned portBASE_TYPE uxQueueLength )\r
{\r
static const gpio_map_t USART0_GPIO_MAP =\r
{\r
/* Configure USART0. */\r
if( ( xRxedChars != serINVALID_QUEUE ) &&\r
( xCharsForTx != serINVALID_QUEUE ) &&\r
- ( ulWantedBaud != ( unsigned portLONG ) 0 ) )\r
+ ( ulWantedBaud != ( unsigned long ) 0 ) )\r
{\r
portENTER_CRITICAL();\r
{\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed portCHAR *pcRxedChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime )\r
{\r
/* The port handle is not required as this driver only supports UART0. */\r
( void ) pxPort;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-void vSerialPutString( xComPortHandle pxPort, const signed portCHAR * const pcString, unsigned portSHORT usStringLength )\r
+void vSerialPutString( xComPortHandle pxPort, const signed char * const pcString, unsigned short usStringLength )\r
{\r
-signed portCHAR *pxNext;\r
+signed char *pxNext;\r
\r
/* NOTE: This implementation does not handle the queue being full as no\r
block time is used! */\r
( void ) pxPort;\r
\r
/* Send each character in the string, one at a time. */\r
- pxNext = ( signed portCHAR * ) pcString;\r
+ pxNext = ( signed char * ) pcString;\r
while( *pxNext )\r
{\r
xSerialPutChar( pxPort, *pxNext, serNO_BLOCK );\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed portCHAR cOutChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime )\r
{\r
volatile avr32_usart_t *usart0 = &AVR32_USART0;\r
\r
static void vprvSerialCreateQueues( unsigned portBASE_TYPE uxQueueLength, xQueueHandle *pxRxedChars, xQueueHandle *pxCharsForTx )\r
{\r
/* Create the queues used to hold Rx and Tx characters. */\r
- xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed portCHAR ) );\r
- xCharsForTx = xQueueCreate( uxQueueLength + 1, ( unsigned portBASE_TYPE ) sizeof( signed portCHAR ) );\r
+ xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed char ) );\r
+ xCharsForTx = xQueueCreate( uxQueueLength + 1, ( unsigned portBASE_TYPE ) sizeof( signed char ) );\r
\r
/* Pass back a reference to the queues so the serial API file can\r
post/receive characters. */\r
#define mainETH_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 )\r
\r
/* Baud rate used by the serial port tasks. */\r
-#define mainCOM_BAUD_RATE ( ( unsigned portLONG ) 57600 )\r
-#define mainCOM_BUFFER_LEN ( ( unsigned portLONG ) 70 )\r
+#define mainCOM_BAUD_RATE ( ( unsigned long ) 57600 )\r
+#define mainCOM_BUFFER_LEN ( ( unsigned long ) 70 )\r
\r
/* An address in the internal Flash used to count resets. This is used to check that\r
the demo application is not unexpectedly resetting. */\r
\r
/* Constants required to access the "LED's". The LED segments are turned on\r
and off to generate '*' characters. */\r
-#define partstNUM_LEDS ( ( unsigned portCHAR ) 6 )\r
-#define partstSEGMENTS_ON ( ( unsigned portCHAR ) 0x0f )\r
-#define partstSEGMENTS_OFF ( ( unsigned portCHAR ) 0x00 )\r
+#define partstNUM_LEDS ( ( unsigned char ) 6 )\r
+#define partstSEGMENTS_ON ( ( unsigned char ) 0x0f )\r
+#define partstSEGMENTS_OFF ( ( unsigned char ) 0x00 )\r
\r
/* The LED number of the real on board LED, rather than a simulated LED. */\r
#define partstON_BOARD_LED ( ( unsigned portBASE_TYPE ) 10 )\r
-#define mainON_BOARD_LED_BIT ( ( unsigned portCHAR ) 0x01 )\r
+#define mainON_BOARD_LED_BIT ( ( unsigned char ) 0x01 )\r
\r
/* The LCD segments used to generate the '*' characters for LED's 0 to 5. */\r
-unsigned portCHAR * const ucRHSSegments[ partstNUM_LEDS ] = { ( unsigned portCHAR * )0xa4, \r
- ( unsigned portCHAR * )0xa2, \r
- ( unsigned portCHAR * )0xa0, \r
- ( unsigned portCHAR * )0x9e,\r
- ( unsigned portCHAR * )0x9c,\r
- ( unsigned portCHAR * )0x9a };\r
-\r
-unsigned portCHAR * const ucLHSSegments[ partstNUM_LEDS ] = { ( unsigned portCHAR * )0xa3, \r
- ( unsigned portCHAR * )0xa1, \r
- ( unsigned portCHAR * )0x9f, \r
- ( unsigned portCHAR * )0x9d,\r
- ( unsigned portCHAR * )0x9b,\r
- ( unsigned portCHAR * )0x99 };\r
+unsigned char * const ucRHSSegments[ partstNUM_LEDS ] = { ( unsigned char * )0xa4, \r
+ ( unsigned char * )0xa2, \r
+ ( unsigned char * )0xa0, \r
+ ( unsigned char * )0x9e,\r
+ ( unsigned char * )0x9c,\r
+ ( unsigned char * )0x9a };\r
+\r
+unsigned char * const ucLHSSegments[ partstNUM_LEDS ] = { ( unsigned char * )0xa3, \r
+ ( unsigned char * )0xa1, \r
+ ( unsigned char * )0x9f, \r
+ ( unsigned char * )0x9d,\r
+ ( unsigned char * )0x9b,\r
+ ( unsigned char * )0x99 };\r
\r
/*\r
* Toggle the single genuine built in LED.\r
\r
static void prvToggleOnBoardLED( void )\r
{\r
-static unsigned portSHORT sState = pdFALSE;\r
+static unsigned short sState = pdFALSE;\r
\r
/* Toggle the state of the single genuine on board LED. */\r
if( sState ) \r
#include "PollQ.h"\r
\r
/* Constants required for hardware setup. */\r
-#define mainALL_BITS_OUTPUT ( ( unsigned portCHAR ) 0xff )\r
-#define mainMAX_FREQUENCY ( ( unsigned portCHAR ) 121 )\r
+#define mainALL_BITS_OUTPUT ( ( unsigned char ) 0xff )\r
+#define mainMAX_FREQUENCY ( ( unsigned char ) 121 )\r
\r
/* Constants that define the LED's used by the various tasks. [in this case\r
the '*' characters on the LCD represent LED's] */\r
#define mainLED_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 )\r
\r
/* Baud rate used by the COM test tasks. */\r
-#define mainCOM_TEST_BAUD_RATE ( ( unsigned portLONG ) 19200 )\r
+#define mainCOM_TEST_BAUD_RATE ( ( unsigned long ) 19200 )\r
\r
/* The frequency at which the 'Check' tasks executes. See the comments at the\r
top of the page. When the system is operating error free the 'Check' task\r
#define mainERROR_CHECK_DELAY ( ( portTickType ) 500 / portTICK_RATE_MS )\r
\r
/* The constants used in the calculation. */\r
-#define intgCONST1 ( ( portLONG ) 123 )\r
-#define intgCONST2 ( ( portLONG ) 234567 )\r
-#define intgCONST3 ( ( portLONG ) -3 )\r
-#define intgCONST4 ( ( portLONG ) 7 )\r
+#define intgCONST1 ( ( long ) 123 )\r
+#define intgCONST2 ( ( long ) 234567 )\r
+#define intgCONST3 ( ( long ) -3 )\r
+#define intgCONST4 ( ( long ) 7 )\r
#define intgEXPECTED_ANSWER ( ( ( intgCONST1 + intgCONST2 ) * intgCONST3 ) / intgCONST4 )\r
\r
/*\r
* Called by the Check task. Returns pdPASS if all the other tasks are found\r
* to be operating without error - otherwise returns pdFAIL.\r
*/\r
-static portSHORT prvCheckOtherTasksAreStillRunning( void );\r
+static short prvCheckOtherTasksAreStillRunning( void );\r
\r
/*\r
* Perform the hardware setup required by the ES449 in order to run the demo\r
\r
\r
portBASE_TYPE xLocalError = pdFALSE;\r
-volatile unsigned portLONG ulIdleLoops = 0UL;\r
+volatile unsigned long ulIdleLoops = 0UL;\r
\r
/*-----------------------------------------------------------*/\r
\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static portSHORT prvCheckOtherTasksAreStillRunning( void )\r
+static short prvCheckOtherTasksAreStillRunning( void )\r
{\r
-static portSHORT sNoErrorFound = pdTRUE;\r
-static unsigned portLONG ulLastIdleLoopCount = 0UL;\r
+static short sNoErrorFound = pdTRUE;\r
+static unsigned long ulLastIdleLoopCount = 0UL;\r
\r
/* The demo tasks maintain a count that increments every cycle of the task\r
provided that the task has never encountered an error. This function\r
{\r
/* These variables are all effectively set to constants so they are volatile to\r
ensure the compiler does not just get rid of them. */\r
-volatile portLONG lValue;\r
+volatile long lValue;\r
\r
/* Keep performing a calculation and checking the result against a constant. */\r
for( ;; )\r
#include "serial.h"\r
\r
/* Constants required to setup the hardware. */\r
-#define serTX_AND_RX ( ( unsigned portCHAR ) 0x03 )\r
+#define serTX_AND_RX ( ( unsigned char ) 0x03 )\r
\r
/* Misc. constants. */\r
#define serNO_BLOCK ( ( portTickType ) 0 )\r
/* The queue used to hold characters waiting transmission. */\r
static xQueueHandle xCharsForTx;\r
\r
-static volatile portSHORT sTHREEmpty;\r
+static volatile short sTHREEmpty;\r
\r
/*-----------------------------------------------------------*/\r
\r
-xComPortHandle xSerialPortInitMinimal( unsigned portLONG ulWantedBaud, unsigned portBASE_TYPE uxQueueLength )\r
+xComPortHandle xSerialPortInitMinimal( unsigned long ulWantedBaud, unsigned portBASE_TYPE uxQueueLength )\r
{\r
-unsigned portLONG ulBaudRateCount;\r
+unsigned long ulBaudRateCount;\r
\r
/* Initialise the hardware. */\r
\r
portENTER_CRITICAL();\r
{\r
/* Create the queues used by the com test task. */\r
- xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed portCHAR ) );\r
- xCharsForTx = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed portCHAR ) );\r
+ xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed char ) );\r
+ xCharsForTx = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed char ) );\r
\r
/* Reset UART. */\r
UCTL1 |= SWRST;\r
U1TCTL |= SSEL1;\r
\r
/* Setup baud rate low byte. */\r
- U1BR0 = ( unsigned portCHAR ) ( ulBaudRateCount & ( unsigned portLONG ) 0xff );\r
+ U1BR0 = ( unsigned char ) ( ulBaudRateCount & ( unsigned long ) 0xff );\r
\r
/* Setup baud rate high byte. */\r
ulBaudRateCount >>= 8UL;\r
- U1BR1 = ( unsigned portCHAR ) ( ulBaudRateCount & ( unsigned portLONG ) 0xff );\r
+ U1BR1 = ( unsigned char ) ( ulBaudRateCount & ( unsigned long ) 0xff );\r
\r
/* Enable ports. */\r
ME2 |= UTXE1 + URXE1;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed portCHAR *pcRxedChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime )\r
{\r
/* Get the next character from the buffer. Return false if no characters\r
are available, or arrive before xBlockTime expires. */\r
}\r
/*-----------------------------------------------------------*/\r
\r
-signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed portCHAR cOutChar, portTickType xBlockTime )\r
+signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime )\r
{\r
signed portBASE_TYPE xReturn;\r
\r
#pragma vector=UART1RX_VECTOR\r
__interrupt void vRxISR( void )\r
{\r
- signed portCHAR cChar;\r
+ signed char cChar;\r
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;\r
\r
/* Get the character from the UART and post it on the queue of Rxed\r
#pragma vector=UART1TX_VECTOR\r
__interrupt void vTxISR( void )\r
{\r
- signed portCHAR cChar;\r
+ signed char cChar;\r
portBASE_TYPE xTaskWoken = pdFALSE;\r
\r
/* The previous character has been transmitted. See if there are any\r
interrupt entry point. */\r
void vRxISR( void )\r
{\r
- signed portCHAR cChar;\r
+ signed char cChar;\r
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;\r
\r
/* Get the character from the UART and post it on the queue of Rxed\r
interrupt entry point. */\r
void vTxISR( void )\r
{\r
- signed portCHAR cChar;\r
+ signed char cChar;\r
portBASE_TYPE xTaskWoken = pdFALSE;\r
\r
/* The previous character has been transmitted. See if there are any\r