]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS/Demo/PIC24_MPLAB/timertest.c
Replace use of legacy portTYPE macros from old demos and standard demo files.
[freertos] / FreeRTOS / Demo / PIC24_MPLAB / timertest.c
index 5d8916800dd8cb81c3a868b588020ff0cce2406f..6df0b4232e8ce957f90594ed3ff6a0766c615ea9 100644 (file)
@@ -91,11 +91,11 @@ static void prvCalculateAndStoreJitter( void );
 \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
@@ -105,10 +105,10 @@ void vSetupTimerTest( unsigned portSHORT usFrequencyHz )
        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
@@ -128,8 +128,8 @@ void vSetupTimerTest( unsigned portSHORT usFrequencyHz )
 \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