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
|
@ -91,28 +91,28 @@
|
|||
|
||||
/* Constants required to access the "LED's". The LED segments are turned on
|
||||
and off to generate '*' characters. */
|
||||
#define partstNUM_LEDS ( ( unsigned portCHAR ) 6 )
|
||||
#define partstSEGMENTS_ON ( ( unsigned portCHAR ) 0x0f )
|
||||
#define partstSEGMENTS_OFF ( ( unsigned portCHAR ) 0x00 )
|
||||
#define partstNUM_LEDS ( ( unsigned char ) 6 )
|
||||
#define partstSEGMENTS_ON ( ( unsigned char ) 0x0f )
|
||||
#define partstSEGMENTS_OFF ( ( unsigned char ) 0x00 )
|
||||
|
||||
/* The LED number of the real on board LED, rather than a simulated LED. */
|
||||
#define partstON_BOARD_LED ( ( unsigned portBASE_TYPE ) 10 )
|
||||
#define mainON_BOARD_LED_BIT ( ( unsigned portCHAR ) 0x01 )
|
||||
#define mainON_BOARD_LED_BIT ( ( unsigned char ) 0x01 )
|
||||
|
||||
/* The LCD segments used to generate the '*' characters for LED's 0 to 5. */
|
||||
unsigned portCHAR * const ucRHSSegments[ partstNUM_LEDS ] = { ( unsigned portCHAR * )0xa4,
|
||||
( unsigned portCHAR * )0xa2,
|
||||
( unsigned portCHAR * )0xa0,
|
||||
( unsigned portCHAR * )0x9e,
|
||||
( unsigned portCHAR * )0x9c,
|
||||
( unsigned portCHAR * )0x9a };
|
||||
unsigned char * const ucRHSSegments[ partstNUM_LEDS ] = { ( unsigned char * )0xa4,
|
||||
( unsigned char * )0xa2,
|
||||
( unsigned char * )0xa0,
|
||||
( unsigned char * )0x9e,
|
||||
( unsigned char * )0x9c,
|
||||
( unsigned char * )0x9a };
|
||||
|
||||
unsigned portCHAR * const ucLHSSegments[ partstNUM_LEDS ] = { ( unsigned portCHAR * )0xa3,
|
||||
( unsigned portCHAR * )0xa1,
|
||||
( unsigned portCHAR * )0x9f,
|
||||
( unsigned portCHAR * )0x9d,
|
||||
( unsigned portCHAR * )0x9b,
|
||||
( unsigned portCHAR * )0x99 };
|
||||
unsigned char * const ucLHSSegments[ partstNUM_LEDS ] = { ( unsigned char * )0xa3,
|
||||
( unsigned char * )0xa1,
|
||||
( unsigned char * )0x9f,
|
||||
( unsigned char * )0x9d,
|
||||
( unsigned char * )0x9b,
|
||||
( unsigned char * )0x99 };
|
||||
|
||||
/*
|
||||
* Toggle the single genuine built in LED.
|
||||
|
@ -224,7 +224,7 @@ void vParTestToggleLED( unsigned portBASE_TYPE uxLED )
|
|||
|
||||
static void prvToggleOnBoardLED( void )
|
||||
{
|
||||
static unsigned portSHORT sState = pdFALSE;
|
||||
static unsigned short sState = pdFALSE;
|
||||
|
||||
/* Toggle the state of the single genuine on board LED. */
|
||||
if( sState )
|
||||
|
|
|
@ -104,8 +104,8 @@
|
|||
#include "PollQ.h"
|
||||
|
||||
/* Constants required for hardware setup. */
|
||||
#define mainALL_BITS_OUTPUT ( ( unsigned portCHAR ) 0xff )
|
||||
#define mainMAX_FREQUENCY ( ( unsigned portCHAR ) 121 )
|
||||
#define mainALL_BITS_OUTPUT ( ( unsigned char ) 0xff )
|
||||
#define mainMAX_FREQUENCY ( ( unsigned char ) 121 )
|
||||
|
||||
/* Constants that define the LED's used by the various tasks. [in this case
|
||||
the '*' characters on the LCD represent LED's] */
|
||||
|
@ -119,7 +119,7 @@ the '*' characters on the LCD represent LED's] */
|
|||
#define mainLED_TASK_PRIORITY ( tskIDLE_PRIORITY + 1 )
|
||||
|
||||
/* Baud rate used by the COM test tasks. */
|
||||
#define mainCOM_TEST_BAUD_RATE ( ( unsigned portLONG ) 19200 )
|
||||
#define mainCOM_TEST_BAUD_RATE ( ( unsigned long ) 19200 )
|
||||
|
||||
/* The frequency at which the 'Check' tasks executes. See the comments at the
|
||||
top of the page. When the system is operating error free the 'Check' task
|
||||
|
@ -130,10 +130,10 @@ LCD represent LED's]*/
|
|||
#define mainERROR_CHECK_DELAY ( ( portTickType ) 500 / portTICK_RATE_MS )
|
||||
|
||||
/* The constants used in the calculation. */
|
||||
#define intgCONST1 ( ( portLONG ) 123 )
|
||||
#define intgCONST2 ( ( portLONG ) 234567 )
|
||||
#define intgCONST3 ( ( portLONG ) -3 )
|
||||
#define intgCONST4 ( ( portLONG ) 7 )
|
||||
#define intgCONST1 ( ( long ) 123 )
|
||||
#define intgCONST2 ( ( long ) 234567 )
|
||||
#define intgCONST3 ( ( long ) -3 )
|
||||
#define intgCONST4 ( ( long ) 7 )
|
||||
#define intgEXPECTED_ANSWER ( ( ( intgCONST1 + intgCONST2 ) * intgCONST3 ) / intgCONST4 )
|
||||
|
||||
/*
|
||||
|
@ -146,7 +146,7 @@ static void vErrorChecks( void *pvParameters );
|
|||
* Called by the Check task. Returns pdPASS if all the other tasks are found
|
||||
* to be operating without error - otherwise returns pdFAIL.
|
||||
*/
|
||||
static portSHORT prvCheckOtherTasksAreStillRunning( void );
|
||||
static short prvCheckOtherTasksAreStillRunning( void );
|
||||
|
||||
/*
|
||||
* Perform the hardware setup required by the ES449 in order to run the demo
|
||||
|
@ -156,7 +156,7 @@ static void prvSetupHardware( void );
|
|||
|
||||
|
||||
portBASE_TYPE xLocalError = pdFALSE;
|
||||
volatile unsigned portLONG ulIdleLoops = 0UL;
|
||||
volatile unsigned long ulIdleLoops = 0UL;
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
@ -215,10 +215,10 @@ portTickType xDelayPeriod = mainNO_ERROR_CHECK_DELAY;
|
|||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static portSHORT prvCheckOtherTasksAreStillRunning( void )
|
||||
static short prvCheckOtherTasksAreStillRunning( void )
|
||||
{
|
||||
static portSHORT sNoErrorFound = pdTRUE;
|
||||
static unsigned portLONG ulLastIdleLoopCount = 0UL;
|
||||
static short sNoErrorFound = pdTRUE;
|
||||
static unsigned long ulLastIdleLoopCount = 0UL;
|
||||
|
||||
/* The demo tasks maintain a count that increments every cycle of the task
|
||||
provided that the task has never encountered an error. This function
|
||||
|
@ -291,7 +291,7 @@ void vApplicationIdleHook( void )
|
|||
{
|
||||
/* These variables are all effectively set to constants so they are volatile to
|
||||
ensure the compiler does not just get rid of them. */
|
||||
volatile portLONG lValue;
|
||||
volatile long lValue;
|
||||
|
||||
/* Keep performing a calculation and checking the result against a constant. */
|
||||
for( ;; )
|
||||
|
|
|
@ -81,7 +81,7 @@
|
|||
#include "serial.h"
|
||||
|
||||
/* Constants required to setup the hardware. */
|
||||
#define serTX_AND_RX ( ( unsigned portCHAR ) 0x03 )
|
||||
#define serTX_AND_RX ( ( unsigned char ) 0x03 )
|
||||
|
||||
/* Misc. constants. */
|
||||
#define serNO_BLOCK ( ( portTickType ) 0 )
|
||||
|
@ -95,13 +95,13 @@ static xQueueHandle xRxedChars;
|
|||
/* The queue used to hold characters waiting transmission. */
|
||||
static xQueueHandle xCharsForTx;
|
||||
|
||||
static volatile portSHORT sTHREEmpty;
|
||||
static volatile short sTHREEmpty;
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
xComPortHandle xSerialPortInitMinimal( unsigned portLONG ulWantedBaud, unsigned portBASE_TYPE uxQueueLength )
|
||||
xComPortHandle xSerialPortInitMinimal( unsigned long ulWantedBaud, unsigned portBASE_TYPE uxQueueLength )
|
||||
{
|
||||
unsigned portLONG ulBaudRateCount;
|
||||
unsigned long ulBaudRateCount;
|
||||
|
||||
/* Initialise the hardware. */
|
||||
|
||||
|
@ -111,8 +111,8 @@ unsigned portLONG ulBaudRateCount;
|
|||
portENTER_CRITICAL();
|
||||
{
|
||||
/* Create the queues used by the com test task. */
|
||||
xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed portCHAR ) );
|
||||
xCharsForTx = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed portCHAR ) );
|
||||
xRxedChars = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed char ) );
|
||||
xCharsForTx = xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE ) sizeof( signed char ) );
|
||||
|
||||
/* Reset UART. */
|
||||
UCTL1 |= SWRST;
|
||||
|
@ -126,11 +126,11 @@ unsigned portLONG ulBaudRateCount;
|
|||
U1TCTL |= SSEL1;
|
||||
|
||||
/* Setup baud rate low byte. */
|
||||
U1BR0 = ( unsigned portCHAR ) ( ulBaudRateCount & ( unsigned portLONG ) 0xff );
|
||||
U1BR0 = ( unsigned char ) ( ulBaudRateCount & ( unsigned long ) 0xff );
|
||||
|
||||
/* Setup baud rate high byte. */
|
||||
ulBaudRateCount >>= 8UL;
|
||||
U1BR1 = ( unsigned portCHAR ) ( ulBaudRateCount & ( unsigned portLONG ) 0xff );
|
||||
U1BR1 = ( unsigned char ) ( ulBaudRateCount & ( unsigned long ) 0xff );
|
||||
|
||||
/* Enable ports. */
|
||||
ME2 |= UTXE1 + URXE1;
|
||||
|
@ -153,7 +153,7 @@ unsigned portLONG ulBaudRateCount;
|
|||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed portCHAR *pcRxedChar, portTickType xBlockTime )
|
||||
signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime )
|
||||
{
|
||||
/* Get the next character from the buffer. Return false if no characters
|
||||
are available, or arrive before xBlockTime expires. */
|
||||
|
@ -168,7 +168,7 @@ signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed portCHAR *pcR
|
|||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed portCHAR cOutChar, portTickType xBlockTime )
|
||||
signed portBASE_TYPE xSerialPutChar( xComPortHandle pxPort, signed char cOutChar, portTickType xBlockTime )
|
||||
{
|
||||
signed portBASE_TYPE xReturn;
|
||||
|
||||
|
@ -224,7 +224,7 @@ signed portBASE_TYPE xReturn;
|
|||
#pragma vector=UART1RX_VECTOR
|
||||
__interrupt void vRxISR( void )
|
||||
{
|
||||
signed portCHAR cChar;
|
||||
signed char cChar;
|
||||
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
|
||||
|
||||
/* Get the character from the UART and post it on the queue of Rxed
|
||||
|
@ -252,7 +252,7 @@ signed portBASE_TYPE xReturn;
|
|||
#pragma vector=UART1TX_VECTOR
|
||||
__interrupt void vTxISR( void )
|
||||
{
|
||||
signed portCHAR cChar;
|
||||
signed char cChar;
|
||||
portBASE_TYPE xTaskWoken = pdFALSE;
|
||||
|
||||
/* The previous character has been transmitted. See if there are any
|
||||
|
@ -280,7 +280,7 @@ signed portBASE_TYPE xReturn;
|
|||
interrupt entry point. */
|
||||
void vRxISR( void )
|
||||
{
|
||||
signed portCHAR cChar;
|
||||
signed char cChar;
|
||||
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
|
||||
|
||||
/* Get the character from the UART and post it on the queue of Rxed
|
||||
|
@ -300,7 +300,7 @@ signed portBASE_TYPE xReturn;
|
|||
interrupt entry point. */
|
||||
void vTxISR( void )
|
||||
{
|
||||
signed portCHAR cChar;
|
||||
signed char cChar;
|
||||
portBASE_TYPE xTaskWoken = pdFALSE;
|
||||
|
||||
/* The previous character has been transmitted. See if there are any
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue