]> git.sur5r.net Git - freertos/blobdiff - FreeRTOS/Demo/CORTEX_STM32F103_Primer_GCC/timertest.c
Replace use of legacy portTYPE macros from old demos and standard demo files.
[freertos] / FreeRTOS / Demo / CORTEX_STM32F103_Primer_GCC / timertest.c
index 44985a777b002734ab8650caafe98f0f0c763f93..96bafd28bd75b8b1bd54d786b012d9b90988dc1d 100644 (file)
@@ -75,7 +75,7 @@
 \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
@@ -102,7 +102,7 @@ void vSetupTimerTest( void );
 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
@@ -124,7 +124,7 @@ NVIC_InitTypeDef NVIC_InitStructure;
 \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
@@ -134,7 +134,7 @@ NVIC_InitTypeDef NVIC_InitStructure;
        \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
@@ -154,8 +154,8 @@ NVIC_InitTypeDef NVIC_InitStructure;
 \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