X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=FreeRTOS%2FDemo%2FCORTEX_STM32F103_Keil%2Ftimertest.c;h=d10404faa2c9cb1b0eb0907d54083fa69a729dcf;hb=a0c885cd8b40e413c04232b56cea3b388f4c3283;hp=4462777c57143203d5d8de9a1ebd3c3942e0712b;hpb=7f682e03ddc9f629d828cb8b61033bba85d9df67;p=freertos diff --git a/FreeRTOS/Demo/CORTEX_STM32F103_Keil/timertest.c b/FreeRTOS/Demo/CORTEX_STM32F103_Keil/timertest.c index 4462777c5..d10404faa 100644 --- a/FreeRTOS/Demo/CORTEX_STM32F103_Keil/timertest.c +++ b/FreeRTOS/Demo/CORTEX_STM32F103_Keil/timertest.c @@ -1,5 +1,6 @@ /* - FreeRTOS V7.5.1 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V8.1.1 - Copyright (C) 2014 Real Time Engineers Ltd. + All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. @@ -23,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 @@ -74,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. */ @@ -101,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; /*-----------------------------------------------------------*/ @@ -123,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; @@ -133,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 ); @@ -153,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;