From b9ef8e51fbe8dc63856e18f30a0129b09b52083a Mon Sep 17 00:00:00 2001 From: richardbarry Date: Sun, 27 Mar 2011 18:51:55 +0000 Subject: [PATCH] Replace portLONG with long, portCHAR with char, and portSHORT with short. git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@1334 1d2547de-c912-0410-9cb9-b8ca96c0e9e2 --- Demo/PIC32MX_MPLAB/IntQueueTimer.c | 4 ++-- Demo/PIC32MX_MPLAB/lcd.c | 20 ++++++++++---------- Demo/PIC32MX_MPLAB/main.c | 14 +++++++------- Demo/PIC32MX_MPLAB/timertest.c | 12 ++++++------ 4 files changed, 25 insertions(+), 25 deletions(-) diff --git a/Demo/PIC32MX_MPLAB/IntQueueTimer.c b/Demo/PIC32MX_MPLAB/IntQueueTimer.c index 15b40d0bd..481094997 100644 --- a/Demo/PIC32MX_MPLAB/IntQueueTimer.c +++ b/Demo/PIC32MX_MPLAB/IntQueueTimer.c @@ -74,7 +74,7 @@ void vInitialiseTimerForIntQueueTest( void ) T3CON = 0; TMR3 = 0; - PR3 = ( unsigned portSHORT ) ( configPERIPHERAL_CLOCK_HZ / timerINTERRUPT3_FREQUENCY ); + PR3 = ( unsigned short ) ( configPERIPHERAL_CLOCK_HZ / timerINTERRUPT3_FREQUENCY ); /* Setup timer 3 interrupt priority to be above the kernel priority. */ ConfigIntTimer3( T3_INT_ON | ( configMAX_SYSCALL_INTERRUPT_PRIORITY - 1 ) ); @@ -92,7 +92,7 @@ void vInitialiseTimerForIntQueueTest( void ) /* Do the same for timer 4. */ T4CON = 0; TMR4 = 0; - PR4 = ( unsigned portSHORT ) ( configPERIPHERAL_CLOCK_HZ / timerINTERRUPT4_FREQUENCY ); + PR4 = ( unsigned short ) ( configPERIPHERAL_CLOCK_HZ / timerINTERRUPT4_FREQUENCY ); /* Setup timer 4 interrupt priority to be above the kernel priority. */ ConfigIntTimer4( T4_INT_ON | ( configMAX_SYSCALL_INTERRUPT_PRIORITY ) ); diff --git a/Demo/PIC32MX_MPLAB/lcd.c b/Demo/PIC32MX_MPLAB/lcd.c index 3b250eb03..d8b60938e 100644 --- a/Demo/PIC32MX_MPLAB/lcd.c +++ b/Demo/PIC32MX_MPLAB/lcd.c @@ -78,12 +78,12 @@ static void prvSetupLCD( void ); /* * Move to the first (0) or second (1) row of the LCD. */ -static void prvLCDGotoRow( unsigned portSHORT usRow ); +static void prvLCDGotoRow( unsigned short usRow ); /* * Write a string of text to the LCD. */ -static void prvLCDPutString( portCHAR *pcString ); +static void prvLCDPutString( char *pcString ); /* * Clear the LCD. @@ -121,8 +121,8 @@ static void prvLCDClear( void ); xQueueHandle xLCDQueue; /* LCD access functions. */ -static void prvLCDCommand( portCHAR cCommand ); -static void prvLCDData( portCHAR cChar ); +static void prvLCDCommand( char cCommand ); +static void prvLCDData( char cChar ); /*-----------------------------------------------------------*/ @@ -134,13 +134,13 @@ xQueueHandle xStartLCDTask( void ) /* Start the task that will write to the LCD. The LCD hardware is initialised from within the task itself so delays can be used. */ - xTaskCreate( vLCDTask, ( signed portCHAR * ) "LCD", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY + 1, NULL ); + xTaskCreate( vLCDTask, ( signed char * ) "LCD", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY + 1, NULL ); return xLCDQueue; } /*-----------------------------------------------------------*/ -static void prvLCDGotoRow( unsigned portSHORT usRow ) +static void prvLCDGotoRow( unsigned short usRow ) { if(usRow == 0) { @@ -153,7 +153,7 @@ static void prvLCDGotoRow( unsigned portSHORT usRow ) } /*-----------------------------------------------------------*/ -static void prvLCDCommand( portCHAR cCommand ) +static void prvLCDCommand( char cCommand ) { PMPSetAddress( LCD_COMMAND_ADDRESS ); PMPMasterWrite( cCommand ); @@ -161,7 +161,7 @@ static void prvLCDCommand( portCHAR cCommand ) } /*-----------------------------------------------------------*/ -static void prvLCDData( portCHAR cChar ) +static void prvLCDData( char cChar ) { PMPSetAddress( LCD_DATA_ADDRESS ); PMPMasterWrite( cChar ); @@ -169,7 +169,7 @@ static void prvLCDData( portCHAR cChar ) } /*-----------------------------------------------------------*/ -static void prvLCDPutString( portCHAR *pcString ) +static void prvLCDPutString( char *pcString ) { /* Write out each character with appropriate delay between each. */ while(*pcString) @@ -226,7 +226,7 @@ static void prvSetupLCD(void) static void vLCDTask(void *pvParameters) { xLCDMessage xMessage; -unsigned portSHORT usRow = 0; +unsigned short usRow = 0; /* Initialise the hardware. This uses delays so must not be called prior to the scheduler being started. */ diff --git a/Demo/PIC32MX_MPLAB/main.c b/Demo/PIC32MX_MPLAB/main.c index e310d014b..a719086b8 100644 --- a/Demo/PIC32MX_MPLAB/main.c +++ b/Demo/PIC32MX_MPLAB/main.c @@ -166,7 +166,7 @@ interrupt test" interrupt. */ #define mainEXPECTED_CLOCKS_BETWEEN_INTERRUPTS ( ( configCPU_CLOCK_HZ >> 1 ) / mainTEST_INTERRUPT_FREQUENCY ) /* The number of nano seconds between each core clock. */ -#define mainNS_PER_CLOCK ( ( unsigned portLONG ) ( ( 1.0 / ( double ) ( configCPU_CLOCK_HZ >> 1 ) ) * 1000000000.0 ) ) +#define mainNS_PER_CLOCK ( ( unsigned long ) ( ( 1.0 / ( double ) ( configCPU_CLOCK_HZ >> 1 ) ) * 1000000000.0 ) ) /*-----------------------------------------------------------*/ @@ -197,12 +197,12 @@ static xQueueHandle xLCDQueue; /* Flag used by prvTestTask1() and prvTestTask2() to indicate their status (pass/fail). */ -unsigned portLONG ulStatus1 = pdPASS; +unsigned long ulStatus1 = pdPASS; /* Variables incremented by prvTestTask1() and prvTestTask2() respectively on each iteration of their function. This is used to detect either task stopping their execution.. */ -unsigned portLONG ulRegTest1Cycles = 0, ulRegTest2Cycles = 0; +unsigned long ulRegTest1Cycles = 0, ulRegTest2Cycles = 0; /*-----------------------------------------------------------*/ @@ -293,14 +293,14 @@ static void prvSetupHardware( void ) static void prvCheckTask( void *pvParameters ) { -unsigned portLONG ulLastRegTest1Value = 0, ulLastRegTest2Value = 0, ulTicksToWait = mainNO_ERROR_PERIOD; +unsigned long ulLastRegTest1Value = 0, ulLastRegTest2Value = 0, ulTicksToWait = mainNO_ERROR_PERIOD; portTickType xLastExecutionTime; /* Buffer into which the high frequency timer count is written as a string. */ -static portCHAR cStringBuffer[ mainMAX_STRING_LENGTH ]; +static char cStringBuffer[ mainMAX_STRING_LENGTH ]; /* The count of the high frequency timer interrupts. */ -extern unsigned portLONG ulHighFrequencyTimerInterrupts; +extern unsigned long ulHighFrequencyTimerInterrupts; xLCDMessage xMessage = { ( 200 / portTICK_RATE_MS ), cStringBuffer }; /* Setup the high frequency, high priority, timer test. It is setup here @@ -391,7 +391,7 @@ void vApplicationStackOverflowHook( void ) } /*-----------------------------------------------------------*/ -void _general_exception_handler( unsigned portLONG ulCause, unsigned portLONG ulStatus ) +void _general_exception_handler( unsigned long ulCause, unsigned long ulStatus ) { /* This overrides the definition provided by the kernel. Other exceptions should be handled here. */ diff --git a/Demo/PIC32MX_MPLAB/timertest.c b/Demo/PIC32MX_MPLAB/timertest.c index ba32d7a30..72c8d487d 100644 --- a/Demo/PIC32MX_MPLAB/timertest.c +++ b/Demo/PIC32MX_MPLAB/timertest.c @@ -68,17 +68,17 @@ void __attribute__( (interrupt(ipl0), vector(_TIMER_2_VECTOR))) vT2InterruptWrap /*-----------------------------------------------------------*/ /* Incremented every 20,000 interrupts, so should count in seconds. */ -unsigned portLONG ulHighFrequencyTimerInterrupts = 0; +unsigned long ulHighFrequencyTimerInterrupts = 0; /* The frequency at which the timer is interrupting. */ -static unsigned portLONG ulFrequencyHz; +static unsigned long ulFrequencyHz; /*-----------------------------------------------------------*/ -void vSetupTimerTest( unsigned portSHORT usFrequencyHz ) +void vSetupTimerTest( unsigned short usFrequencyHz ) { /* Remember the frequency so it can be used from the ISR. */ - ulFrequencyHz = ( unsigned portLONG ) usFrequencyHz; + ulFrequencyHz = ( unsigned long ) usFrequencyHz; /* T2 is used to generate interrupts above the kernel and max syscall interrupt priority. */ @@ -86,7 +86,7 @@ void vSetupTimerTest( unsigned portSHORT usFrequencyHz ) TMR2 = 0; /* Timer 2 is going to interrupt at usFrequencyHz Hz. */ - PR2 = ( unsigned portSHORT ) ( ( configPERIPHERAL_CLOCK_HZ / ( unsigned portLONG ) usFrequencyHz ) - 1 ); + PR2 = ( unsigned short ) ( ( configPERIPHERAL_CLOCK_HZ / ( unsigned long ) usFrequencyHz ) - 1 ); /* Setup timer 2 interrupt priority to be above the kernel priority so the timer jitter is not effected by the kernel activity. */ @@ -105,7 +105,7 @@ void vSetupTimerTest( unsigned portSHORT usFrequencyHz ) void vT2InterruptHandler( void ) { -static unsigned portLONG ulCalls = 0; +static unsigned long ulCalls = 0; ++ulCalls; if( ulCalls >= ulFrequencyHz ) -- 2.39.5