mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-08-19 09:38:32 -04:00
Replace use of legacy portTYPE macros from old demos and standard demo files.
This commit is contained in:
parent
3e20aa7d60
commit
b54158d1dc
123 changed files with 736 additions and 736 deletions
|
@ -75,7 +75,7 @@
|
|||
#define partstMAX_OUTPUT_LED ( 2 )
|
||||
#define partstFIRST_LED GPIO_Pin_8
|
||||
|
||||
static unsigned portSHORT usOutputValue = 0;
|
||||
static unsigned short usOutputValue = 0;
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
@ -97,7 +97,7 @@ GPIO_InitTypeDef GPIO_InitStructure;
|
|||
|
||||
void vParTestSetLED( unsigned portBASE_TYPE uxLED, signed portBASE_TYPE xValue )
|
||||
{
|
||||
unsigned portSHORT usBit;
|
||||
unsigned short usBit;
|
||||
|
||||
vTaskSuspendAll();
|
||||
{
|
||||
|
@ -107,7 +107,7 @@ unsigned portSHORT usBit;
|
|||
|
||||
if( xValue == pdFALSE )
|
||||
{
|
||||
usBit ^= ( unsigned portSHORT ) 0xffff;
|
||||
usBit ^= ( unsigned short ) 0xffff;
|
||||
usOutputValue &= usBit;
|
||||
}
|
||||
else
|
||||
|
@ -124,7 +124,7 @@ unsigned portSHORT usBit;
|
|||
|
||||
void vParTestToggleLED( unsigned portBASE_TYPE uxLED )
|
||||
{
|
||||
unsigned portSHORT usBit;
|
||||
unsigned short usBit;
|
||||
|
||||
vTaskSuspendAll();
|
||||
{
|
||||
|
|
|
@ -173,7 +173,7 @@ these can require a larger stack. */
|
|||
#define mainFLASH_DELAY ( ( portTickType ) 1000 / portTICK_RATE_MS )
|
||||
|
||||
/* The number of nano seconds between each processor clock. */
|
||||
#define mainNS_PER_CLOCK ( ( unsigned portLONG ) ( ( 1.0 / ( double ) configCPU_CLOCK_HZ ) * 1000000000.0 ) )
|
||||
#define mainNS_PER_CLOCK ( ( unsigned long ) ( ( 1.0 / ( double ) configCPU_CLOCK_HZ ) * 1000000000.0 ) )
|
||||
|
||||
/* The two types of message that can be sent to the LCD task. */
|
||||
#define mainUPDATE_BALL_MESSAGE ( 0 )
|
||||
|
@ -279,9 +279,9 @@ int main( void )
|
|||
void prvLCDTask( void *pvParameters )
|
||||
{
|
||||
xLCDMessage xMessage;
|
||||
portCHAR cY = mainLCD_CHAR_HEIGHT;
|
||||
const portCHAR * const pcString = "www.FreeRTOS.org";
|
||||
const portCHAR * const pcBlankLine = " ";
|
||||
char cY = mainLCD_CHAR_HEIGHT;
|
||||
const char * const pcString = "www.FreeRTOS.org";
|
||||
const char * const pcBlankLine = " ";
|
||||
|
||||
DRAW_Init();
|
||||
|
||||
|
@ -330,8 +330,8 @@ static void prvCheckTask( void *pvParameters )
|
|||
{
|
||||
portTickType xLastExecutionTime;
|
||||
xLCDMessage xMessage;
|
||||
static signed portCHAR cPassMessage[ mainMAX_MSG_LEN ];
|
||||
extern unsigned portSHORT usMaxJitter;
|
||||
static signed char cPassMessage[ mainMAX_MSG_LEN ];
|
||||
extern unsigned short usMaxJitter;
|
||||
|
||||
/* Initialise the xLastExecutionTime variable on task entry. */
|
||||
xLastExecutionTime = xTaskGetTickCount();
|
||||
|
@ -374,7 +374,7 @@ extern unsigned portSHORT usMaxJitter;
|
|||
with the max measured jitter time also included (as per the
|
||||
fast interrupt test described at the top of this file and on
|
||||
the online documentation page for this demo application). */
|
||||
sprintf( ( portCHAR * ) cPassMessage, "PASS [%uns]", ( ( unsigned portLONG ) usMaxJitter ) * mainNS_PER_CLOCK );
|
||||
sprintf( ( char * ) cPassMessage, "PASS [%uns]", ( ( unsigned long ) usMaxJitter ) * mainNS_PER_CLOCK );
|
||||
}
|
||||
|
||||
/* Send the message to the LCD gatekeeper for display. */
|
||||
|
@ -385,7 +385,7 @@ extern unsigned portSHORT usMaxJitter;
|
|||
|
||||
void vApplicationTickHook( void )
|
||||
{
|
||||
static unsigned portLONG ulCallCount;
|
||||
static unsigned long ulCallCount;
|
||||
static const xLCDMessage xMemsMessage = { mainUPDATE_BALL_MESSAGE, NULL };
|
||||
static portBASE_TYPE xHigherPriorityTaskWoken;
|
||||
|
||||
|
@ -415,7 +415,7 @@ static void prvSetupHardware( void )
|
|||
}
|
||||
|
||||
/* 2 wait states required on the flash. */
|
||||
*( ( unsigned portLONG * ) 0x40022000 ) = 0x02;
|
||||
*( ( unsigned long * ) 0x40022000 ) = 0x02;
|
||||
|
||||
/* HCLK = SYSCLK */
|
||||
RCC_HCLKConfig( RCC_SYSCLK_Div1 );
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue