mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-09-02 12:24:07 -04:00
Remove unnecessary use of portLONG, portCHAR and portSHORT.
Change version number in headers.
This commit is contained in:
parent
4322b8d649
commit
23a5a73219
59 changed files with 2136 additions and 2087 deletions
|
@ -69,10 +69,10 @@
|
|||
#define configUSE_PREEMPTION 1
|
||||
#define configUSE_IDLE_HOOK 0
|
||||
#define configUSE_TICK_HOOK 0
|
||||
#define configCPU_CLOCK_HZ ( ( unsigned portLONG ) 25000000 )
|
||||
#define configCPU_CLOCK_HZ ( ( unsigned long ) 25000000 )
|
||||
#define configTICK_RATE_HZ ( ( portTickType ) 1000 )
|
||||
#define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 5 )
|
||||
#define configMINIMAL_STACK_SIZE ( ( unsigned portSHORT ) 128 )
|
||||
#define configMINIMAL_STACK_SIZE ( ( unsigned short ) 128 )
|
||||
#define configMAX_TASK_NAME_LEN ( 16 )
|
||||
#define configUSE_TRACE_FACILITY 1
|
||||
#define configUSE_16_BIT_TICKS 0
|
||||
|
|
|
@ -80,7 +80,7 @@
|
|||
#include "flop.h"
|
||||
|
||||
/* ------------------------ Defines --------------------------------------- */
|
||||
#define mainCOM_TEST_BAUD_RATE ( ( unsigned portLONG ) 38400 )
|
||||
#define mainCOM_TEST_BAUD_RATE ( ( unsigned long ) 38400 )
|
||||
|
||||
/* Priorities for the demo application tasks. */
|
||||
#define mainLED_TASK_PRIORITY ( tskIDLE_PRIORITY + 3 )
|
||||
|
@ -96,7 +96,7 @@
|
|||
#define mainCHECK_PERIOD ( ( portTickType ) 2000 / portTICK_RATE_MS )
|
||||
|
||||
/* Constants used by the vMemCheckTask() task. */
|
||||
#define mainCOUNT_INITIAL_VALUE ( ( unsigned portLONG ) 0 )
|
||||
#define mainCOUNT_INITIAL_VALUE ( ( unsigned long ) 0 )
|
||||
#define mainNO_TASK ( 0 )
|
||||
|
||||
/* The size of the memory blocks allocated by the vMemCheckTask() task. */
|
||||
|
@ -109,7 +109,7 @@ xComPortHandle xSTDComPort = NULL;
|
|||
|
||||
/* ------------------------ Static functions ------------------------------ */
|
||||
static portTASK_FUNCTION( vErrorChecks, pvParameters );
|
||||
static portLONG prvCheckOtherTasksAreStillRunning( unsigned portLONG
|
||||
static long prvCheckOtherTasksAreStillRunning( unsigned long
|
||||
ulMemCheckTaskCount );
|
||||
static portTASK_FUNCTION( vMemCheckTask, pvParameters );
|
||||
|
||||
|
@ -134,7 +134,7 @@ main( int argc, char *argv[] )
|
|||
( void )sys_thread_new( vBasicWEBServer, NULL, mainWEB_TASK_PRIORITY );
|
||||
|
||||
/* Start the check task - which is defined in this file. */
|
||||
xTaskCreate( vErrorChecks, ( signed portCHAR * )"Check", 512, NULL,
|
||||
xTaskCreate( vErrorChecks, ( signed char * )"Check", 512, NULL,
|
||||
mainCHECK_TASK_PRIORITY, NULL );
|
||||
/* Now all the tasks have been started - start the scheduler. */
|
||||
vTaskStartScheduler( );
|
||||
|
@ -146,7 +146,7 @@ main( int argc, char *argv[] )
|
|||
static
|
||||
portTASK_FUNCTION( vErrorChecks, pvParameters )
|
||||
{
|
||||
unsigned portLONG ulMemCheckTaskRunningCount;
|
||||
unsigned long ulMemCheckTaskRunningCount;
|
||||
xTaskHandle xCreatedTask;
|
||||
|
||||
/* The parameters are not used in this function. */
|
||||
|
@ -156,7 +156,7 @@ portTASK_FUNCTION( vErrorChecks, pvParameters )
|
|||
{
|
||||
ulMemCheckTaskRunningCount = mainCOUNT_INITIAL_VALUE;
|
||||
xCreatedTask = mainNO_TASK;
|
||||
if( xTaskCreate( vMemCheckTask, ( signed portCHAR * )"MEM",
|
||||
if( xTaskCreate( vMemCheckTask, ( signed char * )"MEM",
|
||||
configMINIMAL_STACK_SIZE, ( void * )&ulMemCheckTaskRunningCount,
|
||||
tskIDLE_PRIORITY, &xCreatedTask ) != pdPASS )
|
||||
{
|
||||
|
@ -182,10 +182,10 @@ portTASK_FUNCTION( vErrorChecks, pvParameters )
|
|||
}
|
||||
}
|
||||
|
||||
static portLONG
|
||||
prvCheckOtherTasksAreStillRunning( unsigned portLONG ulMemCheckTaskCount )
|
||||
static long
|
||||
prvCheckOtherTasksAreStillRunning( unsigned long ulMemCheckTaskCount )
|
||||
{
|
||||
portLONG lReturn = ( portLONG ) pdPASS;
|
||||
long lReturn = ( long ) pdPASS;
|
||||
|
||||
/* Check all the demo tasks (other than the flash tasks) to ensure
|
||||
* that they are all still running, and that none of them have detected
|
||||
|
@ -193,27 +193,27 @@ prvCheckOtherTasksAreStillRunning( unsigned portLONG ulMemCheckTaskCount )
|
|||
*/
|
||||
if( xAreIntegerMathsTaskStillRunning( ) != pdTRUE )
|
||||
{
|
||||
lReturn = ( portLONG ) pdFAIL;
|
||||
lReturn = ( long ) pdFAIL;
|
||||
}
|
||||
|
||||
if( xArePollingQueuesStillRunning( ) != pdTRUE )
|
||||
{
|
||||
lReturn = ( portLONG ) pdFAIL;
|
||||
lReturn = ( long ) pdFAIL;
|
||||
}
|
||||
|
||||
if( xAreSemaphoreTasksStillRunning( ) != pdTRUE )
|
||||
{
|
||||
lReturn = ( portLONG ) pdFAIL;
|
||||
lReturn = ( long ) pdFAIL;
|
||||
}
|
||||
|
||||
if( xAreDynamicPriorityTasksStillRunning( ) != pdTRUE )
|
||||
{
|
||||
lReturn = ( portLONG ) pdFAIL;
|
||||
lReturn = ( long ) pdFAIL;
|
||||
}
|
||||
|
||||
if( xAreBlockingQueuesStillRunning( ) != pdTRUE )
|
||||
{
|
||||
lReturn = ( portLONG ) pdFAIL;
|
||||
lReturn = ( long ) pdFAIL;
|
||||
}
|
||||
|
||||
if( ulMemCheckTaskCount == mainCOUNT_INITIAL_VALUE )
|
||||
|
@ -221,7 +221,7 @@ prvCheckOtherTasksAreStillRunning( unsigned portLONG ulMemCheckTaskCount )
|
|||
/* The vMemCheckTask did not increment the counter - it must
|
||||
* have failed.
|
||||
*/
|
||||
lReturn = ( portLONG ) pdFAIL;
|
||||
lReturn = ( long ) pdFAIL;
|
||||
}
|
||||
return lReturn;
|
||||
}
|
||||
|
@ -229,9 +229,9 @@ prvCheckOtherTasksAreStillRunning( unsigned portLONG ulMemCheckTaskCount )
|
|||
static void
|
||||
vMemCheckTask( void *pvParameters )
|
||||
{
|
||||
unsigned portLONG *pulMemCheckTaskRunningCounter;
|
||||
unsigned long *pulMemCheckTaskRunningCounter;
|
||||
void *pvMem1, *pvMem2, *pvMem3;
|
||||
static portLONG lErrorOccurred = pdFALSE;
|
||||
static long lErrorOccurred = pdFALSE;
|
||||
|
||||
/* This task is dynamically created then deleted during each cycle of the
|
||||
vErrorChecks task to check the operation of the memory allocator. Each time
|
||||
|
@ -244,7 +244,7 @@ vMemCheckTask( void *pvParameters )
|
|||
pulMemCheckTaskRunningCounter is incremented each cycle to indicate to the
|
||||
vErrorChecks() task that this task is still executing without error. */
|
||||
|
||||
pulMemCheckTaskRunningCounter = ( unsigned portLONG * )pvParameters;
|
||||
pulMemCheckTaskRunningCounter = ( unsigned long * )pvParameters;
|
||||
|
||||
for( ;; )
|
||||
{
|
||||
|
|
|
@ -60,7 +60,7 @@
|
|||
#define MS_TO_TICKS( ms ) \
|
||||
( portTickType )( ( portTickType ) ( ms ) / portTICK_RATE_MS )
|
||||
#define TICKS_TO_MS( ticks ) \
|
||||
( unsigned portLONG )( ( portTickType ) ( ticks ) * portTICK_RATE_MS )
|
||||
( unsigned long )( ( portTickType ) ( ticks ) * portTICK_RATE_MS )
|
||||
#define THREAD_STACK_SIZE ( 1024 )
|
||||
#define THREAD_NAME "lwIP"
|
||||
|
||||
|
|
|
@ -62,8 +62,8 @@
|
|||
|
||||
/* ------------------------ Prototypes ------------------------------------ */
|
||||
void vSerialPutStringNOISR( xComPortHandle pxPort,
|
||||
const signed portCHAR * const pcString,
|
||||
unsigned portSHORT usStringLength );
|
||||
const signed char * const pcString,
|
||||
unsigned short usStringLength );
|
||||
|
||||
/* ------------------------ Start implementation -------------------------- */
|
||||
void
|
||||
|
@ -109,13 +109,13 @@ write( int fd, const void *buf, size_t nbytes )
|
|||
{
|
||||
case STDERR_FILENO:
|
||||
vSerialPutStringNOISR( xSTDComPort,
|
||||
( const signed portCHAR * const )buf,
|
||||
( unsigned portSHORT )nbytes );
|
||||
( const signed char * const )buf,
|
||||
( unsigned short )nbytes );
|
||||
break;
|
||||
case STDOUT_FILENO:
|
||||
vSerialPutString( xSTDComPort,
|
||||
( const signed portCHAR * const)buf,
|
||||
( unsigned portSHORT )nbytes );
|
||||
( const signed char * const)buf,
|
||||
( unsigned short )nbytes );
|
||||
break;
|
||||
default:
|
||||
errno = EIO;
|
||||
|
|
|
@ -82,7 +82,7 @@ static xComPortIF_t xComPortIF[ COM_NIFACE ];
|
|||
|
||||
/* ------------------------ Begin implementation -------------------------- */
|
||||
xComPortHandle
|
||||
xSerialPortInitMinimal( unsigned portLONG ulWantedBaud,
|
||||
xSerialPortInitMinimal( unsigned long ulWantedBaud,
|
||||
unsigned portBASE_TYPE uxQueueLength )
|
||||
{
|
||||
extern void ( *__RAMVEC[] ) ( );
|
||||
|
@ -91,9 +91,9 @@ xSerialPortInitMinimal( unsigned portLONG ulWantedBaud,
|
|||
|
||||
/* Create the queues used to hold Rx and Tx characters. */
|
||||
xComPortIF[ 0 ].xRXChars =
|
||||
xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE )sizeof( signed portCHAR ) );
|
||||
xQueueCreate( uxQueueLength, ( unsigned portBASE_TYPE )sizeof( signed char ) );
|
||||
xComPortIF[ 0 ].xTXChars =
|
||||
xQueueCreate( uxQueueLength + 1, ( unsigned portBASE_TYPE )sizeof( signed portCHAR ) );
|
||||
xQueueCreate( uxQueueLength + 1, ( unsigned portBASE_TYPE )sizeof( signed char ) );
|
||||
|
||||
/* If the queues were created correctly then setup the serial port hardware. */
|
||||
if( ( xComPortIF[ 0 ].xRXChars != 0 ) && ( xComPortIF[ 0 ].xTXChars != 0 ) )
|
||||
|
@ -144,7 +144,7 @@ xSerialPortInitMinimal( unsigned portLONG ulWantedBaud,
|
|||
}
|
||||
|
||||
signed portBASE_TYPE
|
||||
xSerialGetChar( xComPortHandle pxPort, signed portCHAR * pcRxedChar,
|
||||
xSerialGetChar( xComPortHandle pxPort, signed char * pcRxedChar,
|
||||
portTickType xBlockTime )
|
||||
{
|
||||
int i;
|
||||
|
@ -172,14 +172,14 @@ xSerialGetChar( xComPortHandle pxPort, signed portCHAR * pcRxedChar,
|
|||
}
|
||||
|
||||
void
|
||||
vSerialPutString( xComPortHandle pxPort, const signed portCHAR *
|
||||
const pcString, unsigned portSHORT usStringLength )
|
||||
vSerialPutString( xComPortHandle pxPort, const signed char *
|
||||
const pcString, unsigned short usStringLength )
|
||||
{
|
||||
int i;
|
||||
signed portCHAR *pChNext;
|
||||
signed char *pChNext;
|
||||
|
||||
/* Send each character in the string, one at a time. */
|
||||
pChNext = ( signed portCHAR * )pcString;
|
||||
pChNext = ( signed char * )pcString;
|
||||
for( i = 0; i < usStringLength; i++ )
|
||||
{
|
||||
/* Block until character has been transmitted. */
|
||||
|
@ -188,7 +188,7 @@ vSerialPutString( xComPortHandle pxPort, const signed portCHAR *
|
|||
}
|
||||
|
||||
signed portBASE_TYPE
|
||||
xSerialPutChar( xComPortHandle pxPort, signed portCHAR cOutChar,
|
||||
xSerialPutChar( xComPortHandle pxPort, signed char cOutChar,
|
||||
portTickType xBlockTime )
|
||||
{
|
||||
int i;
|
||||
|
@ -218,7 +218,7 @@ xSerialPutChar( xComPortHandle pxPort, signed portCHAR cOutChar,
|
|||
}
|
||||
|
||||
signed portBASE_TYPE
|
||||
xSerialPutCharNOISR( xComPortHandle pxPort, signed portCHAR cOutChar )
|
||||
xSerialPutCharNOISR( xComPortHandle pxPort, signed char cOutChar )
|
||||
{
|
||||
int i;
|
||||
portBASE_TYPE xResult = pdFALSE;
|
||||
|
@ -245,15 +245,15 @@ xSerialPutCharNOISR( xComPortHandle pxPort, signed portCHAR cOutChar )
|
|||
}
|
||||
|
||||
void
|
||||
vSerialPutStringNOISR( xComPortHandle pxPort, const signed portCHAR *
|
||||
const pcString, unsigned portSHORT usStringLength )
|
||||
vSerialPutStringNOISR( xComPortHandle pxPort, const signed char *
|
||||
const pcString, unsigned short usStringLength )
|
||||
{
|
||||
int i;
|
||||
signed portCHAR *pChNext;
|
||||
signed char *pChNext;
|
||||
portBASE_TYPE xOldIPL = portSET_IPL( portIPL_MAX );
|
||||
|
||||
/* Send each character in the string, one at a time. */
|
||||
pChNext = ( signed portCHAR * )pcString;
|
||||
pChNext = ( signed char * )pcString;
|
||||
for( i = 0; i < usStringLength; i++ )
|
||||
{
|
||||
/* Block until character has been transmitted. */
|
||||
|
@ -272,7 +272,7 @@ vSerialClose( xComPortHandle xPort )
|
|||
void
|
||||
prvSerialISR( void )
|
||||
{
|
||||
static signed portCHAR cChar;
|
||||
static signed char cChar;
|
||||
static portBASE_TYPE xHigherPriorityTaskWoken;
|
||||
|
||||
/* We have to remvoe the effect of the GCC. Please note that the
|
||||
|
|
|
@ -126,11 +126,11 @@ static void vProcessConnection( struct netconn *pxNetCon );
|
|||
static void
|
||||
vProcessConnection( struct netconn *pxNetCon )
|
||||
{
|
||||
static portCHAR cDynamicPage[webMAX_PAGE_SIZE], cPageHits[11];
|
||||
static char cDynamicPage[webMAX_PAGE_SIZE], cPageHits[11];
|
||||
struct netbuf *pxRxBuffer;
|
||||
portCHAR *pcRxString;
|
||||
unsigned portSHORT usLength;
|
||||
static unsigned portLONG ulPageHits = 0;
|
||||
char *pcRxString;
|
||||
unsigned short usLength;
|
||||
static unsigned long ulPageHits = 0;
|
||||
|
||||
/* We expect to immediately get data. */
|
||||
pxRxBuffer = netconn_recv( pxNetCon );
|
||||
|
@ -161,7 +161,7 @@ vProcessConnection( struct netconn *pxNetCon )
|
|||
strcat( cDynamicPage,
|
||||
"<p><pre>Task State Priority Stack #<br>************************************************<br>" );
|
||||
/* ... Then the list of tasks and their status... */
|
||||
vTaskList( ( signed portCHAR * )cDynamicPage + strlen( cDynamicPage ) );
|
||||
vTaskList( ( signed char * )cDynamicPage + strlen( cDynamicPage ) );
|
||||
/* ... Finally the page footer. */
|
||||
strcat( cDynamicPage, webHTML_END );
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue