X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=FreeRTOS%2FDemo%2FCORTEX_STM32F103_IAR%2Ftimertest.c;h=4a58f809b2b090d3a54d25ea5332bf6465b9770b;hb=3d511cabadf346c67f0f56e15e999c02ca0393ed;hp=44985a777b002734ab8650caafe98f0f0c763f93;hpb=abf43e0ca4466819c7c77a7bb37d72aa9175e471;p=freertos diff --git a/FreeRTOS/Demo/CORTEX_STM32F103_IAR/timertest.c b/FreeRTOS/Demo/CORTEX_STM32F103_IAR/timertest.c index 44985a777..4a58f809b 100644 --- a/FreeRTOS/Demo/CORTEX_STM32F103_IAR/timertest.c +++ b/FreeRTOS/Demo/CORTEX_STM32F103_IAR/timertest.c @@ -1,5 +1,5 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V8.1.2 - Copyright (C) 2014 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -24,10 +24,10 @@ the terms of the GNU General Public License (version 2) as published by the Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception. - >>! NOTE: The modification to the GPL is included to allow you to distribute - >>! a combined work that includes FreeRTOS without being obliged to provide - >>! the source code for proprietary components outside of the FreeRTOS - >>! kernel. + >>! NOTE: The modification to the GPL is included to allow you to !<< + >>! distribute a combined work that includes FreeRTOS without being !<< + >>! obliged to provide the source code for proprietary components !<< + >>! outside of the FreeRTOS kernel. !<< FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS @@ -75,7 +75,7 @@ /* The set frequency of the interrupt. Deviations from this are measured as the jitter. */ -#define timerINTERRUPT_FREQUENCY ( ( unsigned portSHORT ) 20000 ) +#define timerINTERRUPT_FREQUENCY ( ( unsigned short ) 20000 ) /* The expected time between each of the timer interrupts - if the jitter was zero. */ @@ -102,7 +102,7 @@ void vSetupTimerTest( void ); void vTimer2IntHandler( void ); /* Stores the value of the maximum recorded jitter between interrupts. */ -volatile unsigned portSHORT usMaxJitter = 0; +volatile unsigned short usMaxJitter = 0; /*-----------------------------------------------------------*/ @@ -124,7 +124,7 @@ NVIC_InitTypeDef NVIC_InitStructure; /* Time base configuration for timer 2 - which generates the interrupts. */ ulFrequency = configCPU_CLOCK_HZ / timerINTERRUPT_FREQUENCY; - TIM_TimeBaseStructure.TIM_Period = ( unsigned portSHORT ) ( ulFrequency & 0xffffUL ); + TIM_TimeBaseStructure.TIM_Period = ( unsigned short ) ( ulFrequency & 0xffffUL ); TIM_TimeBaseStructure.TIM_Prescaler = 0x0; TIM_TimeBaseStructure.TIM_ClockDivision = 0x0; TIM_TimeBaseStructure.TIM_CounterMode = TIM_CounterMode_Up; @@ -134,7 +134,7 @@ NVIC_InitTypeDef NVIC_InitStructure; /* Configuration for timer 3 which is used as a high resolution time measurement. */ - TIM_TimeBaseStructure.TIM_Period = ( unsigned portSHORT ) 0xffff; + TIM_TimeBaseStructure.TIM_Period = ( unsigned short ) 0xffff; TIM_TimeBaseInit( TIM3, &TIM_TimeBaseStructure ); TIM_ARRPreloadConfig( TIM3, ENABLE ); @@ -154,8 +154,8 @@ NVIC_InitTypeDef NVIC_InitStructure; void vTimer2IntHandler( void ) { -static unsigned portSHORT usLastCount = 0, usSettleCount = 0, usMaxDifference = 0; -unsigned portSHORT usThisCount, usDifference; +static unsigned short usLastCount = 0, usSettleCount = 0, usMaxDifference = 0; +unsigned short usThisCount, usDifference; /* Capture the free running timer 3 value as we enter the interrupt. */ usThisCount = TIM3->CNT;