Replace use of legacy portTYPE macros from old demos and standard demo files.

This commit is contained in:
Richard Barry 2013-12-29 14:49:03 +00:00
parent 3e20aa7d60
commit b54158d1dc
123 changed files with 736 additions and 736 deletions

View file

@ -110,7 +110,7 @@
*/
void vApplicationSetupInterrupts( void )
{
const unsigned portSHORT usCompareMatchValue = ( ( configCPU_CLOCK_HZ / portPRESCALE_VALUE ) / configTICK_RATE_HZ );
const unsigned short usCompareMatchValue = ( ( configCPU_CLOCK_HZ / portPRESCALE_VALUE ) / configTICK_RATE_HZ );
/* Configure interrupt priority and level and unmask interrupt for PIT0. */
MCF_INTC0_ICR55 = ( 1 | ( configKERNEL_INTERRUPT_PRIORITY << 3 ) );
@ -131,7 +131,7 @@ const unsigned portSHORT usCompareMatchValue = ( ( configCPU_CLOCK_HZ / portPRES
void __attribute__ ((interrupt)) __cs3_isr_interrupt_119( void )
{
unsigned portLONG ulSavedInterruptMask;
unsigned long ulSavedInterruptMask;
/* Clear the PIT0 interrupt. */
MCF_PIT0_PCSR |= MCF_PIT_PCSR_PIF;

View file

@ -73,8 +73,8 @@
void vInitialiseTimerForIntQueueTest( void )
{
const unsigned portSHORT usCompareMatchValue1 = ( unsigned portSHORT ) ( ( configCPU_CLOCK_HZ / timerPRESCALE_VALUE ) / timerINTERRUPT1_FREQUENCY );
const unsigned portSHORT usCompareMatchValue2 = ( unsigned portSHORT ) ( ( configCPU_CLOCK_HZ / timerPRESCALE_VALUE ) / timerINTERRUPT2_FREQUENCY );
const unsigned short usCompareMatchValue1 = ( unsigned short ) ( ( configCPU_CLOCK_HZ / timerPRESCALE_VALUE ) / timerINTERRUPT1_FREQUENCY );
const unsigned short usCompareMatchValue2 = ( unsigned short ) ( ( configCPU_CLOCK_HZ / timerPRESCALE_VALUE ) / timerINTERRUPT2_FREQUENCY );
/* Configure interrupt priority and level and unmask interrupt. */
MCF_INTC0_ICR56 = ( ( configMAX_SYSCALL_INTERRUPT_PRIORITY - 1 ) << 3 );

View file

@ -81,7 +81,7 @@
#define LED2_POS 0x01
#define LED3_POS 0x04
static const unsigned portCHAR ucLEDDefinitions[ partstNUM_LEDs ] = { LED0_POS, LED1_POS, LED2_POS, LED3_POS };
static const unsigned char ucLEDDefinitions[ partstNUM_LEDs ] = { LED0_POS, LED1_POS, LED2_POS, LED3_POS };
/*-----------------------------------------------------------
* Simple parallel port IO routines.
@ -140,7 +140,7 @@ void vParTestToggleLED( unsigned portBASE_TYPE uxLED )
{
taskENTER_CRITICAL();
{
if( ( MCF_GPIO_PORTTD & ucLEDDefinitions[ uxLED ] ) == ( unsigned portCHAR ) 0 )
if( ( MCF_GPIO_PORTTD & ucLEDDefinitions[ uxLED ] ) == ( unsigned char ) 0 )
{
MCF_GPIO_PORTTD |= ucLEDDefinitions[ uxLED ];
}
@ -155,7 +155,7 @@ void vParTestToggleLED( unsigned portBASE_TYPE uxLED )
{
taskENTER_CRITICAL();
{
if( ( MCF_GPIO_PORTTC & ucLEDDefinitions[ uxLED ] ) == ( unsigned portCHAR ) 0 )
if( ( MCF_GPIO_PORTTC & ucLEDDefinitions[ uxLED ] ) == ( unsigned char ) 0 )
{
MCF_GPIO_PORTTC |= ucLEDDefinitions[ uxLED ];
}

View file

@ -122,7 +122,7 @@ error have been detected. */
#define mainCHECK_LED ( 3 )
/* ComTest constants - there is no free LED for the comtest tasks. */
#define mainCOM_TEST_BAUD_RATE ( ( unsigned portLONG ) 19200 )
#define mainCOM_TEST_BAUD_RATE ( ( unsigned long ) 19200 )
#define mainCOM_TEST_LED ( 5 )
/* Task priorities. */
@ -155,7 +155,7 @@ static void vRegTest2Task( void *pvParameters );
/*-----------------------------------------------------------*/
/* Counters used to detect errors within the reg test tasks. */
static volatile unsigned portLONG ulRegTest1Counter = 0x11111111, ulRegTest2Counter = 0x22222222;
static volatile unsigned long ulRegTest1Counter = 0x11111111, ulRegTest2Counter = 0x22222222;
/*-----------------------------------------------------------*/
@ -292,7 +292,7 @@ portTickType xLastExecutionTime;
void prvSetupHardware( void )
{
extern void mcf5xxx_wr_cacr( unsigned portLONG );
extern void mcf5xxx_wr_cacr( unsigned long );
portDISABLE_INTERRUPTS();
@ -314,7 +314,7 @@ extern void mcf5xxx_wr_cacr( unsigned portLONG );
}
/*-----------------------------------------------------------*/
void vApplicationStackOverflowHook( xTaskHandle *pxTask, signed portCHAR *pcTaskName )
void vApplicationStackOverflowHook( xTaskHandle *pxTask, signed char *pcTaskName )
{
/* This will get called if a stack overflow is detected during the context
switch. Set configCHECK_FOR_STACK_OVERFLOWS to 2 to also check for stack

View file

@ -82,16 +82,16 @@ an example of an efficient driver. */
#include "serial.h"
/* Hardware definitions. */
#define serNO_PARITY ( ( unsigned portCHAR ) 0x02 << 3 )
#define ser8DATA_BITS ( ( unsigned portCHAR ) 0x03 )
#define ser1STOP_BIT ( ( unsigned portCHAR ) 0x07 )
#define serSYSTEM_CLOCK ( ( unsigned portCHAR ) 0xdd )
#define serTX_OUTPUT ( ( unsigned portCHAR ) 0x04 )
#define serRX_INPUT ( ( unsigned portCHAR ) 0x08 )
#define serTX_ENABLE ( ( unsigned portCHAR ) 0x04 )
#define serRX_ENABLE ( ( unsigned portCHAR ) 0x01 )
#define serTX_INT ( ( unsigned portCHAR ) 0x01 )
#define serRX_INT ( ( unsigned portCHAR ) 0x02 )
#define serNO_PARITY ( ( unsigned char ) 0x02 << 3 )
#define ser8DATA_BITS ( ( unsigned char ) 0x03 )
#define ser1STOP_BIT ( ( unsigned char ) 0x07 )
#define serSYSTEM_CLOCK ( ( unsigned char ) 0xdd )
#define serTX_OUTPUT ( ( unsigned char ) 0x04 )
#define serRX_INPUT ( ( unsigned char ) 0x08 )
#define serTX_ENABLE ( ( unsigned char ) 0x04 )
#define serRX_ENABLE ( ( unsigned char ) 0x01 )
#define serTX_INT ( ( unsigned char ) 0x01 )
#define serRX_INT ( ( unsigned char ) 0x02 )
/* The queues used to communicate between tasks and ISR's. */
@ -108,13 +108,13 @@ void __attribute__( ( interrupt ) ) __cs3_isr_interrupt_78( void );
/*-----------------------------------------------------------*/
xComPortHandle xSerialPortInitMinimal( unsigned portLONG ulWantedBaud, unsigned portBASE_TYPE uxQueueLength )
xComPortHandle xSerialPortInitMinimal( unsigned long ulWantedBaud, unsigned portBASE_TYPE uxQueueLength )
{
const unsigned portLONG ulBaudRateDivisor = ( configCPU_CLOCK_HZ / ( 32UL * ulWantedBaud ) );
const unsigned long ulBaudRateDivisor = ( configCPU_CLOCK_HZ / ( 32UL * ulWantedBaud ) );
/* 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 ) );
xTxHasEnded = pdTRUE;
@ -133,8 +133,8 @@ const unsigned portLONG ulBaudRateDivisor = ( configCPU_CLOCK_HZ / ( 32UL * ulWa
MCF_UART1_UMR2 = ser1STOP_BIT;
MCF_UART1_UCSR = serSYSTEM_CLOCK;
MCF_UART1_UBG1 = ( unsigned portCHAR ) ( ( ulBaudRateDivisor >> 8UL ) & 0xffUL );
MCF_UART1_UBG2 = ( unsigned portCHAR ) ( ulBaudRateDivisor & 0xffUL );
MCF_UART1_UBG1 = ( unsigned char ) ( ( ulBaudRateDivisor >> 8UL ) & 0xffUL );
MCF_UART1_UBG2 = ( unsigned char ) ( ulBaudRateDivisor & 0xffUL );
/* Turn it on. */
MCF_UART1_UCR = serTX_ENABLE | serRX_ENABLE;
@ -152,7 +152,7 @@ const unsigned portLONG ulBaudRateDivisor = ( configCPU_CLOCK_HZ / ( 32UL * ulWa
}
/*-----------------------------------------------------------*/
signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed portCHAR *pcRxedChar, portTickType xBlockTime )
signed portBASE_TYPE xSerialGetChar( xComPortHandle pxPort, signed char *pcRxedChar, portTickType xBlockTime )
{
/* Only one port is supported. */
( void ) pxPort;
@ -170,7 +170,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 )
{
/* Only one port is supported. */
( void ) pxPort;
@ -201,7 +201,7 @@ void vSerialClose( xComPortHandle xPort )
void __cs3_isr_interrupt_78( void )
{
unsigned portCHAR ucChar;
unsigned char ucChar;
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE, xDoneSomething = pdTRUE;
while( xDoneSomething != pdFALSE )