mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-08-20 10:08:33 -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
|
@ -174,7 +174,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 )
|
||||
|
@ -222,10 +222,10 @@ void vApplicationIdleHook( void ) __attribute__((naked));
|
|||
xQueueHandle xOLEDQueue;
|
||||
|
||||
/* The welcome text. */
|
||||
const portCHAR * const pcWelcomeMessage = " www.FreeRTOS.org";
|
||||
const char * const pcWelcomeMessage = " www.FreeRTOS.org";
|
||||
|
||||
/* Variables used to detect the test in the idle hook failing. */
|
||||
unsigned portLONG ulIdleError = pdFALSE;
|
||||
unsigned long ulIdleError = pdFALSE;
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
@ -308,7 +308,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
|
||||
|
@ -375,17 +375,17 @@ 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;
|
||||
unsigned long ulY, ulMaxY;
|
||||
static char cMessage[ mainMAX_MSG_LEN ];
|
||||
extern volatile unsigned long ulMaxJitter;
|
||||
unsigned portBASE_TYPE uxUnusedStackOnEntry, uxUnusedStackNow;
|
||||
const unsigned portCHAR *pucImage;
|
||||
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;
|
||||
|
||||
/* Just for demo purposes. */
|
||||
|
@ -451,7 +451,7 @@ void ( *vOLEDClear )( void ) = NULL;
|
|||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vApplicationStackOverflowHook( xTaskHandle *pxTask, signed portCHAR *pcTaskName )
|
||||
void vApplicationStackOverflowHook( xTaskHandle *pxTask, signed char *pcTaskName )
|
||||
{
|
||||
for( ;; );
|
||||
}
|
||||
|
|
|
@ -97,12 +97,12 @@ zero. */
|
|||
void Timer0IntHandler( void );
|
||||
|
||||
/* Stores the value of the maximum recorded jitter between interrupts. */
|
||||
volatile unsigned portLONG ulMaxJitter = 0UL;
|
||||
volatile unsigned long ulMaxJitter = 0UL;
|
||||
|
||||
/* Counts the total number of times that the high frequency timer has 'ticked'.
|
||||
This value is used by the run time stats function to work out what percentage
|
||||
of CPU time each task is taking. */
|
||||
volatile unsigned portLONG ulHighFrequencyTimerTicks = 0UL;
|
||||
volatile unsigned long ulHighFrequencyTimerTicks = 0UL;
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vSetupHighFrequencyTimer( void )
|
||||
|
@ -139,9 +139,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,16 +105,16 @@ 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 unsigned portCHAR ucRxBuffers[ emacNUM_RX_BUFFERS ][ UIP_BUFSIZE + ( 4 * emacFRAM_SIZE_BYTES ) ];
|
||||
static unsigned char ucRxBuffers[ emacNUM_RX_BUFFERS ][ UIP_BUFSIZE + ( 4 * emacFRAM_SIZE_BYTES ) ];
|
||||
|
||||
/* 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;
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
|
@ -190,7 +190,7 @@ void vInitialiseSend( void )
|
|||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vIncrementTxLength( unsigned portLONG ulLength )
|
||||
void vIncrementTxLength( unsigned long ulLength )
|
||||
{
|
||||
ulNextTxSpace += ulLength;
|
||||
}
|
||||
|
@ -199,11 +199,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--;
|
||||
|
@ -215,9 +215,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++;
|
||||
|
@ -231,7 +231,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 );
|
||||
|
@ -252,9 +252,9 @@ unsigned portLONG ulTemp;
|
|||
void vMACHandleTask( void *pvParameters )
|
||||
{
|
||||
unsigned long ulLen = 0, i;
|
||||
unsigned portLONG ulLength, ulInt;
|
||||
unsigned long ulLength, ulInt;
|
||||
unsigned long *pulBuffer;
|
||||
static unsigned portLONG ulNextRxBuffer = 0;
|
||||
static unsigned long ulNextRxBuffer = 0;
|
||||
portBASE_TYPE xSwitchRequired = pdFALSE;
|
||||
|
||||
for( ;; )
|
||||
|
@ -286,7 +286,7 @@ portBASE_TYPE xSwitchRequired = pdFALSE;
|
|||
}
|
||||
|
||||
/* 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++;
|
||||
|
|
|
@ -258,7 +258,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;
|
||||
|
||||
|
@ -286,10 +286,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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue