mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-09-02 12:24:07 -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
|
@ -181,7 +181,7 @@ time. */
|
|||
|
||||
/* The period of the system clock in nano seconds. This is used to calculate
|
||||
the jitter time in nano seconds. */
|
||||
#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 ) )
|
||||
|
||||
/* Constants used when writing strings to the display. */
|
||||
#define mainCHARACTER_HEIGHT ( 9 )
|
||||
|
@ -221,7 +221,7 @@ extern void vSetupHighFrequencyTimer( void );
|
|||
/*
|
||||
* Hook functions that can get called by the kernel.
|
||||
*/
|
||||
void vApplicationStackOverflowHook( xTaskHandle *pxTask, signed portCHAR *pcTaskName );
|
||||
void vApplicationStackOverflowHook( xTaskHandle *pxTask, signed char *pcTaskName );
|
||||
void vApplicationTickHook( void );
|
||||
|
||||
|
||||
|
@ -231,7 +231,7 @@ void vApplicationTickHook( void );
|
|||
xQueueHandle xOLEDQueue;
|
||||
|
||||
/* The welcome text. */
|
||||
const portCHAR * const pcWelcomeMessage = " www.FreeRTOS.org";
|
||||
const char * const pcWelcomeMessage = " www.FreeRTOS.org";
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
@ -323,7 +323,7 @@ void prvSetupHardware( void )
|
|||
void vApplicationTickHook( void )
|
||||
{
|
||||
static xOLEDMessage xMessage = { "PASS" };
|
||||
static unsigned portLONG ulTicksSinceLastDisplay = 0;
|
||||
static unsigned long ulTicksSinceLastDisplay = 0;
|
||||
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
|
||||
|
||||
/* Called from every tick interrupt. Have enough ticks passed to make it
|
||||
|
@ -395,16 +395,16 @@ portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
|
|||
void vOLEDTask( void *pvParameters )
|
||||
{
|
||||
xOLEDMessage xMessage;
|
||||
unsigned portLONG ulY, ulMaxY;
|
||||
static portCHAR cMessage[ mainMAX_MSG_LEN ];
|
||||
extern volatile unsigned portLONG ulMaxJitter;
|
||||
const unsigned portCHAR *pucImage;
|
||||
unsigned long ulY, ulMaxY;
|
||||
static char cMessage[ mainMAX_MSG_LEN ];
|
||||
extern volatile unsigned long ulMaxJitter;
|
||||
const unsigned char *pucImage;
|
||||
|
||||
/* Functions to access the OLED. The one used depends on the dev kit
|
||||
being used. */
|
||||
void ( *vOLEDInit )( unsigned portLONG ) = NULL;
|
||||
void ( *vOLEDStringDraw )( const portCHAR *, unsigned portLONG, unsigned portLONG, unsigned portCHAR ) = NULL;
|
||||
void ( *vOLEDImageDraw )( const unsigned portCHAR *, unsigned portLONG, unsigned portLONG, unsigned portLONG, unsigned portLONG ) = NULL;
|
||||
void ( *vOLEDInit )( unsigned long ) = NULL;
|
||||
void ( *vOLEDStringDraw )( const char *, unsigned long, unsigned long, unsigned char ) = NULL;
|
||||
void ( *vOLEDImageDraw )( const unsigned char *, unsigned long, unsigned long, unsigned long, unsigned long ) = NULL;
|
||||
void ( *vOLEDClear )( void ) = NULL;
|
||||
|
||||
/* Map the OLED access functions to the driver functions that are appropriate
|
||||
|
@ -468,7 +468,7 @@ void ( *vOLEDClear )( void ) = NULL;
|
|||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vApplicationStackOverflowHook( xTaskHandle *pxTask, signed portCHAR *pcTaskName )
|
||||
void vApplicationStackOverflowHook( xTaskHandle *pxTask, signed char *pcTaskName )
|
||||
{
|
||||
( void ) pxTask;
|
||||
( void ) pcTaskName;
|
||||
|
|
|
@ -90,7 +90,7 @@ zero. */
|
|||
|
||||
/* Misc defines. */
|
||||
#define timerMAX_32BIT_VALUE ( 0xffffffffUL )
|
||||
#define timerTIMER_1_COUNT_VALUE ( * ( ( volatile unsigned long * ) ( ( unsigned portLONG ) TIMER1_BASE + 0x48UL ) ) )
|
||||
#define timerTIMER_1_COUNT_VALUE ( * ( ( volatile unsigned long * ) ( ( unsigned long ) TIMER1_BASE + 0x48UL ) ) )
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
@ -98,7 +98,7 @@ zero. */
|
|||
void Timer0IntHandler( void );
|
||||
|
||||
/* Stores the value of the maximum recorded jitter between interrupts. */
|
||||
volatile unsigned portLONG ulMaxJitter = 0;
|
||||
volatile unsigned long ulMaxJitter = 0;
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
@ -136,9 +136,9 @@ unsigned long ulFrequency;
|
|||
|
||||
void Timer0IntHandler( void )
|
||||
{
|
||||
unsigned portLONG ulDifference;
|
||||
volatile unsigned portLONG ulCurrentCount;
|
||||
static unsigned portLONG ulMaxDifference = 0, ulLastCount = 0;
|
||||
unsigned long ulDifference;
|
||||
volatile unsigned long ulCurrentCount;
|
||||
static unsigned long ulMaxDifference = 0, ulLastCount = 0;
|
||||
|
||||
/* We use the timer 1 counter value to measure the clock cycles between
|
||||
the timer 0 interrupts. */
|
||||
|
|
|
@ -105,20 +105,20 @@ xSemaphoreHandle xMACInterruptSemaphore = NULL;
|
|||
|
||||
/* The buffer used by the uIP stack. In this case the pointer is used to
|
||||
point to one of the Rx buffers. */
|
||||
unsigned portCHAR *uip_buf;
|
||||
unsigned char *uip_buf;
|
||||
|
||||
/* Buffers into which Rx data is placed. */
|
||||
static union
|
||||
{
|
||||
unsigned portLONG ulJustForAlignment;
|
||||
unsigned portCHAR ucRxBuffers[ emacNUM_RX_BUFFERS ][ UIP_BUFSIZE + ( 4 * emacFRAM_SIZE_BYTES ) ];
|
||||
unsigned long ulJustForAlignment;
|
||||
unsigned char ucRxBuffers[ emacNUM_RX_BUFFERS ][ UIP_BUFSIZE + ( 4 * emacFRAM_SIZE_BYTES ) ];
|
||||
} uxRxBuffers;
|
||||
|
||||
/* The length of the data within each of the Rx buffers. */
|
||||
static unsigned portLONG ulRxLength[ emacNUM_RX_BUFFERS ];
|
||||
static unsigned long ulRxLength[ emacNUM_RX_BUFFERS ];
|
||||
|
||||
/* Used to keep a track of the number of bytes to transmit. */
|
||||
static unsigned portLONG ulNextTxSpace;
|
||||
static unsigned long ulNextTxSpace;
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
@ -194,7 +194,7 @@ void vInitialiseSend( void )
|
|||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vIncrementTxLength( unsigned portLONG ulLength )
|
||||
void vIncrementTxLength( unsigned long ulLength )
|
||||
{
|
||||
ulNextTxSpace += ulLength;
|
||||
}
|
||||
|
@ -203,11 +203,11 @@ void vIncrementTxLength( unsigned portLONG ulLength )
|
|||
void vSendBufferToMAC( void )
|
||||
{
|
||||
unsigned long *pulSource;
|
||||
unsigned portSHORT * pus;
|
||||
unsigned portLONG ulNextWord;
|
||||
unsigned short * pus;
|
||||
unsigned long ulNextWord;
|
||||
|
||||
/* Locate the data to be send. */
|
||||
pus = ( unsigned portSHORT * ) uip_buf;
|
||||
pus = ( unsigned short * ) uip_buf;
|
||||
|
||||
/* Add in the size of the data. */
|
||||
pus--;
|
||||
|
@ -219,9 +219,9 @@ unsigned portLONG ulNextWord;
|
|||
vTaskDelay( macWAIT_SEND_TIME );
|
||||
}
|
||||
|
||||
pulSource = ( unsigned portLONG * ) pus;
|
||||
pulSource = ( unsigned long * ) pus;
|
||||
|
||||
for( ulNextWord = 0; ulNextWord < ulNextTxSpace; ulNextWord += sizeof( unsigned portLONG ) )
|
||||
for( ulNextWord = 0; ulNextWord < ulNextTxSpace; ulNextWord += sizeof( unsigned long ) )
|
||||
{
|
||||
HWREG(ETH_BASE + MAC_O_DATA) = *pulSource;
|
||||
pulSource++;
|
||||
|
@ -235,7 +235,7 @@ unsigned portLONG ulNextWord;
|
|||
void vEMAC_ISR( void )
|
||||
{
|
||||
portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
|
||||
unsigned portLONG ulTemp;
|
||||
unsigned long ulTemp;
|
||||
|
||||
/* Clear the interrupt. */
|
||||
ulTemp = EthernetIntStatus( ETH_BASE, pdFALSE );
|
||||
|
@ -256,9 +256,9 @@ unsigned portLONG ulTemp;
|
|||
void vMACHandleTask( void *pvParameters )
|
||||
{
|
||||
unsigned long i, ulInt;
|
||||
unsigned portLONG ulLength;
|
||||
unsigned long ulLength;
|
||||
unsigned long *pulBuffer;
|
||||
static unsigned portLONG ulNextRxBuffer = 0;
|
||||
static unsigned long ulNextRxBuffer = 0;
|
||||
|
||||
for( ;; )
|
||||
{
|
||||
|
@ -289,7 +289,7 @@ static unsigned portLONG ulNextRxBuffer = 0;
|
|||
}
|
||||
|
||||
/* Read out the data into our buffer. */
|
||||
for( i = 0; i < ulLength; i += sizeof( unsigned portLONG ) )
|
||||
for( i = 0; i < ulLength; i += sizeof( unsigned long ) )
|
||||
{
|
||||
*pulBuffer = HWREG( ETH_BASE + MAC_O_DATA );
|
||||
pulBuffer++;
|
||||
|
|
|
@ -269,7 +269,7 @@ static void prvENET_Send(void)
|
|||
|
||||
static void prvSetMACAddress( void )
|
||||
{
|
||||
unsigned portLONG ulUser0, ulUser1;
|
||||
unsigned long ulUser0, ulUser1;
|
||||
unsigned char pucMACArray[8];
|
||||
struct uip_eth_addr xAddr;
|
||||
|
||||
|
@ -297,10 +297,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 xOLEDQueue;
|
||||
xOLEDMessage xOLEDMessage;
|
||||
|
||||
|
@ -342,7 +342,7 @@ xOLEDMessage xOLEDMessage;
|
|||
|
||||
/* Write the message to the LCD. */
|
||||
strcpy( cMessageForDisplay, pcText );
|
||||
xOLEDMessage.pcMessage = ( signed portCHAR * ) cMessageForDisplay;
|
||||
xOLEDMessage.pcMessage = ( signed char * ) cMessageForDisplay;
|
||||
xQueueSend( xOLEDQueue, &xOLEDMessage, portMAX_DELAY );
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue