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

@ -69,9 +69,9 @@
/* Demo application includes. */
#include "partest.h"
#define partstFIRST_IO ( ( unsigned portLONG ) 0x01 )
#define partstFIRST_IO ( ( unsigned long ) 0x01 )
#define partstNUM_LEDS ( 8 )
#define partstALL_OUTPUTS_OFF ( ( unsigned portLONG ) 0xff )
#define partstALL_OUTPUTS_OFF ( ( unsigned long ) 0xff )
/*-----------------------------------------------------------
* Simple parallel port IO routines.
@ -91,12 +91,12 @@ void vParTestInitialise( void )
void vParTestSetLED( unsigned portBASE_TYPE uxLED, signed portBASE_TYPE xValue )
{
unsigned portLONG ulLED = partstFIRST_IO;
unsigned long ulLED = partstFIRST_IO;
if( uxLED < partstNUM_LEDS )
{
/* Rotate to the wanted bit of port */
ulLED <<= ( unsigned portLONG ) uxLED;
ulLED <<= ( unsigned long ) uxLED;
/* Set of clear the output. */
if( xValue )
@ -113,13 +113,13 @@ unsigned portLONG ulLED = partstFIRST_IO;
void vParTestToggleLED( unsigned portBASE_TYPE uxLED )
{
unsigned portLONG ulLED = partstFIRST_IO, ulCurrentState;
unsigned long ulLED = partstFIRST_IO, ulCurrentState;
if( uxLED < partstNUM_LEDS )
{
/* Rotate to the wanted bit of port 0. Only P10 to P13 have an LED
attached. */
ulLED <<= ( unsigned portLONG ) uxLED;
ulLED <<= ( unsigned long ) uxLED;
/* If this bit is already set, clear it, and vice versa. */
ulCurrentState = FIO2PIN;
@ -137,9 +137,9 @@ unsigned portLONG ulLED = partstFIRST_IO, ulCurrentState;
/*-----------------------------------------------------------*/
unsigned portBASE_TYPE uxParTextGetLED( unsigned portBASE_TYPE uxLED )
{
unsigned portLONG ulLED = partstFIRST_IO;
unsigned long ulLED = partstFIRST_IO;
ulLED <<= ( unsigned portLONG ) uxLED;
ulLED <<= ( unsigned long ) uxLED;
return ( FIO2PIN & ulLED );
}

View file

@ -117,22 +117,22 @@
#define mainGEN_QUEUE_TASK_PRIORITY ( tskIDLE_PRIORITY )
/* Constants to setup the PLL. */
#define mainPLL_MUL ( ( unsigned portLONG ) ( 8 - 1 ) )
#define mainPLL_DIV ( ( unsigned portLONG ) 0x0000 )
#define mainCPU_CLK_DIV ( ( unsigned portLONG ) 0x0003 )
#define mainPLL_ENABLE ( ( unsigned portLONG ) 0x0001 )
#define mainPLL_CONNECT ( ( ( unsigned portLONG ) 0x0002 ) | mainPLL_ENABLE )
#define mainPLL_FEED_BYTE1 ( ( unsigned portLONG ) 0xaa )
#define mainPLL_FEED_BYTE2 ( ( unsigned portLONG ) 0x55 )
#define mainPLL_LOCK ( ( unsigned portLONG ) 0x4000000 )
#define mainPLL_CONNECTED ( ( unsigned portLONG ) 0x2000000 )
#define mainOSC_ENABLE ( ( unsigned portLONG ) 0x20 )
#define mainOSC_STAT ( ( unsigned portLONG ) 0x40 )
#define mainOSC_SELECT ( ( unsigned portLONG ) 0x01 )
#define mainPLL_MUL ( ( unsigned long ) ( 8 - 1 ) )
#define mainPLL_DIV ( ( unsigned long ) 0x0000 )
#define mainCPU_CLK_DIV ( ( unsigned long ) 0x0003 )
#define mainPLL_ENABLE ( ( unsigned long ) 0x0001 )
#define mainPLL_CONNECT ( ( ( unsigned long ) 0x0002 ) | mainPLL_ENABLE )
#define mainPLL_FEED_BYTE1 ( ( unsigned long ) 0xaa )
#define mainPLL_FEED_BYTE2 ( ( unsigned long ) 0x55 )
#define mainPLL_LOCK ( ( unsigned long ) 0x4000000 )
#define mainPLL_CONNECTED ( ( unsigned long ) 0x2000000 )
#define mainOSC_ENABLE ( ( unsigned long ) 0x20 )
#define mainOSC_STAT ( ( unsigned long ) 0x40 )
#define mainOSC_SELECT ( ( unsigned long ) 0x01 )
/* Constants to setup the MAM. */
#define mainMAM_TIM_3 ( ( unsigned portCHAR ) 0x03 )
#define mainMAM_MODE_FULL ( ( unsigned portCHAR ) 0x02 )
#define mainMAM_TIM_3 ( ( unsigned char ) 0x03 )
#define mainMAM_MODE_FULL ( ( unsigned char ) 0x02 )
/*
* The task that handles the uIP stack. All TCP/IP processing is performed in
@ -191,7 +191,7 @@ void vApplicationTickHook( void )
{
unsigned portBASE_TYPE uxColumn = 0;
static xLCDMessage xMessage = { 0, "PASS" };
static unsigned portLONG ulTicksSinceLastDisplay = 0;
static unsigned long ulTicksSinceLastDisplay = 0;
static portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
/* Called from every tick interrupt. Have enough ticks passed to make it

View file

@ -171,7 +171,7 @@ extern void ( vEMAC_ISR_Wrapper )( void );
{
MAC_INTENABLE = INT_RX_DONE;
VICIntEnable |= 0x00200000;
VICVectAddr21 = ( portLONG ) vEMAC_ISR_Wrapper;
VICVectAddr21 = ( long ) vEMAC_ISR_Wrapper;
prvSetMACAddress();
}
portEXIT_CRITICAL();
@ -281,10 +281,10 @@ struct uip_eth_addr xAddr;
}
/*-----------------------------------------------------------*/
void vApplicationProcessFormInput( portCHAR *pcInputString, portBASE_TYPE xInputLength )
void vApplicationProcessFormInput( char *pcInputString, portBASE_TYPE xInputLength )
{
char *c, *pcText;
static portCHAR cMessageForDisplay[ 32 ];
static char cMessageForDisplay[ 32 ];
extern xQueueHandle xLCDQueue;
xLCDMessage xLCDMessage;