From b254c7a9d4ad1859162633843c84ce2a0e6cba44 Mon Sep 17 00:00:00 2001 From: rtel Date: Fri, 20 Jun 2014 20:15:20 +0000 Subject: [PATCH] Update FreeRTOS+ components and demos to use typedef names introduced in FreeRTOS V8. git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@2266 1d2547de-c912-0410-9cb9-b8ca96c0e9e2 --- .../File-Related-CLI-commands.c | 36 +++++------ .../Sample-CLI-commands.c | 30 ++++----- .../UARTCommandConsole.c | 2 +- .../UDP-Related-CLI-commands.c | 22 +++---- .../CreateExampleFiles/File-system-demo.c | 8 +-- .../CLICommands/CLI-commands.c | 52 ++++++++-------- .../CLICommands/UDPCommandInterpreter.h | 2 +- .../CLICommands/UDPCommandServer.c | 4 +- .../EchoClients/TwoEchoClients.c | 10 +-- .../EchoClients/TwoEchoClients.h | 2 +- .../TraceMacros/Example1/DemoIPTrace.c | 8 +-- .../TraceMacros/Example1/DemoIPTrace.h | 2 +- .../CLI-commands.c | 30 ++++----- .../FreeRTOSConfig.h | 2 +- .../UDPCommandServer.c | 2 +- .../main.c | 2 +- .../FreeRTOSConfig.h | 2 +- .../SecureTCPClientTask.c | 2 +- .../SecureTCPServerTask.c | 2 +- .../ConfigurationFiles/FreeRTOSConfig.h | 2 +- .../File-Releated-CLI-commands.c | 42 ++++++------- .../File-system-demo.c | 8 +-- .../Sample-CLI-commands.c | 30 ++++----- .../UDPCommandServer.c | 2 +- .../main.c | 2 +- .../CLI-commands.c | 52 ++++++++-------- .../Examples/USB_CDC/CDCCommandConsole.c | 6 +- .../Examples/include/CDCCommandConsole.h | 2 +- .../Examples/include/TwoEchoClients.h | 2 +- .../main.c | 2 +- .../DemoTasks/SelectServer.c | 8 +-- .../DemoTasks/SimpleClientAndServer.c | 16 ++--- .../DemoTasks/UDPCommandServer.c | 4 +- .../DemoTasks/include/SelectServer.h | 2 +- .../DemoTasks/include/SimpleClientAndServer.h | 2 +- .../DemoTasks/include/UDPCommandInterpreter.h | 2 +- .../FreeRTOSConfig.h | 4 +- .../WinPCap/arch.c | 8 +-- .../WinPCap/netif.h | 4 +- .../main.c | 2 +- .../Source/FreeRTOS-Plus-CLI/FreeRTOS_CLI.c | 20 +++--- .../Source/FreeRTOS-Plus-CLI/FreeRTOS_CLI.h | 8 +-- .../Include/trcKernelPort.h | 4 +- .../FreeRTOS-Plus-Trace/trcKernelPort.c | 2 +- .../Source/FreeRTOS-Plus-UDP/FreeRTOS_DHCP.c | 22 +++---- .../Source/FreeRTOS-Plus-UDP/FreeRTOS_DNS.c | 10 +-- .../FreeRTOS-Plus-UDP/FreeRTOS_Sockets.c | 62 +++++++++---------- .../FreeRTOS-Plus-UDP/FreeRTOS_UDP_IP.c | 48 +++++++------- .../FreeRTOS-Plus-UDP/include/FreeRTOS_DHCP.h | 2 +- .../include/FreeRTOS_IP_Private.h | 8 +-- .../include/FreeRTOS_Sockets.h | 16 ++--- .../include/FreeRTOS_UDP_IP.h | 8 +-- .../include/NetworkBufferManagement.h | 6 +- .../include/NetworkInterface.h | 4 +- .../BufferManagement/BufferAllocation_1.c | 18 +++--- .../BufferManagement/BufferAllocation_2.c | 10 +-- .../LPC17xx/NetworkInterface.c | 14 ++--- .../NetworkInterface.c | 14 ++--- .../lpc18xx_emac.c | 12 ++-- .../lpc18xx_emac.h | 6 +- .../Using_LPCOpen_Library/NetworkInterface.c | 14 ++--- .../lpc18xx_43xx_EMAC_LPCOpen.c | 12 ++-- .../lpc18xx_43xx_EMAC_LPCOpen.h | 6 +- .../NetworkInterface/SAM4E/NetworkInterface.c | 18 +++--- .../NetworkInterface/SH2A/NetworkInterface.c | 8 +-- .../WinPCap/NetworkInterface.c | 16 ++--- 66 files changed, 395 insertions(+), 395 deletions(-) diff --git a/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_CLI_Demos/File-Related-CLI-commands.c b/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_CLI_Demos/File-Related-CLI-commands.c index 12950cc21..097ae3c88 100644 --- a/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_CLI_Demos/File-Related-CLI-commands.c +++ b/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_CLI_Demos/File-Related-CLI-commands.c @@ -100,7 +100,7 @@ static void prvCreateFileInfoString( char *pcBuffer, F_FIND *pxFindStruct ); /* * Copies an existing file into a newly created file. */ -static portBASE_TYPE prvPerformCopy( const char *pcSourceFile, +static BaseType_t prvPerformCopy( const char *pcSourceFile, int32_t lSourceFileLength, const char *pcDestinationFile, char *pxWriteBuffer, @@ -109,27 +109,27 @@ static portBASE_TYPE prvPerformCopy( const char *pcSourceFile, /* * Implements the DIR command. */ -static portBASE_TYPE prvDIRCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ); +static BaseType_t prvDIRCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ); /* * Implements the CD command. */ -static portBASE_TYPE prvCDCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ); +static BaseType_t prvCDCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ); /* * Implements the DEL command. */ -static portBASE_TYPE prvDELCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ); +static BaseType_t prvDELCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ); /* * Implements the TYPE command. */ -static portBASE_TYPE prvTYPECommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ); +static BaseType_t prvTYPECommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ); /* * Implements the COPY command. */ -static portBASE_TYPE prvCOPYCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ); +static BaseType_t prvCOPYCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ); /* Structure that defines the DIR command line command, which lists all the files in the current directory. */ @@ -193,10 +193,10 @@ void vRegisterFileSystemCLICommands( void ) } /*-----------------------------------------------------------*/ -static portBASE_TYPE prvTYPECommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ) +static BaseType_t prvTYPECommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ) { const char *pcParameter; -portBASE_TYPE xParameterStringLength, xReturn = pdTRUE; +BaseType_t xParameterStringLength, xReturn = pdTRUE; static F_FILE *pxFile = NULL; int iChar; size_t xByte; @@ -267,10 +267,10 @@ size_t xColumns = 50U; } /*-----------------------------------------------------------*/ -static portBASE_TYPE prvCDCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ) +static BaseType_t prvCDCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ) { const char *pcParameter; -portBASE_TYPE xParameterStringLength; +BaseType_t xParameterStringLength; unsigned char ucReturned; size_t xStringLength; @@ -305,11 +305,11 @@ size_t xStringLength; } /*-----------------------------------------------------------*/ -static portBASE_TYPE prvDIRCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ) +static BaseType_t prvDIRCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ) { static F_FIND *pxFindStruct = NULL; unsigned char ucReturned; -portBASE_TYPE xReturn = pdFALSE; +BaseType_t xReturn = pdFALSE; /* This assumes pcWriteBuffer is long enough. */ ( void ) pcCommandString; @@ -371,10 +371,10 @@ portBASE_TYPE xReturn = pdFALSE; } /*-----------------------------------------------------------*/ -static portBASE_TYPE prvDELCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ) +static BaseType_t prvDELCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ) { const char *pcParameter; -portBASE_TYPE xParameterStringLength; +BaseType_t xParameterStringLength; unsigned char ucReturned; /* This function assumes xWriteBufferLen is large enough! */ @@ -409,10 +409,10 @@ unsigned char ucReturned; } /*-----------------------------------------------------------*/ -static portBASE_TYPE prvCOPYCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ) +static BaseType_t prvCOPYCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ) { char *pcSourceFile, *pcDestinationFile; -portBASE_TYPE xParameterStringLength; +BaseType_t xParameterStringLength; long lSourceLength, lDestinationLength = 0; /* Obtain the name of the destination file. */ @@ -478,7 +478,7 @@ long lSourceLength, lDestinationLength = 0; } /*-----------------------------------------------------------*/ -static portBASE_TYPE prvPerformCopy( const char *pcSourceFile, +static BaseType_t prvPerformCopy( const char *pcSourceFile, int32_t lSourceFileLength, const char *pcDestinationFile, char *pxWriteBuffer, @@ -486,7 +486,7 @@ static portBASE_TYPE prvPerformCopy( const char *pcSourceFile, { int32_t lBytesRead = 0, lBytesToRead, lBytesRemaining; F_FILE *pxFile; -portBASE_TYPE xReturn = pdPASS; +BaseType_t xReturn = pdPASS; /* NOTE: Error handling has been omitted for clarity. */ diff --git a/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_CLI_Demos/Sample-CLI-commands.c b/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_CLI_Demos/Sample-CLI-commands.c index 2ecec8536..2b3e22157 100644 --- a/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_CLI_Demos/Sample-CLI-commands.c +++ b/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_CLI_Demos/Sample-CLI-commands.c @@ -93,28 +93,28 @@ /* * Implements the task-stats command. */ -static portBASE_TYPE prvTaskStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ); +static BaseType_t prvTaskStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ); /* * Implements the run-time-stats command. */ -static portBASE_TYPE prvRunTimeStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ); +static BaseType_t prvRunTimeStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ); /* * Implements the echo-three-parameters command. */ -static portBASE_TYPE prvThreeParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ); +static BaseType_t prvThreeParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ); /* * Implements the echo-parameters command. */ -static portBASE_TYPE prvParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ); +static BaseType_t prvParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ); /* * Implements the "trace start" and "trace stop" commands; */ #if configINCLUDE_TRACE_RELATED_CLI_COMMANDS == 1 - static portBASE_TYPE prvStartStopTraceCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ); + static BaseType_t prvStartStopTraceCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ); #endif /* Structure that defines the "run-time-stats" command line command. This @@ -189,7 +189,7 @@ void vRegisterSampleCLICommands( void ) } /*-----------------------------------------------------------*/ -static portBASE_TYPE prvTaskStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ) +static BaseType_t prvTaskStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ) { const char *const pcHeader = "Task State Priority Stack #\r\n************************************************\r\n"; @@ -210,7 +210,7 @@ const char *const pcHeader = "Task State Priority Stack #\r\n******** } /*-----------------------------------------------------------*/ -static portBASE_TYPE prvRunTimeStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ) +static BaseType_t prvRunTimeStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ) { const char * const pcHeader = "Task Abs Time % Time\r\n****************************************\r\n"; @@ -231,11 +231,11 @@ const char * const pcHeader = "Task Abs Time % Time\r\n********* } /*-----------------------------------------------------------*/ -static portBASE_TYPE prvThreeParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ) +static BaseType_t prvThreeParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ) { const char *pcParameter; -portBASE_TYPE xParameterStringLength, xReturn; -static portBASE_TYPE lParameterNumber = 0; +BaseType_t xParameterStringLength, xReturn; +static BaseType_t lParameterNumber = 0; /* Remove compile time warnings about unused parameters, and check the write buffer is not NULL. NOTE - for simplicity, this example assumes the @@ -298,11 +298,11 @@ static portBASE_TYPE lParameterNumber = 0; } /*-----------------------------------------------------------*/ -static portBASE_TYPE prvParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ) +static BaseType_t prvParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ) { const char *pcParameter; -portBASE_TYPE xParameterStringLength, xReturn; -static portBASE_TYPE lParameterNumber = 0; +BaseType_t xParameterStringLength, xReturn; +static BaseType_t lParameterNumber = 0; /* Remove compile time warnings about unused parameters, and check the write buffer is not NULL. NOTE - for simplicity, this example assumes the @@ -367,10 +367,10 @@ static portBASE_TYPE lParameterNumber = 0; #if configINCLUDE_TRACE_RELATED_CLI_COMMANDS == 1 - static portBASE_TYPE prvStartStopTraceCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ) + static BaseType_t prvStartStopTraceCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ) { const char *pcParameter; - portBASE_TYPE lParameterStringLength; + BaseType_t lParameterStringLength; /* Remove compile time warnings about unused parameters, and check the write buffer is not NULL. NOTE - for simplicity, this example assumes the diff --git a/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_CLI_Demos/UARTCommandConsole.c b/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_CLI_Demos/UARTCommandConsole.c index 0aa8dc912..cb6080bb0 100644 --- a/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_CLI_Demos/UARTCommandConsole.c +++ b/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_CLI_Demos/UARTCommandConsole.c @@ -138,7 +138,7 @@ signed char cRxedChar; uint8_t ucInputIndex = 0; char *pcOutputString; static char cInputString[ cmdMAX_INPUT_SIZE ], cLastInputString[ cmdMAX_INPUT_SIZE ]; -portBASE_TYPE xReturned; +BaseType_t xReturned; xComPortHandle xPort; ( void ) pvParameters; diff --git a/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_CLI_Demos/UDP-Related-CLI-commands.c b/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_CLI_Demos/UDP-Related-CLI-commands.c index c638d0a87..28bb18c4c 100644 --- a/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_CLI_Demos/UDP-Related-CLI-commands.c +++ b/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_CLI_Demos/UDP-Related-CLI-commands.c @@ -91,17 +91,17 @@ commands. */ /* * Defines a command that prints out IP address information. */ -static portBASE_TYPE prvDisplayIPConfig( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ); +static BaseType_t prvDisplayIPConfig( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ); /* * Defines a command that prints out the gathered demo debug stats. */ -static portBASE_TYPE prvDisplayIPDebugStats( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ); +static BaseType_t prvDisplayIPDebugStats( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ); /* * Defines a command that sends an ICMP ping request to an IP address. */ -static portBASE_TYPE prvPingCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ); +static BaseType_t prvPingCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ); /* Structure that defines the "ip-config" command line command. */ static const CLI_Command_Definition_t xIPConfig = @@ -162,10 +162,10 @@ void vRegisterUDPCLICommands( void ) #if ipconfigSUPPORT_OUTGOING_PINGS == 1 - static portBASE_TYPE prvPingCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ) + static BaseType_t prvPingCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ) { char * pcParameter; - portBASE_TYPE lParameterStringLength, xReturn; + BaseType_t lParameterStringLength, xReturn; uint32_t ulIPAddress, ulBytesToPing; const uint32_t ulDefaultBytesToPing = 8UL; char cBuffer[ 16 ]; @@ -253,11 +253,11 @@ void vRegisterUDPCLICommands( void ) #if configINCLUDE_DEMO_DEBUG_STATS != 0 - static portBASE_TYPE prvDisplayIPDebugStats( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ) + static BaseType_t prvDisplayIPDebugStats( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ) { - static portBASE_TYPE xIndex = -1; + static BaseType_t xIndex = -1; extern xExampleDebugStatEntry_t xIPTraceValues[]; - portBASE_TYPE xReturn; + BaseType_t xReturn; /* Remove compile time warnings about unused parameters, and check the write buffer is not NULL. NOTE - for simplicity, this example assumes the @@ -289,10 +289,10 @@ void vRegisterUDPCLICommands( void ) #endif /* configINCLUDE_DEMO_DEBUG_STATS */ -static portBASE_TYPE prvDisplayIPConfig( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ) +static BaseType_t prvDisplayIPConfig( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ) { -static portBASE_TYPE xIndex = 0; -portBASE_TYPE xReturn; +static BaseType_t xIndex = 0; +BaseType_t xReturn; uint32_t ulAddress; /* Remove compile time warnings about unused parameters, and check the diff --git a/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_FAT_SL_Demos/CreateExampleFiles/File-system-demo.c b/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_FAT_SL_Demos/CreateExampleFiles/File-system-demo.c index 8d1f165b0..2ddcc7052 100644 --- a/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_FAT_SL_Demos/CreateExampleFiles/File-system-demo.c +++ b/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_FAT_SL_Demos/CreateExampleFiles/File-system-demo.c @@ -164,9 +164,9 @@ unsigned char ucStatus; static void prvCreateDemoFilesUsing_f_write( void ) { -portBASE_TYPE xFileNumber, xWriteNumber; +BaseType_t xFileNumber, xWriteNumber; char cFileName[ fsMAX_FILE_NAME_LEN ]; -const portBASE_TYPE xMaxFiles = 5; +const BaseType_t xMaxFiles = 5; long lItemsWritten; F_FILE *pxFile; @@ -207,9 +207,9 @@ F_FILE *pxFile; static void prvVerifyDemoFileUsing_f_read( void ) { -portBASE_TYPE xFileNumber, xReadNumber; +BaseType_t xFileNumber, xReadNumber; char cFileName[ fsMAX_FILE_NAME_LEN ]; -const portBASE_TYPE xMaxFiles = 5; +const BaseType_t xMaxFiles = 5; long lItemsRead, lChar; F_FILE *pxFile; diff --git a/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_UDP_Demos/CLICommands/CLI-commands.c b/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_UDP_Demos/CLICommands/CLI-commands.c index 09ee5905d..a24099335 100644 --- a/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_UDP_Demos/CLICommands/CLI-commands.c +++ b/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_UDP_Demos/CLICommands/CLI-commands.c @@ -96,43 +96,43 @@ commands. */ /* * Implements the run-time-stats command. */ -static portBASE_TYPE prvTaskStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ); +static BaseType_t prvTaskStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ); /* * Implements the task-stats command. */ -static portBASE_TYPE prvRunTimeStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ); +static BaseType_t prvRunTimeStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ); /* * Implements the echo-three-parameters command. */ -static portBASE_TYPE prvThreeParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ); +static BaseType_t prvThreeParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ); /* * Implements the echo-parameters command. */ -static portBASE_TYPE prvParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ); +static BaseType_t prvParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ); /* * Defines a command that prints out IP address information. */ -static portBASE_TYPE prvDisplayIPConfig( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ); +static BaseType_t prvDisplayIPConfig( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ); /* * Defines a command that prints out the gathered demo debug stats. */ -static portBASE_TYPE prvDisplayIPDebugStats( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ); +static BaseType_t prvDisplayIPDebugStats( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ); /* * Defines a command that sends an ICMP ping request to an IP address. */ -static portBASE_TYPE prvPingCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ); +static BaseType_t prvPingCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ); /* * Implements the "trace start" and "trace stop" commands; */ #if configINCLUDE_TRACE_RELATED_CLI_COMMANDS == 1 - static portBASE_TYPE prvStartStopTraceCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ); + static BaseType_t prvStartStopTraceCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ); #endif /* Structure that defines the "ip-config" command line command. */ @@ -248,7 +248,7 @@ void vRegisterCLICommands( void ) } /*-----------------------------------------------------------*/ -static portBASE_TYPE prvTaskStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ) +static BaseType_t prvTaskStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ) { const char *const pcHeader = "Task State Priority Stack #\r\n************************************************\r\n"; @@ -269,7 +269,7 @@ const char *const pcHeader = "Task State Priority Stack #\r\n******** } /*-----------------------------------------------------------*/ -static portBASE_TYPE prvRunTimeStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ) +static BaseType_t prvRunTimeStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ) { const char * const pcHeader = "Task Abs Time % Time\r\n****************************************\r\n"; @@ -290,11 +290,11 @@ const char * const pcHeader = "Task Abs Time % Time\r\n********* } /*-----------------------------------------------------------*/ -static portBASE_TYPE prvThreeParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ) +static BaseType_t prvThreeParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ) { const char *pcParameter; -portBASE_TYPE xParameterStringLength, xReturn; -static portBASE_TYPE lParameterNumber = 0; +BaseType_t xParameterStringLength, xReturn; +static BaseType_t lParameterNumber = 0; /* Remove compile time warnings about unused parameters, and check the write buffer is not NULL. NOTE - for simplicity, this example assumes the @@ -357,11 +357,11 @@ static portBASE_TYPE lParameterNumber = 0; } /*-----------------------------------------------------------*/ -static portBASE_TYPE prvParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ) +static BaseType_t prvParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ) { const char *pcParameter; -portBASE_TYPE xParameterStringLength, xReturn; -static portBASE_TYPE lParameterNumber = 0; +BaseType_t xParameterStringLength, xReturn; +static BaseType_t lParameterNumber = 0; /* Remove compile time warnings about unused parameters, and check the write buffer is not NULL. NOTE - for simplicity, this example assumes the @@ -426,10 +426,10 @@ static portBASE_TYPE lParameterNumber = 0; #if ipconfigSUPPORT_OUTGOING_PINGS == 1 - static portBASE_TYPE prvPingCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ) + static BaseType_t prvPingCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ) { char * pcParameter; - portBASE_TYPE lParameterStringLength, xReturn; + BaseType_t lParameterStringLength, xReturn; uint32_t ulIPAddress, ulBytesToPing; const uint32_t ulDefaultBytesToPing = 8UL; char cBuffer[ 16 ]; @@ -517,11 +517,11 @@ static portBASE_TYPE lParameterNumber = 0; #if configINCLUDE_DEMO_DEBUG_STATS != 0 - static portBASE_TYPE prvDisplayIPDebugStats( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ) + static BaseType_t prvDisplayIPDebugStats( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ) { - static portBASE_TYPE xIndex = -1; + static BaseType_t xIndex = -1; extern xExampleDebugStatEntry_t xIPTraceValues[]; - portBASE_TYPE xReturn; + BaseType_t xReturn; /* Remove compile time warnings about unused parameters, and check the write buffer is not NULL. NOTE - for simplicity, this example assumes the @@ -553,10 +553,10 @@ static portBASE_TYPE lParameterNumber = 0; #endif /* configINCLUDE_DEMO_DEBUG_STATS */ -static portBASE_TYPE prvDisplayIPConfig( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ) +static BaseType_t prvDisplayIPConfig( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ) { -static portBASE_TYPE xIndex = 0; -portBASE_TYPE xReturn; +static BaseType_t xIndex = 0; +BaseType_t xReturn; uint32_t ulAddress; /* Remove compile time warnings about unused parameters, and check the @@ -615,10 +615,10 @@ uint32_t ulAddress; #if configINCLUDE_TRACE_RELATED_CLI_COMMANDS == 1 - static portBASE_TYPE prvStartStopTraceCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ) + static BaseType_t prvStartStopTraceCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ) { const char *pcParameter; - portBASE_TYPE lParameterStringLength; + BaseType_t lParameterStringLength; /* Remove compile time warnings about unused parameters, and check the write buffer is not NULL. NOTE - for simplicity, this example assumes the diff --git a/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_UDP_Demos/CLICommands/UDPCommandInterpreter.h b/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_UDP_Demos/CLICommands/UDPCommandInterpreter.h index 164a5d3a8..179343beb 100644 --- a/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_UDP_Demos/CLICommands/UDPCommandInterpreter.h +++ b/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_UDP_Demos/CLICommands/UDPCommandInterpreter.h @@ -66,6 +66,6 @@ #ifndef UDP_COMMAND_INTERPRETER_H #define UDP_COMMAND_INTERPRETER_H -void vStartUDPCommandInterpreterTask( uint16_t usStackSize, uint32_t ulPort, unsigned portBASE_TYPE uxPriority ); +void vStartUDPCommandInterpreterTask( uint16_t usStackSize, uint32_t ulPort, UBaseType_t uxPriority ); #endif /* UDP_COMMAND_INTERPRETER_H */ diff --git a/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_UDP_Demos/CLICommands/UDPCommandServer.c b/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_UDP_Demos/CLICommands/UDPCommandServer.c index b8c582906..4136fde33 100644 --- a/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_UDP_Demos/CLICommands/UDPCommandServer.c +++ b/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_UDP_Demos/CLICommands/UDPCommandServer.c @@ -102,7 +102,7 @@ static xSocket_t prvOpenUDPServerSocket( uint16_t usPort ); /*-----------------------------------------------------------*/ -void vStartUDPCommandInterpreterTask( uint16_t usStackSize, uint32_t ulPort, unsigned portBASE_TYPE uxPriority ) +void vStartUDPCommandInterpreterTask( uint16_t usStackSize, uint32_t ulPort, UBaseType_t uxPriority ) { xTaskCreate( vUDPCommandInterpreterTask, "CLI", usStackSize, ( void * ) ulPort, uxPriority, NULL ); } @@ -118,7 +118,7 @@ void vUDPCommandInterpreterTask( void *pvParameters ) long lBytes, lByte; signed char cInChar, cInputIndex = 0; static char cInputString[ cmdMAX_INPUT_SIZE ], cOutputString[ cmdMAX_OUTPUT_SIZE ], cLocalBuffer[ cmdSOCKET_INPUT_BUFFER_SIZE ]; -portBASE_TYPE xMoreDataToFollow; +BaseType_t xMoreDataToFollow; struct freertos_sockaddr xClient; socklen_t xClientAddressLength = 0; /* This is required as a parameter to maintain the sendto() Berkeley sockets API - but it is not actually used so can take any value. */ xSocket_t xSocket; diff --git a/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_UDP_Demos/EchoClients/TwoEchoClients.c b/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_UDP_Demos/EchoClients/TwoEchoClients.c index e5eb00ae5..269ed4677 100644 --- a/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_UDP_Demos/EchoClients/TwoEchoClients.c +++ b/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_UDP_Demos/EchoClients/TwoEchoClients.c @@ -87,13 +87,13 @@ #include "FreeRTOS_Sockets.h" /* Small delay used between attempts to obtain a zero copy buffer. */ -#define echoTINY_DELAY ( ( portTickType ) 2 ) +#define echoTINY_DELAY ( ( TickType_t ) 2 ) /* The echo tasks create a socket, send out a number of echo requests (listening for each echo reply), then close the socket again before starting over. This delay is used between each iteration to ensure the network does not get too congested. */ -#define echoLOOP_DELAY ( ( portTickType ) 250 / portTICK_RATE_MS ) +#define echoLOOP_DELAY ( ( TickType_t ) 250 / portTICK_RATE_MS ) #if ipconfigINCLUDE_EXAMPLE_FREERTOS_PLUS_TRACE_CALLS == 1 /* When the trace recorder code is included user events are generated to @@ -125,14 +125,14 @@ static void prvZeroCopyEchoClientTask( void *pvParameters ); /* The receive timeout is set shorter when the windows simulator is used because simulated time is slower than real time. */ #ifdef _WINDOWS_ - const portTickType xReceiveTimeOut = 50 / portTICK_RATE_MS; + const TickType_t xReceiveTimeOut = 50 / portTICK_RATE_MS; #else - const portTickType xReceiveTimeOut = 500 / portTICK_RATE_MS; + const TickType_t xReceiveTimeOut = 500 / portTICK_RATE_MS; #endif /*-----------------------------------------------------------*/ -void vStartEchoClientTasks( uint16_t usTaskStackSize, unsigned portBASE_TYPE uxTaskPriority ) +void vStartEchoClientTasks( uint16_t usTaskStackSize, UBaseType_t uxTaskPriority ) { /* Create the echo client task that does not use the zero copy interface. */ xTaskCreate( prvEchoClientTask, /* The function that implements the task. */ diff --git a/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_UDP_Demos/EchoClients/TwoEchoClients.h b/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_UDP_Demos/EchoClients/TwoEchoClients.h index c69748d29..4627df769 100644 --- a/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_UDP_Demos/EchoClients/TwoEchoClients.h +++ b/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_UDP_Demos/EchoClients/TwoEchoClients.h @@ -71,6 +71,6 @@ * to send to and receive from an echo server. The other task uses the zero * copy interface to send to and receive from an echo server. */ -void vStartEchoClientTasks( uint16_t usTaskStackSize, unsigned portBASE_TYPE uxTaskPriority ); +void vStartEchoClientTasks( uint16_t usTaskStackSize, UBaseType_t uxTaskPriority ); #endif /* TWO_ECHO_CLIENTS_H */ diff --git a/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_UDP_Demos/TraceMacros/Example1/DemoIPTrace.c b/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_UDP_Demos/TraceMacros/Example1/DemoIPTrace.c index 5562279c8..be0743cb1 100644 --- a/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_UDP_Demos/TraceMacros/Example1/DemoIPTrace.c +++ b/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_UDP_Demos/TraceMacros/Example1/DemoIPTrace.c @@ -128,17 +128,17 @@ xExampleDebugStatEntry_t xIPTraceValues[] = /*-----------------------------------------------------------*/ -portBASE_TYPE xExampleDebugStatEntries( void ) +BaseType_t xExampleDebugStatEntries( void ) { /* Return the number of entries in the xIPTraceValues[] table. */ - return ( portBASE_TYPE ) ( sizeof( xIPTraceValues ) / sizeof( xExampleDebugStatEntry_t ) ); + return ( BaseType_t ) ( sizeof( xIPTraceValues ) / sizeof( xExampleDebugStatEntry_t ) ); } /*-----------------------------------------------------------*/ void vExampleDebugStatUpdate( uint8_t ucIdentifier, uint32_t ulValue ) { -portBASE_TYPE xIndex; -const portBASE_TYPE xEntries = sizeof( xIPTraceValues ) / sizeof( xExampleDebugStatEntry_t ); +BaseType_t xIndex; +const BaseType_t xEntries = sizeof( xIPTraceValues ) / sizeof( xExampleDebugStatEntry_t ); /* Update an entry in the xIPTraceValues[] table. Each row in the table includes a pointer to a function that performs the actual update. This diff --git a/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_UDP_Demos/TraceMacros/Example1/DemoIPTrace.h b/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_UDP_Demos/TraceMacros/Example1/DemoIPTrace.h index f4747078f..5c46a2242 100644 --- a/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_UDP_Demos/TraceMacros/Example1/DemoIPTrace.h +++ b/FreeRTOS-Plus/Demo/Common/FreeRTOS_Plus_UDP_Demos/TraceMacros/Example1/DemoIPTrace.h @@ -150,7 +150,7 @@ configINCLUDE_DEMO_DEBUG_STATS setting in FreeRTOSIPConfig.h. */ /* * Returns the number of entries in the xIPTraceValues table. */ - portBASE_TYPE xExampleDebugStatEntries( void ); + BaseType_t xExampleDebugStatEntries( void ); #endif /* configINCLUDE_DEMO_DEBUG_STATS == 1 */ diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_CLI_with_Trace_Windows_Simulator/CLI-commands.c b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_CLI_with_Trace_Windows_Simulator/CLI-commands.c index b67b9e42f..7f2c0a2e8 100644 --- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_CLI_with_Trace_Windows_Simulator/CLI-commands.c +++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_CLI_with_Trace_Windows_Simulator/CLI-commands.c @@ -83,31 +83,31 @@ static void prvSaveTraceFile( void ); * Defines a command that returns a table showing the state of each task at the * time the command is called. */ -static portBASE_TYPE prvTaskStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ); +static BaseType_t prvTaskStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ); /* * Defines a command that returns a table showing how much time each task has * spent in the Running state. */ -static portBASE_TYPE prvRunTimeStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ); +static BaseType_t prvRunTimeStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ); /* * Defines a command that expects exactly three parameters. Each of the three * parameter are echoed back one at a time. */ -static portBASE_TYPE prvThreeParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ); +static BaseType_t prvThreeParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ); /* * Defines a command that can take a variable number of parameters. Each * parameter is echoes back one at a time. */ -static portBASE_TYPE prvParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ); +static BaseType_t prvParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ); /* * Defines a command that starts/stops events being recorded for offline viewing * in FreeRTOS+Trace. */ -static portBASE_TYPE prvStartStopTraceCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ); +static BaseType_t prvStartStopTraceCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ); /* Structure that defines the "run-time-stats" command line command. */ static const CLI_Command_Definition_t xRunTimeStats = @@ -172,7 +172,7 @@ void vRegisterCLICommands( void ) } /*-----------------------------------------------------------*/ -static portBASE_TYPE prvTaskStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ) +static BaseType_t prvTaskStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ) { const char *const pcHeader = "Task State Priority Stack #\r\n************************************************\r\n"; @@ -193,7 +193,7 @@ const char *const pcHeader = "Task State Priority Stack #\r\n******** } /*-----------------------------------------------------------*/ -static portBASE_TYPE prvRunTimeStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ) +static BaseType_t prvRunTimeStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ) { const char * const pcHeader = "Task Abs Time % Time\r\n****************************************\r\n"; @@ -214,11 +214,11 @@ const char * const pcHeader = "Task Abs Time % Time\r\n********* } /*-----------------------------------------------------------*/ -static portBASE_TYPE prvThreeParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ) +static BaseType_t prvThreeParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ) { const char *pcParameter; -portBASE_TYPE lParameterStringLength, xReturn; -static portBASE_TYPE lParameterNumber = 0; +BaseType_t lParameterStringLength, xReturn; +static BaseType_t lParameterNumber = 0; /* Remove compile time warnings about unused parameters, and check the write buffer is not NULL. NOTE - for simplicity, this example assumes the @@ -281,11 +281,11 @@ static portBASE_TYPE lParameterNumber = 0; } /*-----------------------------------------------------------*/ -static portBASE_TYPE prvParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ) +static BaseType_t prvParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ) { const char *pcParameter; -portBASE_TYPE lParameterStringLength, xReturn; -static portBASE_TYPE lParameterNumber = 0; +BaseType_t lParameterStringLength, xReturn; +static BaseType_t lParameterNumber = 0; /* Remove compile time warnings about unused parameters, and check the write buffer is not NULL. NOTE - for simplicity, this example assumes the @@ -348,10 +348,10 @@ static portBASE_TYPE lParameterNumber = 0; } /*-----------------------------------------------------------*/ -static portBASE_TYPE prvStartStopTraceCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ) +static BaseType_t prvStartStopTraceCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ) { const char *pcParameter; -portBASE_TYPE lParameterStringLength; +BaseType_t lParameterStringLength; /* Remove compile time warnings about unused parameters, and check the write buffer is not NULL. NOTE - for simplicity, this example assumes the diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_CLI_with_Trace_Windows_Simulator/FreeRTOSConfig.h b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_CLI_with_Trace_Windows_Simulator/FreeRTOSConfig.h index 1c410ddbc..09cdba940 100644 --- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_CLI_with_Trace_Windows_Simulator/FreeRTOSConfig.h +++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_CLI_with_Trace_Windows_Simulator/FreeRTOSConfig.h @@ -105,7 +105,7 @@ #define configTIMER_QUEUE_LENGTH 20 #define configTIMER_TASK_STACK_DEPTH ( configMINIMAL_STACK_SIZE * 2 ) -#define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 7 ) +#define configMAX_PRIORITIES ( ( UBaseType_t ) 7 ) #define configMAX_CO_ROUTINE_PRIORITIES ( 2 ) diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_CLI_with_Trace_Windows_Simulator/UDPCommandServer.c b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_CLI_with_Trace_Windows_Simulator/UDPCommandServer.c index b5ea20e32..2d25a7fe8 100644 --- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_CLI_with_Trace_Windows_Simulator/UDPCommandServer.c +++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_CLI_with_Trace_Windows_Simulator/UDPCommandServer.c @@ -102,7 +102,7 @@ void vUDPCommandInterpreterTask( void *pvParameters ) long lBytes, lByte; signed char cInChar, cInputIndex = 0; static signed char cInputString[ cmdMAX_INPUT_SIZE ], cOutputString[ cmdMAX_OUTPUT_SIZE ], cLocalBuffer[ cmdSOCKET_INPUT_BUFFER_SIZE ]; -portBASE_TYPE xMoreDataToFollow; +BaseType_t xMoreDataToFollow; volatile int iErrorCode = 0; struct sockaddr_in xClient; int xClientAddressLength = sizeof( struct sockaddr_in ); diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_CLI_with_Trace_Windows_Simulator/main.c b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_CLI_with_Trace_Windows_Simulator/main.c index 7f868b8ca..ec85e634d 100644 --- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_CLI_with_Trace_Windows_Simulator/main.c +++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_CLI_with_Trace_Windows_Simulator/main.c @@ -217,7 +217,7 @@ const uint32_t ulLongTime_ms = 250UL; static void prvQueueSendTask( void *pvParameters ) { -portTickType xNextWakeTime; +TickType_t xNextWakeTime; const unsigned long ulValueToSend = 100UL; /* Remove warning about unused parameters. */ diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_CyaSSL_Windows_Simulator/FreeRTOSConfig.h b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_CyaSSL_Windows_Simulator/FreeRTOSConfig.h index 46e67f027..ab35a584d 100644 --- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_CyaSSL_Windows_Simulator/FreeRTOSConfig.h +++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_CyaSSL_Windows_Simulator/FreeRTOSConfig.h @@ -102,7 +102,7 @@ #define configTIMER_QUEUE_LENGTH 20 #define configTIMER_TASK_STACK_DEPTH ( configMINIMAL_STACK_SIZE * 2 ) -#define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 7 ) +#define configMAX_PRIORITIES ( ( UBaseType_t ) 7 ) #define configMAX_CO_ROUTINE_PRIORITIES ( 2 ) diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_CyaSSL_Windows_Simulator/SecureTCPClientTask.c b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_CyaSSL_Windows_Simulator/SecureTCPClientTask.c index ee346e6a6..e75a1cb65 100644 --- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_CyaSSL_Windows_Simulator/SecureTCPClientTask.c +++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_CyaSSL_Windows_Simulator/SecureTCPClientTask.c @@ -95,7 +95,7 @@ CYASSL* xCyaSSL_Object; WORD wVersionRequested; WSADATA xWSAData; char cString[ 50 ]; -portBASE_TYPE lReturned; +BaseType_t lReturned; uint32_t ulCount = 0UL; /* Remove compiler warning about unused parameters. */ diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_CyaSSL_Windows_Simulator/SecureTCPServerTask.c b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_CyaSSL_Windows_Simulator/SecureTCPServerTask.c index b22697952..f12c9d962 100644 --- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_CyaSSL_Windows_Simulator/SecureTCPServerTask.c +++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_CyaSSL_Windows_Simulator/SecureTCPServerTask.c @@ -117,7 +117,7 @@ static CYASSL_CTX* xCyaSSL_ServerContext = NULL; /* See the comments at the top of main.c. */ void vSecureTCPServerTask( void *pvParameters ) { -portBASE_TYPE xReturned; +BaseType_t xReturned; long lBytes; uint8_t cReceivedString[ 60 ]; struct sockaddr_in xClient; diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_FAT_SL_and_CLI_Windows_Simulator/ConfigurationFiles/FreeRTOSConfig.h b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_FAT_SL_and_CLI_Windows_Simulator/ConfigurationFiles/FreeRTOSConfig.h index 1042d4a35..3ae0702b9 100644 --- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_FAT_SL_and_CLI_Windows_Simulator/ConfigurationFiles/FreeRTOSConfig.h +++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_FAT_SL_and_CLI_Windows_Simulator/ConfigurationFiles/FreeRTOSConfig.h @@ -82,7 +82,7 @@ *----------------------------------------------------------*/ #define configUSE_PREEMPTION 1 -#define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 7 ) +#define configMAX_PRIORITIES ( ( UBaseType_t ) 7 ) #define configTICK_RATE_HZ ( 1000 ) /* In this non-real time simulated environment the tick frequency has to be at least a multiple of the Win32 tick frequency, and therefore very slow. */ #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 60 ) /* In this simulated case, the stack only has to hold one small structure as the real stack is part of the Win32 thread. */ #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 32U * 1024U ) ) diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_FAT_SL_and_CLI_Windows_Simulator/File-Releated-CLI-commands.c b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_FAT_SL_and_CLI_Windows_Simulator/File-Releated-CLI-commands.c index 1ea3370a2..eecaa60dc 100644 --- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_FAT_SL_and_CLI_Windows_Simulator/File-Releated-CLI-commands.c +++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_FAT_SL_and_CLI_Windows_Simulator/File-Releated-CLI-commands.c @@ -99,7 +99,7 @@ static void prvCreateFileInfoString( char *pcBuffer, F_FIND *pxFindStruct ); /* * Copies an existing file into a newly created file. */ -static portBASE_TYPE prvPerformCopy( const char *pcSourceFile, +static BaseType_t prvPerformCopy( const char *pcSourceFile, int32_t lSourceFileLength, const char *pcDestinationFile, char *pxWriteBuffer, @@ -108,32 +108,32 @@ static portBASE_TYPE prvPerformCopy( const char *pcSourceFile, /* * Implements the DIR command. */ -static portBASE_TYPE prvDIRCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ); +static BaseType_t prvDIRCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ); /* * Implements the CD command. */ -static portBASE_TYPE prvCDCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ); +static BaseType_t prvCDCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ); /* * Implements the DEL command. */ -static portBASE_TYPE prvDELCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ); +static BaseType_t prvDELCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ); /* * Implements the TYPE command. */ -static portBASE_TYPE prvTYPECommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ); +static BaseType_t prvTYPECommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ); /* * Implements the COPY command. */ -static portBASE_TYPE prvCOPYCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ); +static BaseType_t prvCOPYCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ); /* * Implements the TEST command. */ -static portBASE_TYPE prvTESTFSCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ); +static BaseType_t prvTESTFSCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ); /* Structure that defines the DIR command line command, which lists all the files in the current directory. */ @@ -207,10 +207,10 @@ void vRegisterFileSystemCLICommands( void ) } /*-----------------------------------------------------------*/ -static portBASE_TYPE prvTYPECommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ) +static BaseType_t prvTYPECommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ) { const char *pcParameter; -portBASE_TYPE xParameterStringLength, xReturn = pdTRUE; +BaseType_t xParameterStringLength, xReturn = pdTRUE; static F_FILE *pxFile = NULL; int iChar; size_t xByte; @@ -281,10 +281,10 @@ size_t xColumns = 50U; } /*-----------------------------------------------------------*/ -static portBASE_TYPE prvCDCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ) +static BaseType_t prvCDCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ) { const char *pcParameter; -portBASE_TYPE xParameterStringLength; +BaseType_t xParameterStringLength; unsigned char ucReturned; size_t xStringLength; @@ -319,11 +319,11 @@ size_t xStringLength; } /*-----------------------------------------------------------*/ -static portBASE_TYPE prvDIRCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ) +static BaseType_t prvDIRCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ) { static F_FIND *pxFindStruct = NULL; unsigned char ucReturned; -portBASE_TYPE xReturn = pdFALSE; +BaseType_t xReturn = pdFALSE; /* This assumes pcWriteBuffer is long enough. */ ( void ) pcCommandString; @@ -385,10 +385,10 @@ portBASE_TYPE xReturn = pdFALSE; } /*-----------------------------------------------------------*/ -static portBASE_TYPE prvDELCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ) +static BaseType_t prvDELCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ) { const char *pcParameter; -portBASE_TYPE xParameterStringLength; +BaseType_t xParameterStringLength; unsigned char ucReturned; /* This function assumes xWriteBufferLen is large enough! */ @@ -423,9 +423,9 @@ unsigned char ucReturned; } /*-----------------------------------------------------------*/ -static portBASE_TYPE prvTESTFSCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ) +static BaseType_t prvTESTFSCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ) { -unsigned portBASE_TYPE uxOriginalPriority; +UBaseType_t uxOriginalPriority; /* Avoid compiler warnings. */ ( void ) xWriteBufferLen; @@ -450,11 +450,11 @@ unsigned portBASE_TYPE uxOriginalPriority; } /*-----------------------------------------------------------*/ -static portBASE_TYPE prvCOPYCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ) +static BaseType_t prvCOPYCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ) { char *pcSourceFile; const char *pcDestinationFile; -portBASE_TYPE xParameterStringLength; +BaseType_t xParameterStringLength; long lSourceLength, lDestinationLength = 0; /* Obtain the name of the destination file. */ @@ -520,7 +520,7 @@ long lSourceLength, lDestinationLength = 0; } /*-----------------------------------------------------------*/ -static portBASE_TYPE prvPerformCopy( const char *pcSourceFile, +static BaseType_t prvPerformCopy( const char *pcSourceFile, int32_t lSourceFileLength, const char *pcDestinationFile, char *pxWriteBuffer, @@ -528,7 +528,7 @@ static portBASE_TYPE prvPerformCopy( const char *pcSourceFile, { int32_t lBytesRead = 0, lBytesToRead, lBytesRemaining; F_FILE *pxFile; -portBASE_TYPE xReturn = pdPASS; +BaseType_t xReturn = pdPASS; /* NOTE: Error handling has been omitted for clarity. */ diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_FAT_SL_and_CLI_Windows_Simulator/File-system-demo.c b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_FAT_SL_and_CLI_Windows_Simulator/File-system-demo.c index 94767c59e..91aa04bc1 100644 --- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_FAT_SL_and_CLI_Windows_Simulator/File-system-demo.c +++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_FAT_SL_and_CLI_Windows_Simulator/File-system-demo.c @@ -163,9 +163,9 @@ unsigned char ucStatus; static void prvCreateDemoFilesUsing_f_write( void ) { -portBASE_TYPE xFileNumber, xWriteNumber; +BaseType_t xFileNumber, xWriteNumber; char cFileName[ fsMAX_FILE_NAME_LEN ]; -const portBASE_TYPE xMaxFiles = 5; +const BaseType_t xMaxFiles = 5; long lItemsWritten; F_FILE *pxFile; @@ -207,9 +207,9 @@ F_FILE *pxFile; static void prvVerifyDemoFileUsing_f_read( void ) { -portBASE_TYPE xFileNumber, xReadNumber; +BaseType_t xFileNumber, xReadNumber; char cFileName[ fsMAX_FILE_NAME_LEN ]; -const portBASE_TYPE xMaxFiles = 5; +const BaseType_t xMaxFiles = 5; long lItemsRead, lChar; F_FILE *pxFile; diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_FAT_SL_and_CLI_Windows_Simulator/Sample-CLI-commands.c b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_FAT_SL_and_CLI_Windows_Simulator/Sample-CLI-commands.c index 6d45976ca..87cbdb372 100644 --- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_FAT_SL_and_CLI_Windows_Simulator/Sample-CLI-commands.c +++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_FAT_SL_and_CLI_Windows_Simulator/Sample-CLI-commands.c @@ -91,28 +91,28 @@ /* * Implements the run-time-stats command. */ -static portBASE_TYPE prvTaskStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ); +static BaseType_t prvTaskStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ); /* * Implements the task-stats command. */ -static portBASE_TYPE prvRunTimeStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ); +static BaseType_t prvRunTimeStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ); /* * Implements the echo-three-parameters command. */ -static portBASE_TYPE prvThreeParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ); +static BaseType_t prvThreeParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ); /* * Implements the echo-parameters command. */ -static portBASE_TYPE prvParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ); +static BaseType_t prvParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ); /* * Implements the "trace start" and "trace stop" commands; */ #if configINCLUDE_TRACE_RELATED_CLI_COMMANDS == 1 - static portBASE_TYPE prvStartStopTraceCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ); + static BaseType_t prvStartStopTraceCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ); #endif /* Structure that defines the "run-time-stats" command line command. This @@ -187,7 +187,7 @@ void vRegisterSampleCLICommands( void ) } /*-----------------------------------------------------------*/ -static portBASE_TYPE prvTaskStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ) +static BaseType_t prvTaskStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ) { const char *const pcHeader = "Task State Priority Stack #\r\n************************************************\r\n"; @@ -208,7 +208,7 @@ const char *const pcHeader = "Task State Priority Stack #\r\n******** } /*-----------------------------------------------------------*/ -static portBASE_TYPE prvRunTimeStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ) +static BaseType_t prvRunTimeStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ) { const char * const pcHeader = "Task Abs Time % Time\r\n****************************************\r\n"; @@ -229,11 +229,11 @@ const char * const pcHeader = "Task Abs Time % Time\r\n********* } /*-----------------------------------------------------------*/ -static portBASE_TYPE prvThreeParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ) +static BaseType_t prvThreeParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ) { const char *pcParameter; -portBASE_TYPE xParameterStringLength, xReturn; -static portBASE_TYPE lParameterNumber = 0; +BaseType_t xParameterStringLength, xReturn; +static BaseType_t lParameterNumber = 0; /* Remove compile time warnings about unused parameters, and check the write buffer is not NULL. NOTE - for simplicity, this example assumes the @@ -296,11 +296,11 @@ static portBASE_TYPE lParameterNumber = 0; } /*-----------------------------------------------------------*/ -static portBASE_TYPE prvParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ) +static BaseType_t prvParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ) { const char *pcParameter; -portBASE_TYPE xParameterStringLength, xReturn; -static portBASE_TYPE lParameterNumber = 0; +BaseType_t xParameterStringLength, xReturn; +static BaseType_t lParameterNumber = 0; /* Remove compile time warnings about unused parameters, and check the write buffer is not NULL. NOTE - for simplicity, this example assumes the @@ -365,10 +365,10 @@ static portBASE_TYPE lParameterNumber = 0; #if configINCLUDE_TRACE_RELATED_CLI_COMMANDS == 1 - static portBASE_TYPE prvStartStopTraceCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ) + static BaseType_t prvStartStopTraceCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ) { const char *pcParameter; - portBASE_TYPE lParameterStringLength; + BaseType_t lParameterStringLength; /* Remove compile time warnings about unused parameters, and check the write buffer is not NULL. NOTE - for simplicity, this example assumes the diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_FAT_SL_and_CLI_Windows_Simulator/UDPCommandServer.c b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_FAT_SL_and_CLI_Windows_Simulator/UDPCommandServer.c index 8a253395e..fefb8702b 100644 --- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_FAT_SL_and_CLI_Windows_Simulator/UDPCommandServer.c +++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_FAT_SL_and_CLI_Windows_Simulator/UDPCommandServer.c @@ -110,7 +110,7 @@ void vUDPCommandInterpreterTask( void *pvParameters ) long lBytes, lByte; signed char cInChar, cInputIndex = 0; static signed char cInputString[ cmdMAX_INPUT_SIZE ], cOutputString[ cmdMAX_OUTPUT_SIZE ], cLocalBuffer[ cmdSOCKET_INPUT_BUFFER_SIZE ]; -portBASE_TYPE xMoreDataToFollow; +BaseType_t xMoreDataToFollow; volatile int iErrorCode = 0; struct sockaddr_in xClient; int xClientAddressLength = sizeof( struct sockaddr_in ); diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_FAT_SL_and_CLI_Windows_Simulator/main.c b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_FAT_SL_and_CLI_Windows_Simulator/main.c index ee7340fcc..1376be193 100644 --- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_FAT_SL_and_CLI_Windows_Simulator/main.c +++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_FAT_SL_and_CLI_Windows_Simulator/main.c @@ -180,7 +180,7 @@ const unsigned long ulMSToSleep = 5; the set of sample files are created from the idle task hook function. */ #if F_FS_THREAD_AWARE == 1 { - static portBASE_TYPE xCreatedSampleFiles = pdFALSE; + static BaseType_t xCreatedSampleFiles = pdFALSE; /* Initialise the drive and file system, then create a few example files. The output from this function just goes to the stdout window, diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_LPC1830_GCC/CLI-commands.c b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_LPC1830_GCC/CLI-commands.c index 09ee5905d..a24099335 100644 --- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_LPC1830_GCC/CLI-commands.c +++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_LPC1830_GCC/CLI-commands.c @@ -96,43 +96,43 @@ commands. */ /* * Implements the run-time-stats command. */ -static portBASE_TYPE prvTaskStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ); +static BaseType_t prvTaskStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ); /* * Implements the task-stats command. */ -static portBASE_TYPE prvRunTimeStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ); +static BaseType_t prvRunTimeStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ); /* * Implements the echo-three-parameters command. */ -static portBASE_TYPE prvThreeParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ); +static BaseType_t prvThreeParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ); /* * Implements the echo-parameters command. */ -static portBASE_TYPE prvParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ); +static BaseType_t prvParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ); /* * Defines a command that prints out IP address information. */ -static portBASE_TYPE prvDisplayIPConfig( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ); +static BaseType_t prvDisplayIPConfig( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ); /* * Defines a command that prints out the gathered demo debug stats. */ -static portBASE_TYPE prvDisplayIPDebugStats( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ); +static BaseType_t prvDisplayIPDebugStats( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ); /* * Defines a command that sends an ICMP ping request to an IP address. */ -static portBASE_TYPE prvPingCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ); +static BaseType_t prvPingCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ); /* * Implements the "trace start" and "trace stop" commands; */ #if configINCLUDE_TRACE_RELATED_CLI_COMMANDS == 1 - static portBASE_TYPE prvStartStopTraceCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ); + static BaseType_t prvStartStopTraceCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ); #endif /* Structure that defines the "ip-config" command line command. */ @@ -248,7 +248,7 @@ void vRegisterCLICommands( void ) } /*-----------------------------------------------------------*/ -static portBASE_TYPE prvTaskStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ) +static BaseType_t prvTaskStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ) { const char *const pcHeader = "Task State Priority Stack #\r\n************************************************\r\n"; @@ -269,7 +269,7 @@ const char *const pcHeader = "Task State Priority Stack #\r\n******** } /*-----------------------------------------------------------*/ -static portBASE_TYPE prvRunTimeStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ) +static BaseType_t prvRunTimeStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ) { const char * const pcHeader = "Task Abs Time % Time\r\n****************************************\r\n"; @@ -290,11 +290,11 @@ const char * const pcHeader = "Task Abs Time % Time\r\n********* } /*-----------------------------------------------------------*/ -static portBASE_TYPE prvThreeParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ) +static BaseType_t prvThreeParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ) { const char *pcParameter; -portBASE_TYPE xParameterStringLength, xReturn; -static portBASE_TYPE lParameterNumber = 0; +BaseType_t xParameterStringLength, xReturn; +static BaseType_t lParameterNumber = 0; /* Remove compile time warnings about unused parameters, and check the write buffer is not NULL. NOTE - for simplicity, this example assumes the @@ -357,11 +357,11 @@ static portBASE_TYPE lParameterNumber = 0; } /*-----------------------------------------------------------*/ -static portBASE_TYPE prvParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ) +static BaseType_t prvParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ) { const char *pcParameter; -portBASE_TYPE xParameterStringLength, xReturn; -static portBASE_TYPE lParameterNumber = 0; +BaseType_t xParameterStringLength, xReturn; +static BaseType_t lParameterNumber = 0; /* Remove compile time warnings about unused parameters, and check the write buffer is not NULL. NOTE - for simplicity, this example assumes the @@ -426,10 +426,10 @@ static portBASE_TYPE lParameterNumber = 0; #if ipconfigSUPPORT_OUTGOING_PINGS == 1 - static portBASE_TYPE prvPingCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ) + static BaseType_t prvPingCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ) { char * pcParameter; - portBASE_TYPE lParameterStringLength, xReturn; + BaseType_t lParameterStringLength, xReturn; uint32_t ulIPAddress, ulBytesToPing; const uint32_t ulDefaultBytesToPing = 8UL; char cBuffer[ 16 ]; @@ -517,11 +517,11 @@ static portBASE_TYPE lParameterNumber = 0; #if configINCLUDE_DEMO_DEBUG_STATS != 0 - static portBASE_TYPE prvDisplayIPDebugStats( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ) + static BaseType_t prvDisplayIPDebugStats( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ) { - static portBASE_TYPE xIndex = -1; + static BaseType_t xIndex = -1; extern xExampleDebugStatEntry_t xIPTraceValues[]; - portBASE_TYPE xReturn; + BaseType_t xReturn; /* Remove compile time warnings about unused parameters, and check the write buffer is not NULL. NOTE - for simplicity, this example assumes the @@ -553,10 +553,10 @@ static portBASE_TYPE lParameterNumber = 0; #endif /* configINCLUDE_DEMO_DEBUG_STATS */ -static portBASE_TYPE prvDisplayIPConfig( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ) +static BaseType_t prvDisplayIPConfig( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ) { -static portBASE_TYPE xIndex = 0; -portBASE_TYPE xReturn; +static BaseType_t xIndex = 0; +BaseType_t xReturn; uint32_t ulAddress; /* Remove compile time warnings about unused parameters, and check the @@ -615,10 +615,10 @@ uint32_t ulAddress; #if configINCLUDE_TRACE_RELATED_CLI_COMMANDS == 1 - static portBASE_TYPE prvStartStopTraceCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ) + static BaseType_t prvStartStopTraceCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ) { const char *pcParameter; - portBASE_TYPE lParameterStringLength; + BaseType_t lParameterStringLength; /* Remove compile time warnings about unused parameters, and check the write buffer is not NULL. NOTE - for simplicity, this example assumes the diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_LPC1830_GCC/Examples/USB_CDC/CDCCommandConsole.c b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_LPC1830_GCC/Examples/USB_CDC/CDCCommandConsole.c index c6d2e3310..b3adaa3b7 100644 --- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_LPC1830_GCC/Examples/USB_CDC/CDCCommandConsole.c +++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_LPC1830_GCC/Examples/USB_CDC/CDCCommandConsole.c @@ -127,7 +127,7 @@ static const char * const pcNewLine = "\r\n"; /*-----------------------------------------------------------*/ -void vCDCCommandConsoleStart( uint16_t usStackSize, unsigned portBASE_TYPE uxPriority ) +void vCDCCommandConsoleStart( uint16_t usStackSize, UBaseType_t uxPriority ) { /* Create the semaphores and mutexes used by the CDC to task interface. */ xCDCMutex = xSemaphoreCreateMutex(); @@ -156,7 +156,7 @@ char cRxedChar; uint8_t ucInputIndex = 0; char *pcOutputString; static char cInputString[ cmdMAX_INPUT_SIZE ], cLastInputString[ cmdMAX_INPUT_SIZE ]; -portBASE_TYPE xReturned; +BaseType_t xReturned; ( void ) pvParameters; @@ -310,7 +310,7 @@ char cInputChar; /* Callback function executed by the USB interrupt when new data arrives. */ void vCDCNewDataNotify( void ) { -portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE; +BaseType_t xHigherPriorityTaskWoken = pdFALSE; configASSERT( xNewDataSemaphore ); diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_LPC1830_GCC/Examples/include/CDCCommandConsole.h b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_LPC1830_GCC/Examples/include/CDCCommandConsole.h index 1833c301a..19dcc74b8 100644 --- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_LPC1830_GCC/Examples/include/CDCCommandConsole.h +++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_LPC1830_GCC/Examples/include/CDCCommandConsole.h @@ -70,7 +70,7 @@ * Create the task that implements a command console using the USB virtual com * port driver for intput and output. */ -void vCDCCommandConsoleStart( uint16_t usStackSize, unsigned portBASE_TYPE uxPriority ); +void vCDCCommandConsoleStart( uint16_t usStackSize, UBaseType_t uxPriority ); #endif /* CDC_COMMAND_CONSOLE_H */ diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_LPC1830_GCC/Examples/include/TwoEchoClients.h b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_LPC1830_GCC/Examples/include/TwoEchoClients.h index c69748d29..4627df769 100644 --- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_LPC1830_GCC/Examples/include/TwoEchoClients.h +++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_LPC1830_GCC/Examples/include/TwoEchoClients.h @@ -71,6 +71,6 @@ * to send to and receive from an echo server. The other task uses the zero * copy interface to send to and receive from an echo server. */ -void vStartEchoClientTasks( uint16_t usTaskStackSize, unsigned portBASE_TYPE uxTaskPriority ); +void vStartEchoClientTasks( uint16_t usTaskStackSize, UBaseType_t uxTaskPriority ); #endif /* TWO_ECHO_CLIENTS_H */ diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_LPC1830_GCC/main.c b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_LPC1830_GCC/main.c index 73b381c42..3d14e3ddb 100644 --- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_LPC1830_GCC/main.c +++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_LPC1830_GCC/main.c @@ -213,7 +213,7 @@ void vApplicationMallocFailedHook( void ) /* Called by FreeRTOS+UDP when the network connects. */ void vApplicationIPNetworkEventHook( eIPCallbackEvent_t eNetworkEvent ) { -static portBASE_TYPE xTaskAlreadyCreated = pdFALSE; +static BaseType_t xTaskAlreadyCreated = pdFALSE; if( eNetworkEvent == eNetworkUp ) { diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_Windows_Simulator/DemoTasks/SelectServer.c b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_Windows_Simulator/DemoTasks/SelectServer.c index 71c2c8f8d..0c129a0fd 100644 --- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_Windows_Simulator/DemoTasks/SelectServer.c +++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_Windows_Simulator/DemoTasks/SelectServer.c @@ -81,7 +81,7 @@ #include "FreeRTOS_UDP_IP.h" #include "FreeRTOS_Sockets.h" -#define selTINY_DELAY ( ( portTickType ) 2 ) +#define selTINY_DELAY ( ( TickType_t ) 2 ) #define selNUMBER_OF_SOCKETS ( 3 ) #define selSELECT_QUEUE_SIZE ( selNUMBER_OF_SOCKETS * 2 ) @@ -101,7 +101,7 @@ static xSocket_t xRxSockets[ selNUMBER_OF_SOCKETS ] = { 0 }; /*-----------------------------------------------------------*/ -void vStartSelectUDPServerTasks( uint16_t usStackSize, uint32_t ulFirstPortNumber, unsigned portBASE_TYPE uxPriority ) +void vStartSelectUDPServerTasks( uint16_t usStackSize, uint32_t ulFirstPortNumber, UBaseType_t uxPriority ) { /* Create task that sends to multiple sockets, and the task that uses the FreeRTOS_select() function to receive from multiple sockets. The first @@ -120,7 +120,7 @@ struct freertos_sockaddr xAddress; uint32_t xClientLength = sizeof( struct freertos_sockaddr ), ulFirstRxPortNumber, x; uint32_t ulReceivedValue = 0, ulExpectedValue = 0UL, ulReceivedCount[ selNUMBER_OF_SOCKETS ] = { 0 }; int32_t lBytes; -const portTickType xRxBlockTime = 0; +const TickType_t xRxBlockTime = 0; /* The number of the port the first Rx socket will be bound to is passed in as the task parameter. Other port numbers used are consecutive from this. */ @@ -197,7 +197,7 @@ uint32_t ulTxValue = 0; struct freertos_sockaddr xDestinationAddress; uint32_t ulIPAddress, ulFirstDestinationPortNumber, xPortNumber; xSocket_t xTxSocket; -const portTickType xShortDelay = 100 / portTICK_RATE_MS, xSendBlockTime = 500 / portTICK_RATE_MS; +const TickType_t xShortDelay = 100 / portTICK_RATE_MS, xSendBlockTime = 500 / portTICK_RATE_MS; srand( ( unsigned int ) &xPortNumber ); diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_Windows_Simulator/DemoTasks/SimpleClientAndServer.c b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_Windows_Simulator/DemoTasks/SimpleClientAndServer.c index 4d54a6778..691cd7644 100644 --- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_Windows_Simulator/DemoTasks/SimpleClientAndServer.c +++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_Windows_Simulator/DemoTasks/SimpleClientAndServer.c @@ -81,7 +81,7 @@ #include "FreeRTOS_UDP_IP.h" #include "FreeRTOS_Sockets.h" -#define simpTINY_DELAY ( ( portTickType ) 2 ) +#define simpTINY_DELAY ( ( TickType_t ) 2 ) /* * Uses a socket to send data without using the zero copy option. @@ -109,7 +109,7 @@ static void prvSimpleZeroCopyServerTask( void *pvParameters ); /*-----------------------------------------------------------*/ -void vStartSimpleUDPClientServerTasks( uint16_t usStackSize, uint32_t ulPort, unsigned portBASE_TYPE uxPriority ) +void vStartSimpleUDPClientServerTasks( uint16_t usStackSize, uint32_t ulPort, UBaseType_t uxPriority ) { /* Create the client and server tasks that do not use the zero copy interface. */ @@ -127,10 +127,10 @@ static void prvSimpleClientTask( void *pvParameters ) xSocket_t xClientSocket; struct freertos_sockaddr xDestinationAddress; char cString[ 50 ]; -portBASE_TYPE lReturned; +BaseType_t lReturned; uint32_t ulCount = 0UL, ulIPAddress; const uint32_t ulLoopsPerSocket = 10UL; -const portTickType x150ms = 150UL / portTICK_RATE_MS; +const TickType_t x150ms = 150UL / portTICK_RATE_MS; /* Remove compiler warning about unused parameters. */ ( void ) pvParameters; @@ -230,7 +230,7 @@ xSocket_t xListeningSocket; } /* Error check. */ - configASSERT( lBytes == ( portBASE_TYPE ) strlen( cReceivedString ) ); + configASSERT( lBytes == ( BaseType_t ) strlen( cReceivedString ) ); } } /*-----------------------------------------------------------*/ @@ -240,11 +240,11 @@ static void prvSimpleZeroCopyUDPClientTask( void *pvParameters ) xSocket_t xClientSocket; uint8_t *pucUDPPayloadBuffer; struct freertos_sockaddr xDestinationAddress; -portBASE_TYPE lReturned; +BaseType_t lReturned; uint32_t ulCount = 0UL, ulIPAddress; const uint32_t ulLoopsPerSocket = 10UL; const char *pcStringToSend = "Server received (using zero copy): Message number "; -const portTickType x150ms = 150UL / portTICK_RATE_MS; +const TickType_t x150ms = 150UL / portTICK_RATE_MS; /* 15 is added to ensure the number, \r\n and terminating zero fit. */ const size_t xStringLength = strlen( pcStringToSend ) + 15; @@ -379,7 +379,7 @@ xSocket_t xListeningSocket; /* It is expected to receive one more byte than the string length as the NULL terminator is also transmitted. */ - configASSERT( lBytes == ( ( portBASE_TYPE ) strlen( ( const char * ) pucUDPPayloadBuffer ) + 1 ) ); + configASSERT( lBytes == ( ( BaseType_t ) strlen( ( const char * ) pucUDPPayloadBuffer ) + 1 ) ); /* Print the received characters. */ if( lBytes > 0 ) diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_Windows_Simulator/DemoTasks/UDPCommandServer.c b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_Windows_Simulator/DemoTasks/UDPCommandServer.c index f89e32cc6..bb2ae8c09 100644 --- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_Windows_Simulator/DemoTasks/UDPCommandServer.c +++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_Windows_Simulator/DemoTasks/UDPCommandServer.c @@ -102,7 +102,7 @@ static xSocket_t prvOpenUDPServerSocket( uint16_t usPort ); /*-----------------------------------------------------------*/ -void vStartUDPCommandInterpreterTask( uint16_t usStackSize, uint32_t ulPort, unsigned portBASE_TYPE uxPriority ) +void vStartUDPCommandInterpreterTask( uint16_t usStackSize, uint32_t ulPort, UBaseType_t uxPriority ) { xTaskCreate( vUDPCommandInterpreterTask, "CLI", usStackSize, ( void * ) ulPort, uxPriority, NULL ); } @@ -118,7 +118,7 @@ void vUDPCommandInterpreterTask( void *pvParameters ) long lBytes, lByte; signed char cInChar, cInputIndex = 0; static signed char cInputString[ cmdMAX_INPUT_SIZE ], cOutputString[ cmdMAX_OUTPUT_SIZE ], cLocalBuffer[ cmdSOCKET_INPUT_BUFFER_SIZE ]; -portBASE_TYPE xMoreDataToFollow; +BaseType_t xMoreDataToFollow; struct freertos_sockaddr xClient; socklen_t xClientAddressLength = 0; /* This is required as a parameter to maintain the sendto() Berkeley sockets API - but it is not actually used so can take any value. */ xSocket_t xSocket; diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_Windows_Simulator/DemoTasks/include/SelectServer.h b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_Windows_Simulator/DemoTasks/include/SelectServer.h index 648a3f5ae..c680680b0 100644 --- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_Windows_Simulator/DemoTasks/include/SelectServer.h +++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_Windows_Simulator/DemoTasks/include/SelectServer.h @@ -66,6 +66,6 @@ #ifndef SELECT_SERVER_H #define SELECT_SERVER_H -void vStartSelectUDPServerTasks( uint16_t usStackSize, uint32_t ulFirstPortNumber, unsigned portBASE_TYPE uxPriority ); +void vStartSelectUDPServerTasks( uint16_t usStackSize, uint32_t ulFirstPortNumber, UBaseType_t uxPriority ); #endif /* SELECT_SERVER_H */ diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_Windows_Simulator/DemoTasks/include/SimpleClientAndServer.h b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_Windows_Simulator/DemoTasks/include/SimpleClientAndServer.h index 02f2bff55..88b3ec576 100644 --- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_Windows_Simulator/DemoTasks/include/SimpleClientAndServer.h +++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_Windows_Simulator/DemoTasks/include/SimpleClientAndServer.h @@ -66,6 +66,6 @@ #ifndef SIMPLE_CLIENT_AND_SERVER_H #define SIMPLE_CLIENT_AND_SERVER_H -void vStartSimpleUDPClientServerTasks( uint16_t usStackSize, uint32_t ulsPort, unsigned portBASE_TYPE uxPriority ); +void vStartSimpleUDPClientServerTasks( uint16_t usStackSize, uint32_t ulsPort, UBaseType_t uxPriority ); #endif /* SIMPLE_CLIENT_AND_SERVER_H */ diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_Windows_Simulator/DemoTasks/include/UDPCommandInterpreter.h b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_Windows_Simulator/DemoTasks/include/UDPCommandInterpreter.h index 164a5d3a8..179343beb 100644 --- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_Windows_Simulator/DemoTasks/include/UDPCommandInterpreter.h +++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_Windows_Simulator/DemoTasks/include/UDPCommandInterpreter.h @@ -66,6 +66,6 @@ #ifndef UDP_COMMAND_INTERPRETER_H #define UDP_COMMAND_INTERPRETER_H -void vStartUDPCommandInterpreterTask( uint16_t usStackSize, uint32_t ulPort, unsigned portBASE_TYPE uxPriority ); +void vStartUDPCommandInterpreterTask( uint16_t usStackSize, uint32_t ulPort, UBaseType_t uxPriority ); #endif /* UDP_COMMAND_INTERPRETER_H */ diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_Windows_Simulator/FreeRTOSConfig.h b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_Windows_Simulator/FreeRTOSConfig.h index e9ba9ae72..fddcf9714 100644 --- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_Windows_Simulator/FreeRTOSConfig.h +++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_Windows_Simulator/FreeRTOSConfig.h @@ -82,7 +82,7 @@ *----------------------------------------------------------*/ #define configUSE_PREEMPTION 1 -#define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 7 ) +#define configMAX_PRIORITIES ( ( UBaseType_t ) 7 ) #define configTICK_RATE_HZ ( 1000 ) /* In this non-real time simulated environment the tick frequency has to be at least a multiple of the Win32 tick frequency, and therefore very slow. */ #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 60 ) /* In this simulated case, the stack only has to hold one small structure as the real stack is part of the Win32 thread. */ #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 32U * 1024U ) ) @@ -179,7 +179,7 @@ example, on my development laptop setting configNETWORK_INTERFACE_TO_USE to 1 results in the wired network being used, while setting configNETWORK_INTERFACE_TO_USE to 2 results in the wireless network being used. */ -#define configNETWORK_INTERFACE_TO_USE 1L +#define configNETWORK_INTERFACE_TO_USE 4L /* The address of an echo server that will be used by the two demo echo client tasks. diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_Windows_Simulator/WinPCap/arch.c b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_Windows_Simulator/WinPCap/arch.c index 1d2658596..e4af3f215 100644 --- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_Windows_Simulator/WinPCap/arch.c +++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_Windows_Simulator/WinPCap/arch.c @@ -119,9 +119,9 @@ void vNetifTx( void ) } /*-----------------------------------------------------------*/ -unsigned portBASE_TYPE uxNetifRx( void ) +UBaseType_t uxNetifRx( void ) { -unsigned portBASE_TYPE xDataLen; +UBaseType_t xDataLen; unsigned char *pucTemp; /* Check there is really data available. */ @@ -156,9 +156,9 @@ unsigned char *pucTemp; } /*-----------------------------------------------------------*/ -portBASE_TYPE xNetifInit( void ) +BaseType_t xNetifInit( void ) { -portBASE_TYPE x; +BaseType_t x; pcap_if_t *pxAllNetworkInterfaces; /* Allocate a free buffer to each buffer pointer. */ diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_Windows_Simulator/WinPCap/netif.h b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_Windows_Simulator/WinPCap/netif.h index adc814d6c..6facec418 100644 --- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_Windows_Simulator/WinPCap/netif.h +++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_Windows_Simulator/WinPCap/netif.h @@ -78,13 +78,13 @@ void vNetifTx( void ); * bytes are placed in uip_buf. The number of bytes copied into uip_buf is * returned. */ -unsigned portBASE_TYPE uxNetifRx( void ); +UBaseType_t uxNetifRx( void ); /* * Prepare a packet capture session. This will print out all the network * interfaces available, and the one actually used is set by the * configNETWORK_INTERFACE_TO_USE constant that is defined in * FreeRTOSConfig.h. */ -portBASE_TYPE xNetifInit( void ); +BaseType_t xNetifInit( void ); #endif /* NET_IF_H */ diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_Windows_Simulator/main.c b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_Windows_Simulator/main.c index 42dc8f6e8..44badbd24 100644 --- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_Windows_Simulator/main.c +++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_UDP_and_CLI_Windows_Simulator/main.c @@ -225,7 +225,7 @@ void vApplicationIPNetworkEventHook( eIPCallbackEvent_t eNetworkEvent ) { uint32_t ulIPAddress, ulNetMask, ulGatewayAddress, ulDNSServerAddress; int8_t cBuffer[ 16 ]; -static portBASE_TYPE xTasksAlreadyCreated = pdFALSE; +static BaseType_t xTasksAlreadyCreated = pdFALSE; if( eNetworkEvent == eNetworkUp ) { diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-CLI/FreeRTOS_CLI.c b/FreeRTOS-Plus/Source/FreeRTOS-Plus-CLI/FreeRTOS_CLI.c index fad846502..6629892a7 100644 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-CLI/FreeRTOS_CLI.c +++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-CLI/FreeRTOS_CLI.c @@ -61,7 +61,7 @@ typedef struct xCOMMAND_INPUT_LIST * The callback function that is executed when "help" is entered. This is the * only default command that is always present. */ -static portBASE_TYPE prvHelpCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ); +static BaseType_t prvHelpCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ); /* * Return the number of parameters that follow the command name. @@ -98,11 +98,11 @@ static char cOutputBuffer[ configCOMMAND_INT_MAX_OUTPUT_SIZE ]; /*-----------------------------------------------------------*/ -portBASE_TYPE FreeRTOS_CLIRegisterCommand( const CLI_Command_Definition_t * const pxCommandToRegister ) +BaseType_t FreeRTOS_CLIRegisterCommand( const CLI_Command_Definition_t * const pxCommandToRegister ) { static CLI_Definition_List_Item_t *pxLastCommandInList = &xRegisteredCommands; CLI_Definition_List_Item_t *pxNewListItem; -portBASE_TYPE xReturn = pdFAIL; +BaseType_t xReturn = pdFAIL; /* Check the parameter is not NULL. */ configASSERT( pxCommandToRegister ); @@ -139,10 +139,10 @@ portBASE_TYPE xReturn = pdFAIL; } /*-----------------------------------------------------------*/ -portBASE_TYPE FreeRTOS_CLIProcessCommand( const char * const pcCommandInput, char * pcWriteBuffer, size_t xWriteBufferLen ) +BaseType_t FreeRTOS_CLIProcessCommand( const char * const pcCommandInput, char * pcWriteBuffer, size_t xWriteBufferLen ) { static const CLI_Definition_List_Item_t *pxCommand = NULL; -portBASE_TYPE xReturn = pdTRUE; +BaseType_t xReturn = pdTRUE; const char *pcRegisteredCommandString; size_t xCommandStringLength; @@ -220,9 +220,9 @@ char *FreeRTOS_CLIGetOutputBuffer( void ) } /*-----------------------------------------------------------*/ -const char *FreeRTOS_CLIGetParameter( const char *pcCommandString, unsigned portBASE_TYPE uxWantedParameter, portBASE_TYPE *pxParameterStringLength ) +const char *FreeRTOS_CLIGetParameter( const char *pcCommandString, UBaseType_t uxWantedParameter, BaseType_t *pxParameterStringLength ) { -unsigned portBASE_TYPE uxParametersFound = 0; +UBaseType_t uxParametersFound = 0; const char *pcReturn = NULL; *pxParameterStringLength = 0; @@ -276,10 +276,10 @@ const char *pcReturn = NULL; } /*-----------------------------------------------------------*/ -static portBASE_TYPE prvHelpCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ) +static BaseType_t prvHelpCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ) { static const CLI_Definition_List_Item_t * pxCommand = NULL; -signed portBASE_TYPE xReturn; +BaseType_t xReturn; ( void ) pcCommandString; @@ -312,7 +312,7 @@ signed portBASE_TYPE xReturn; static int8_t prvGetNumberOfParameters( const char *pcCommandString ) { int8_t cParameters = 0; -portBASE_TYPE xLastCharacterWasSpace = pdFALSE; +BaseType_t xLastCharacterWasSpace = pdFALSE; /* Count the number of space delimited words in pcCommandString. */ while( *pcCommandString != 0x00 ) diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-CLI/FreeRTOS_CLI.h b/FreeRTOS-Plus/Source/FreeRTOS-Plus-CLI/FreeRTOS_CLI.h index 52a3aaac8..5820bff2f 100644 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-CLI/FreeRTOS_CLI.h +++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-CLI/FreeRTOS_CLI.h @@ -48,7 +48,7 @@ commands must comply. pcWriteBuffer is a buffer into which the output from executing the command can be written, xWriteBufferLen is the length, in bytes of the pcWriteBuffer buffer, and pcCommandString is the entire string as input by the user (from which parameters can be extracted).*/ -typedef portBASE_TYPE (*pdCOMMAND_LINE_CALLBACK)( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ); +typedef BaseType_t (*pdCOMMAND_LINE_CALLBACK)( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ); /* The structure that defines command line commands. A command line command should be defined by declaring a const structure of this type. */ @@ -69,7 +69,7 @@ typedef struct xCOMMAND_LINE_INPUT * handled by the command interpreter. Once a command has been registered it * can be executed from the command line. */ -portBASE_TYPE FreeRTOS_CLIRegisterCommand( const CLI_Command_Definition_t * const pxCommandToRegister ); +BaseType_t FreeRTOS_CLIRegisterCommand( const CLI_Command_Definition_t * const pxCommandToRegister ); /* * Runs the command interpreter for the command string "pcCommandInput". Any @@ -82,7 +82,7 @@ portBASE_TYPE FreeRTOS_CLIRegisterCommand( const CLI_Command_Definition_t * cons * pcCmdIntProcessCommand is not reentrant. It must not be called from more * than one task - or at least - by more than one task at a time. */ -portBASE_TYPE FreeRTOS_CLIProcessCommand( const char * const pcCommandInput, char * pcWriteBuffer, size_t xWriteBufferLen ); +BaseType_t FreeRTOS_CLIProcessCommand( const char * const pcCommandInput, char * pcWriteBuffer, size_t xWriteBufferLen ); /*-----------------------------------------------------------*/ @@ -102,7 +102,7 @@ char *FreeRTOS_CLIGetOutputBuffer( void ); /* * Return a pointer to the xParameterNumber'th word in pcCommandString. */ -const char *FreeRTOS_CLIGetParameter( const char *pcCommandString, unsigned portBASE_TYPE uxWantedParameter, portBASE_TYPE *pxParameterStringLength ); +const char *FreeRTOS_CLIGetParameter( const char *pcCommandString, UBaseType_t uxWantedParameter, BaseType_t *pxParameterStringLength ); #endif /* COMMAND_INTERPRETER_H */ diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-Trace/Include/trcKernelPort.h b/FreeRTOS-Plus/Source/FreeRTOS-Plus-Trace/Include/trcKernelPort.h index e87bce1bc..58d73060a 100644 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-Trace/Include/trcKernelPort.h +++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-Trace/Include/trcKernelPort.h @@ -489,8 +489,8 @@ void* prvTraceGetCurrentTaskHandle(void); /* Called on each OS tick. Will call uiPortGetTimestamp to make sure it is called at least once every OS tick. */ #undef traceTASK_INCREMENT_TICK #define traceTASK_INCREMENT_TICK( xTickCount ) \ - if (uxSchedulerSuspended == ( unsigned portBASE_TYPE ) pdTRUE || uxPendedTicks == 0) { trcKERNEL_HOOKS_INCREMENT_TICK(); } \ - if (uxSchedulerSuspended == ( unsigned portBASE_TYPE ) pdFALSE) { trcKERNEL_HOOKS_NEW_TIME(DIV_NEW_TIME, xTickCount + 1); } + if (uxSchedulerSuspended == ( UBaseType_t ) pdTRUE || uxPendedTicks == 0) { trcKERNEL_HOOKS_INCREMENT_TICK(); } \ + if (uxSchedulerSuspended == ( UBaseType_t ) pdFALSE) { trcKERNEL_HOOKS_NEW_TIME(DIV_NEW_TIME, xTickCount + 1); } /* Called on each task-switch */ #undef traceTASK_SWITCHED_IN diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-Trace/trcKernelPort.c b/FreeRTOS-Plus/Source/FreeRTOS-Plus-Trace/trcKernelPort.c index 166dbcc34..a4217e071 100644 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-Trace/trcKernelPort.c +++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-Trace/trcKernelPort.c @@ -56,7 +56,7 @@ traceObjectClass TraceObjectClassTable[5] = { int uiInEventGroupSetBitsFromISR = 0; extern unsigned char ucQueueGetQueueType(void*); -extern portBASE_TYPE uxQueueGetQueueNumber(void*); +extern BaseType_t uxQueueGetQueueNumber(void*); objectHandleType prvTraceGetObjectNumber(void* handle) { diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-UDP/FreeRTOS_DHCP.c b/FreeRTOS-Plus/Source/FreeRTOS-Plus-UDP/FreeRTOS_DHCP.c index 8c3d78fcf..eb1dbeaf6 100644 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-UDP/FreeRTOS_DHCP.c +++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-UDP/FreeRTOS_DHCP.c @@ -185,7 +185,7 @@ static void prvSendDHCPDiscover( xMACAddress_t *pxMACAddress ); /* * Interpret message received on the DHCP socket. */ -static portBASE_TYPE prvProcessDHCPReplies( uint8_t ucExpectedMessageType, xMACAddress_t *pxMACAddress, xNetworkAddressingParameters_t *pxNetworkAddressing ); +static BaseType_t prvProcessDHCPReplies( uint8_t ucExpectedMessageType, xMACAddress_t *pxMACAddress, xNetworkAddressingParameters_t *pxNetworkAddressing ); /* * Generate a DHCP request packet, and send it on the DHCP socket. @@ -221,14 +221,14 @@ static xSocket_t xDHCPSocket = NULL; static uint32_t ulTransactionId = 0UL, ulOfferedIPAddress = 0UL, ulDHCPServerAddress = 0UL, ulLeaseTime = 0; /* Hold information on the current timer state. */ -static portTickType xDHCPTxTime = 0x00, xDHCPTxPeriod = 0x00; +static TickType_t xDHCPTxTime = 0x00, xDHCPTxPeriod = 0x00; /* Maintains the DHCP state machine state. */ static eDHCPState_t eDHCPState = eWaitingSendFirstDiscover; /*-----------------------------------------------------------*/ -void vDHCPProcess( portBASE_TYPE xReset, xMACAddress_t *pxMACAddress, uint32_t *pulIPAddress, xNetworkAddressingParameters_t *pxNetworkAddressing ) +void vDHCPProcess( BaseType_t xReset, xMACAddress_t *pxMACAddress, uint32_t *pulIPAddress, xNetworkAddressingParameters_t *pxNetworkAddressing ) { if( xReset != pdFALSE ) { @@ -288,7 +288,7 @@ void vDHCPProcess( portBASE_TYPE xReset, xMACAddress_t *pxMACAddress, uint32_t * } taskEXIT_CRITICAL(); eDHCPState = eNotUsingLeasedAddress; - xTimerStop( xDHCPTimer, ( portTickType ) 0 ); + xTimerStop( xDHCPTimer, ( TickType_t ) 0 ); #if ipconfigUSE_NETWORK_EVENT_HOOK == 1 { @@ -395,7 +395,7 @@ void vDHCPProcess( portBASE_TYPE xReset, xMACAddress_t *pxMACAddress, uint32_t * break; case eNotUsingLeasedAddress: - xTimerStop( xDHCPTimer, ( portTickType ) 0 ); + xTimerStop( xDHCPTimer, ( TickType_t ) 0 ); break; } } @@ -404,8 +404,8 @@ void vDHCPProcess( portBASE_TYPE xReset, xMACAddress_t *pxMACAddress, uint32_t * static void prvCreateDHCPSocket( void ) { struct freertos_sockaddr xAddress; -portBASE_TYPE xReturn; -portTickType xTimeoutTime = 0; +BaseType_t xReturn; +TickType_t xTimeoutTime = 0; /* Create the socket, if it has not already been created. */ if( xDHCPSocket == NULL ) @@ -415,8 +415,8 @@ portTickType xTimeoutTime = 0; /* Ensure the Rx and Tx timeouts are zero as the DHCP executes in the context of the IP task. */ - FreeRTOS_setsockopt( xDHCPSocket, 0, FREERTOS_SO_RCVTIMEO, ( void * ) &xTimeoutTime, sizeof( portTickType ) ); - FreeRTOS_setsockopt( xDHCPSocket, 0, FREERTOS_SO_SNDTIMEO, ( void * ) &xTimeoutTime, sizeof( portTickType ) ); + FreeRTOS_setsockopt( xDHCPSocket, 0, FREERTOS_SO_RCVTIMEO, ( void * ) &xTimeoutTime, sizeof( TickType_t ) ); + FreeRTOS_setsockopt( xDHCPSocket, 0, FREERTOS_SO_SNDTIMEO, ( void * ) &xTimeoutTime, sizeof( TickType_t ) ); /* Bind to the standard DHCP client port. */ xAddress.sin_port = dhcpCLIENT_PORT; @@ -462,7 +462,7 @@ extern void vIPFunctionsTimerCallback( xTimerHandle xTimer ); } /*-----------------------------------------------------------*/ -static portBASE_TYPE prvProcessDHCPReplies( uint8_t ucExpectedMessageType, xMACAddress_t *pxMACAddress, xNetworkAddressingParameters_t *pxNetworkAddressing ) +static BaseType_t prvProcessDHCPReplies( uint8_t ucExpectedMessageType, xMACAddress_t *pxMACAddress, xNetworkAddressingParameters_t *pxNetworkAddressing ) { uint8_t *pucUDPPayload, *pucLastByte; struct freertos_sockaddr xClient; @@ -471,7 +471,7 @@ int32_t lBytes; xDHCPMessage_t *pxDHCPMessage; uint8_t *pucByte, ucOptionCode, ucLength; uint32_t ulProcessed; -portBASE_TYPE xReturn = pdFALSE; +BaseType_t xReturn = pdFALSE; const uint32_t ulMandatoryOptions = 2; /* DHCP server address, and the correct DHCP message type must be present in the options. */ lBytes = FreeRTOS_recvfrom( xDHCPSocket, ( void * ) &pucUDPPayload, 0, FREERTOS_ZERO_COPY, &xClient, &xClientLength ); diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-UDP/FreeRTOS_DNS.c b/FreeRTOS-Plus/Source/FreeRTOS-Plus-UDP/FreeRTOS_DNS.c index 553cf6f3d..f8da6b7d5 100644 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-UDP/FreeRTOS_DNS.c +++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-UDP/FreeRTOS_DNS.c @@ -136,7 +136,7 @@ static xSocket_t xDNSSocket = NULL; uint32_t ulIPAddress = 0UL; uint8_t *pucUDPPayloadBuffer; static uint32_t ulAddressLength; -portBASE_TYPE xAttempt; +BaseType_t xAttempt; int32_t lBytes; size_t xPayloadLength; const size_t xExpectedPayloadLength = sizeof( xDNSMessage_t ) + strlen( pcHostName ) + sizeof( uint16_t ) + sizeof( uint16_t ) + 2; /* Two for the count of characters in the first subdomain part, and the string end byte */ @@ -384,8 +384,8 @@ static xSocket_t prvCreateDNSSocket( void ) { static xSocket_t xSocket = NULL; struct freertos_sockaddr xAddress; -portBASE_TYPE xReturn; -portTickType xTimeoutTime = 200 / portTICK_RATE_MS; +BaseType_t xReturn; +TickType_t xTimeoutTime = 200 / portTICK_RATE_MS; /* This must be the first time this function has been called. Create the socket. */ @@ -404,8 +404,8 @@ portTickType xTimeoutTime = 200 / portTICK_RATE_MS; else { /* Set the send and receive timeouts. */ - FreeRTOS_setsockopt( xSocket, 0, FREERTOS_SO_RCVTIMEO, ( void * ) &xTimeoutTime, sizeof( portTickType ) ); - FreeRTOS_setsockopt( xSocket, 0, FREERTOS_SO_SNDTIMEO, ( void * ) &xTimeoutTime, sizeof( portTickType ) ); + FreeRTOS_setsockopt( xSocket, 0, FREERTOS_SO_RCVTIMEO, ( void * ) &xTimeoutTime, sizeof( TickType_t ) ); + FreeRTOS_setsockopt( xSocket, 0, FREERTOS_SO_SNDTIMEO, ( void * ) &xTimeoutTime, sizeof( TickType_t ) ); } return xSocket; diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-UDP/FreeRTOS_Sockets.c b/FreeRTOS-Plus/Source/FreeRTOS-Plus-UDP/FreeRTOS_Sockets.c index fd157c9e2..115d6cf04 100644 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-UDP/FreeRTOS_Sockets.c +++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-UDP/FreeRTOS_Sockets.c @@ -70,7 +70,7 @@ port number. */ /* xWaitingPacketSemaphore is not created until the socket is bound, so can be tested to see if bind() has been called. */ -#define socketSOCKET_IS_BOUND( pxSocket ) ( ( portBASE_TYPE ) pxSocket->xWaitingPacketSemaphore ) +#define socketSOCKET_IS_BOUND( pxSocket ) ( ( BaseType_t ) pxSocket->xWaitingPacketSemaphore ) /* If FreeRTOS_sendto() is called on a socket that is not bound to a port number then, depending on the FreeRTOSIPConfig.h settings, it might be that a @@ -98,7 +98,7 @@ static uint16_t prvGetPrivatePortNumber( void ); * Return the list itme from within pxList that has an item value of * xWantedItemValue. If there is no such list item return NULL. */ -xListItem * pxListFindListItemWithValue( xList *pxList, portTickType xWantedItemValue ); +xListItem * pxListFindListItemWithValue( xList *pxList, TickType_t xWantedItemValue ); /*-----------------------------------------------------------*/ @@ -107,8 +107,8 @@ typedef struct XSOCKET xSemaphoreHandle xWaitingPacketSemaphore; xList xWaitingPacketsList; xListItem xBoundSocketListItem; /* Used to reference the socket from a bound sockets list. */ - portTickType xReceiveBlockTime; - portTickType xSendBlockTime; + TickType_t xReceiveBlockTime; + TickType_t xSendBlockTime; uint8_t ucSocketOptions; #if ipconfigSUPPORT_SELECT_FUNCTION == 1 xQueueHandle xSelectQueue; @@ -122,7 +122,7 @@ static xList xBoundSocketsList; /*-----------------------------------------------------------*/ -xSocket_t FreeRTOS_socket( portBASE_TYPE xDomain, portBASE_TYPE xType, portBASE_TYPE xProtocol ) +xSocket_t FreeRTOS_socket( BaseType_t xDomain, BaseType_t xType, BaseType_t xProtocol ) { xFreeRTOS_Socket_t *pxSocket; @@ -149,7 +149,7 @@ xFreeRTOS_Socket_t *pxSocket; vListInitialise( &( pxSocket->xWaitingPacketsList ) ); vListInitialiseItem( &( pxSocket->xBoundSocketListItem ) ); listSET_LIST_ITEM_OWNER( &( pxSocket->xBoundSocketListItem ), ( void * ) pxSocket ); - pxSocket->xSendBlockTime = ( portTickType ) 0; + pxSocket->xSendBlockTime = ( TickType_t ) 0; pxSocket->xReceiveBlockTime = portMAX_DELAY; pxSocket->ucSocketOptions = FREERTOS_SO_UDPCKSUM_OUT; #if ipconfigSUPPORT_SELECT_FUNCTION == 1 @@ -168,7 +168,7 @@ xFreeRTOS_Socket_t *pxSocket; #if ipconfigSUPPORT_SELECT_FUNCTION == 1 - xSocketSet_t FreeRTOS_CreateSocketSet( unsigned portBASE_TYPE uxEventQueueLength ) + xSocketSet_t FreeRTOS_CreateSocketSet( UBaseType_t uxEventQueueLength ) { xQueueHandle xSelectQueue; @@ -184,11 +184,11 @@ xFreeRTOS_Socket_t *pxSocket; #if ipconfigSUPPORT_SELECT_FUNCTION == 1 - portBASE_TYPE FreeRTOS_FD_SET( xSocket_t xSocket, xSocketSet_t xSocketSet ) + BaseType_t FreeRTOS_FD_SET( xSocket_t xSocket, xSocketSet_t xSocketSet ) { xFreeRTOS_Socket_t *pxSocket = ( xFreeRTOS_Socket_t * ) xSocket; - portBASE_TYPE xReturn = pdFALSE; - unsigned portBASE_TYPE uxMessagesWaiting; + BaseType_t xReturn = pdFALSE; + UBaseType_t uxMessagesWaiting; configASSERT( xSocket ); @@ -230,10 +230,10 @@ xFreeRTOS_Socket_t *pxSocket; #if ipconfigSUPPORT_SELECT_FUNCTION == 1 - portBASE_TYPE FreeRTOS_FD_CLR( xSocket_t xSocket, xSocketSet_t xSocketSet ) + BaseType_t FreeRTOS_FD_CLR( xSocket_t xSocket, xSocketSet_t xSocketSet ) { xFreeRTOS_Socket_t *pxSocket = ( xFreeRTOS_Socket_t * ) xSocket; - portBASE_TYPE xReturn; + BaseType_t xReturn; /* Is the socket a member of the select group? */ if( pxSocket->xSelectQueue == ( xQueueHandle ) xSocketSet ) @@ -255,7 +255,7 @@ xFreeRTOS_Socket_t *pxSocket; #if ipconfigSUPPORT_SELECT_FUNCTION == 1 - xSocket_t FreeRTOS_select( xSocketSet_t xSocketSet, portTickType xBlockTimeTicks ) + xSocket_t FreeRTOS_select( xSocketSet_t xSocketSet, TickType_t xBlockTimeTicks ) { xFreeRTOS_Socket_t *pxSocket; @@ -361,7 +361,7 @@ xFreeRTOS_Socket_t *pxSocket; extern xQueueHandle xNetworkEventQueue; uint8_t *pucBuffer; xTimeOutType xTimeOut; - portTickType xTicksToWait; + TickType_t xTicksToWait; uint16_t usFragmentOffset; xFreeRTOS_Socket_t *pxSocket; @@ -537,7 +537,7 @@ xFreeRTOS_Socket_t *pxSocket; xIPStackEvent_t xStackTxEvent = { eStackTxEvent, NULL }; extern xQueueHandle xNetworkEventQueue; xTimeOutType xTimeOut; - portTickType xTicksToWait; + TickType_t xTicksToWait; int32_t lReturn = 0; xFreeRTOS_Socket_t *pxSocket; uint8_t *pucBuffer; @@ -649,9 +649,9 @@ xFreeRTOS_Socket_t *pxSocket; #endif /* ipconfigCAN_FRAGMENT_OUTGOING_PACKETS */ /*-----------------------------------------------------------*/ -portBASE_TYPE FreeRTOS_bind( xSocket_t xSocket, struct freertos_sockaddr * pxAddress, socklen_t xAddressLength ) +BaseType_t FreeRTOS_bind( xSocket_t xSocket, struct freertos_sockaddr * pxAddress, socklen_t xAddressLength ) { -portBASE_TYPE xReturn = 0; /* In Berkeley sockets, 0 means pass for bind(). */ +BaseType_t xReturn = 0; /* In Berkeley sockets, 0 means pass for bind(). */ xFreeRTOS_Socket_t *pxSocket; #if ipconfigALLOW_SOCKET_SEND_WITHOUT_BIND == 1 struct freertos_sockaddr xAddress; @@ -695,7 +695,7 @@ xFreeRTOS_Socket_t *pxSocket; vTaskSuspendAll(); { /* Check to ensure the port is not already in use. */ - if( pxListFindListItemWithValue( &xBoundSocketsList, ( portTickType ) pxAddress->sin_port ) != NULL ) + if( pxListFindListItemWithValue( &xBoundSocketsList, ( TickType_t ) pxAddress->sin_port ) != NULL ) { xReturn = FREERTOS_EADDRINUSE; } @@ -749,7 +749,7 @@ xFreeRTOS_Socket_t *pxSocket; } /* Tested */ /*-----------------------------------------------------------*/ -portBASE_TYPE FreeRTOS_closesocket( xSocket_t xSocket ) +BaseType_t FreeRTOS_closesocket( xSocket_t xSocket ) { xNetworkBufferDescriptor_t *pxNetworkBuffer; xFreeRTOS_Socket_t *pxSocket; @@ -795,11 +795,11 @@ void FreeRTOS_SocketsInit( void ) } /*-----------------------------------------------------------*/ -portBASE_TYPE FreeRTOS_setsockopt( xSocket_t xSocket, int32_t lLevel, int32_t lOptionName, const void *pvOptionValue, size_t xOptionLength ) +BaseType_t FreeRTOS_setsockopt( xSocket_t xSocket, int32_t lLevel, int32_t lOptionName, const void *pvOptionValue, size_t xOptionLength ) { /* The standard Berkeley function returns 0 for success. */ -portBASE_TYPE xReturn = 0; -portBASE_TYPE lOptionValue; +BaseType_t xReturn = 0; +BaseType_t lOptionValue; xFreeRTOS_Socket_t *pxSocket; pxSocket = ( xFreeRTOS_Socket_t * ) xSocket; @@ -815,7 +815,7 @@ xFreeRTOS_Socket_t *pxSocket; { case FREERTOS_SO_RCVTIMEO : /* Receive time out. */ - pxSocket->xReceiveBlockTime = *( ( portTickType * ) pvOptionValue ); + pxSocket->xReceiveBlockTime = *( ( TickType_t * ) pvOptionValue ); break; case FREERTOS_SO_SNDTIMEO : @@ -823,7 +823,7 @@ xFreeRTOS_Socket_t *pxSocket; where ipconfigMAX_SEND_BLOCK_TIME_TICKS is defined in FreeRTOSIPConfig.h (assuming an official configuration file is being used. */ - pxSocket->xSendBlockTime = *( ( portTickType * ) pvOptionValue ); + pxSocket->xSendBlockTime = *( ( TickType_t * ) pvOptionValue ); if( pxSocket->xSendBlockTime > ipconfigMAX_SEND_BLOCK_TIME_TICKS ) { pxSocket->xSendBlockTime = ipconfigMAX_SEND_BLOCK_TIME_TICKS; @@ -832,7 +832,7 @@ xFreeRTOS_Socket_t *pxSocket; case FREERTOS_SO_UDPCKSUM_OUT : /* Turn calculating of the UDP checksum on/off for this socket. */ - lOptionValue = ( portBASE_TYPE ) pvOptionValue; + lOptionValue = ( BaseType_t ) pvOptionValue; if( lOptionValue == 0 ) { @@ -854,18 +854,18 @@ xFreeRTOS_Socket_t *pxSocket; } /* Tested */ /*-----------------------------------------------------------*/ -portBASE_TYPE xProcessReceivedUDPPacket( xNetworkBufferDescriptor_t *pxNetworkBuffer, uint16_t usPort ) +BaseType_t xProcessReceivedUDPPacket( xNetworkBufferDescriptor_t *pxNetworkBuffer, uint16_t usPort ) { xListItem *pxListItem; -portBASE_TYPE xReturn = pdPASS; +BaseType_t xReturn = pdPASS; xFreeRTOS_Socket_t *pxSocket; -portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE; +BaseType_t xHigherPriorityTaskWoken = pdFALSE; vTaskSuspendAll(); { /* See if there is a list item associated with the port number on the list of bound sockets. */ - pxListItem = pxListFindListItemWithValue( &xBoundSocketsList, ( portTickType ) usPort ); + pxListItem = pxListFindListItemWithValue( &xBoundSocketsList, ( TickType_t ) usPort ); } xTaskResumeAll(); @@ -952,7 +952,7 @@ uint16_t usReturn; } /* Tested */ /*-----------------------------------------------------------*/ -xListItem * pxListFindListItemWithValue( xList *pxList, portTickType xWantedItemValue ) +xListItem * pxListFindListItemWithValue( xList *pxList, TickType_t xWantedItemValue ) { xListItem *pxIterator, *pxReturn; @@ -978,7 +978,7 @@ xListItem *pxIterator, *pxReturn; uint8_t ucOctet[ socketMAX_IP_ADDRESS_OCTETS ]; const char *pcPointerOnEntering; uint32_t ulReturn = 0UL, ulOctetNumber, ulValue; - portBASE_TYPE xResult = pdPASS; + BaseType_t xResult = pdPASS; for( ulOctetNumber = 0; ulOctetNumber < socketMAX_IP_ADDRESS_OCTETS; ulOctetNumber++ ) { diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-UDP/FreeRTOS_UDP_IP.c b/FreeRTOS-Plus/Source/FreeRTOS-Plus-UDP/FreeRTOS_UDP_IP.c index 25f99450b..6e84978e7 100644 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-UDP/FreeRTOS_UDP_IP.c +++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-UDP/FreeRTOS_UDP_IP.c @@ -95,7 +95,7 @@ #define ipIP_VERSION_AND_HEADER_LENGTH_BYTE ( ( uint8_t ) 0x45 ) /* Time delay between repeated attempts to initialise the network hardware. */ -#define ipINITIALISATION_RETRY_DELAY ( ( ( portTickType ) 3000 ) / portTICK_RATE_MS ) +#define ipINITIALISATION_RETRY_DELAY ( ( ( TickType_t ) 3000 ) / portTICK_RATE_MS ) /* The local MAC address is accessed from within xDefaultPartUDPPacketHeader, rather than duplicated in its own variable. */ @@ -220,7 +220,7 @@ static void prvReturnEthernetFrame( xNetworkBufferDescriptor_t * const pxNetwork /* * Return the checksum generated over usDataLengthBytes from pucNextData. */ -static uint16_t prvGenerateChecksum( const uint8_t * const pucNextData, const uint16_t usDataLengthBytes, portBASE_TYPE xChecksumIsOffloaded ); +static uint16_t prvGenerateChecksum( const uint8_t * const pucNextData, const uint16_t usDataLengthBytes, BaseType_t xChecksumIsOffloaded ); /* * The callback function that is assigned to all periodic processing timers - @@ -246,7 +246,7 @@ static void prvRefreshARPCacheEntry( const xMACAddress_t * const pxMACAddress, c * Creates the pseudo header necessary then generate the checksum over the UDP * packet. Returns the calculated checksum. */ -static uint16_t prvGenerateUDPChecksum( const xUDPPacket_t * const pxUDPPacket, portBASE_TYPE xChecksumIsOffloaded ); +static uint16_t prvGenerateUDPChecksum( const xUDPPacket_t * const pxUDPPacket, BaseType_t xChecksumIsOffloaded ); /* * Look for ulIPAddress in the ARP cache. If the IP address exists, copy the @@ -293,7 +293,7 @@ static void prvCompleteUDPHeader( xNetworkBufferDescriptor_t *pxNetworkBuffer, x * zero. Return pdPASS if the message was sent successfully, otherwise return * pdFALSE. */ -static portBASE_TYPE prvSendEventToIPTask( eIPEvent_t eEvent ); +static BaseType_t prvSendEventToIPTask( eIPEvent_t eEvent ); /* * Generate and send an ARP request for the IP address passed in ulIPAddress. @@ -335,7 +335,7 @@ static xTimerHandle xARPTimer = NULL; /* Used to ensure network down events cannot be missed when they cannot be posted to the network event queue because the network event queue is already full. */ -static portBASE_TYPE xNetworkDownEventPending = pdFALSE; +static BaseType_t xNetworkDownEventPending = pdFALSE; /* For convenience, a MAC address of all zeros and another of all 0xffs are defined const for quick reference. */ @@ -463,7 +463,7 @@ xIPStackEvent_t xReceivedEvent; void FreeRTOS_NetworkDown( void ) { static const xIPStackEvent_t xNetworkDownEvent = { eNetworkDownEvent, NULL }; -const portTickType xDontBlock = 0; +const TickType_t xDontBlock = 0; /* Simply send the network task the appropriate event. */ if( xQueueSendToBack( xNetworkEventQueue, &xNetworkDownEvent, xDontBlock ) != pdPASS ) @@ -479,10 +479,10 @@ const portTickType xDontBlock = 0; } /*-----------------------------------------------------------*/ -portBASE_TYPE FreeRTOS_NetworkDownFromISR( void ) +BaseType_t FreeRTOS_NetworkDownFromISR( void ) { static const xIPStackEvent_t xNetworkDownEvent = { eNetworkDownEvent, NULL }; -portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE; +BaseType_t xHigherPriorityTaskWoken = pdFALSE; /* Simply send the network task the appropriate event. */ if( xQueueSendToBackFromISR( xNetworkEventQueue, &xNetworkDownEvent, &xHigherPriorityTaskWoken ) != pdPASS ) @@ -499,7 +499,7 @@ portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE; } /*-----------------------------------------------------------*/ -void *FreeRTOS_GetUDPPayloadBuffer( size_t xRequestedSizeBytes, portTickType xBlockTimeTicks ) +void *FreeRTOS_GetUDPPayloadBuffer( size_t xRequestedSizeBytes, TickType_t xBlockTimeTicks ) { xNetworkBufferDescriptor_t *pxNetworkBuffer; void *pvReturn; @@ -547,9 +547,9 @@ uint8_t * FreeRTOS_GetMACAddress( void ) } /*-----------------------------------------------------------*/ -portBASE_TYPE FreeRTOS_IPInit( const uint8_t ucIPAddress[ ipIP_ADDRESS_LENGTH_BYTES ], const uint8_t ucNetMask[ ipIP_ADDRESS_LENGTH_BYTES ], const uint8_t ucGatewayAddress[ ipIP_ADDRESS_LENGTH_BYTES ], const uint8_t ucDNSServerAddress[ ipIP_ADDRESS_LENGTH_BYTES ], const uint8_t ucMACAddress[ ipMAC_ADDRESS_LENGTH_BYTES ] ) +BaseType_t FreeRTOS_IPInit( const uint8_t ucIPAddress[ ipIP_ADDRESS_LENGTH_BYTES ], const uint8_t ucNetMask[ ipIP_ADDRESS_LENGTH_BYTES ], const uint8_t ucGatewayAddress[ ipIP_ADDRESS_LENGTH_BYTES ], const uint8_t ucDNSServerAddress[ ipIP_ADDRESS_LENGTH_BYTES ], const uint8_t ucMACAddress[ ipMAC_ADDRESS_LENGTH_BYTES ] ) { -static portBASE_TYPE xReturn = pdFALSE; +static BaseType_t xReturn = pdFALSE; /* Only create the IP event queue if it has not already been created, in case this function is called more than once. */ @@ -632,11 +632,11 @@ void FreeRTOS_GetAddressConfiguration( uint32_t *pulIPAddress, uint32_t *pulNetM #if ( ipconfigSUPPORT_OUTGOING_PINGS == 1 ) - portBASE_TYPE FreeRTOS_SendPingRequest( uint32_t ulIPAddress, size_t xNumberOfBytesToSend, portTickType xBlockTimeTicks ) + BaseType_t FreeRTOS_SendPingRequest( uint32_t ulIPAddress, size_t xNumberOfBytesToSend, TickType_t xBlockTimeTicks ) { xNetworkBufferDescriptor_t *pxNetworkBuffer; xICMPHeader_t *pxICMPHeader; - portBASE_TYPE xReturn = pdFAIL; + BaseType_t xReturn = pdFAIL; static uint16_t usSequenceNumber = 0; uint8_t *pucChar; xIPStackEvent_t xStackTxEvent = { eStackTxEvent, NULL }; @@ -699,11 +699,11 @@ void FreeRTOS_GetAddressConfiguration( uint32_t *pulIPAddress, uint32_t *pulNetM /*-----------------------------------------------------------*/ -static portBASE_TYPE prvSendEventToIPTask( eIPEvent_t eEvent ) +static BaseType_t prvSendEventToIPTask( eIPEvent_t eEvent ) { xIPStackEvent_t xEventMessage; -const portTickType xDontBlock = 0; -portBASE_TYPE xReturn; +const TickType_t xDontBlock = 0; +BaseType_t xReturn; xEventMessage.eEventType = eEvent; xReturn = xQueueSendToBack( xNetworkEventQueue, &xEventMessage, xDontBlock ); @@ -724,7 +724,7 @@ eIPEvent_t eMessage; /* This time can be used to send more than one type of message to the IP task. The message ID is stored in the ID of the timer. The strange casting is to avoid compiler warnings. */ - eMessage = ( eIPEvent_t ) ( ( portBASE_TYPE ) pvTimerGetTimerID( xTimer ) ); + eMessage = ( eIPEvent_t ) ( ( BaseType_t ) pvTimerGetTimerID( xTimer ) ); prvSendEventToIPTask( eMessage ); } @@ -748,7 +748,7 @@ xNetworkBufferDescriptor_t *pxNetworkBuffer; static void prvAgeARPCache( void ) { -portBASE_TYPE x; +BaseType_t x; /* Loop through each entry in the ARP cache. */ for( x = 0; x < ipconfigARP_CACHE_ENTRIES; x++ ) @@ -791,7 +791,7 @@ portBASE_TYPE x; static eARPLookupResult_t prvGetARPCacheEntry( uint32_t *pulIPAddress, xMACAddress_t * const pxMACAddress ) { -portBASE_TYPE x; +BaseType_t x; eARPLookupResult_t eReturn; uint32_t ulAddressToLookup; @@ -873,7 +873,7 @@ uint32_t ulAddressToLookup; static void prvRefreshARPCacheEntry( const xMACAddress_t * const pxMACAddress, const uint32_t ulIPAddress ) { -portBASE_TYPE x, xEntryFound = pdFALSE, xOldestEntry = 0; +BaseType_t x, xEntryFound = pdFALSE, xOldestEntry = 0; uint8_t ucMinAgeFound = 0U; /* Only process the IP address if it is on the local network. */ @@ -1355,7 +1355,7 @@ static void prvProcessNetworkDownEvent( void ) #if ipconfigUSE_NETWORK_EVENT_HOOK == 1 { - static portBASE_TYPE xCallEventHook = pdFALSE; + static BaseType_t xCallEventHook = pdFALSE; /* The first network down event is generated by the IP stack itself to initialise the network hardware, so do not call the @@ -1480,7 +1480,7 @@ static eFrameProcessingResult_t prvProcessIPPacket( const xIPPacket_t * const px eFrameProcessingResult_t eReturn = eReleaseBuffer; const xIPHeader_t * pxIPHeader; xUDPPacket_t *pxUDPPacket; -portBASE_TYPE xChecksumIsCorrect; +BaseType_t xChecksumIsCorrect; pxIPHeader = &( pxIPPacket->xIPHeader ); @@ -1569,7 +1569,7 @@ portBASE_TYPE xChecksumIsCorrect; } /*-----------------------------------------------------------*/ -static uint16_t prvGenerateUDPChecksum( const xUDPPacket_t * const pxUDPPacket, portBASE_TYPE xChecksumIsOffloaded ) +static uint16_t prvGenerateUDPChecksum( const xUDPPacket_t * const pxUDPPacket, BaseType_t xChecksumIsOffloaded ) { xPseudoHeader_t *pxPseudoHeader; uint16_t usLength, usReturn; @@ -1727,7 +1727,7 @@ uint16_t usLength, usReturn; #endif /* ( ipconfigREPLY_TO_INCOMING_PINGS == 1 ) || ( ipconfigSUPPORT_OUTGOING_PINGS == 1 ) */ /*-----------------------------------------------------------*/ -static uint16_t prvGenerateChecksum( const uint8_t * const pucNextData, const uint16_t usDataLengthBytes, portBASE_TYPE xChecksumIsOffloaded ) +static uint16_t prvGenerateChecksum( const uint8_t * const pucNextData, const uint16_t usDataLengthBytes, BaseType_t xChecksumIsOffloaded ) { uint32_t ulChecksum = 0; uint16_t us, usDataLength16BitWords, *pusNextData, usReturn; diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-UDP/include/FreeRTOS_DHCP.h b/FreeRTOS-Plus/Source/FreeRTOS-Plus-UDP/include/FreeRTOS_DHCP.h index d411506c6..0136c9613 100644 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-UDP/include/FreeRTOS_DHCP.h +++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-UDP/include/FreeRTOS_DHCP.h @@ -50,7 +50,7 @@ /* * NOT A PUBLIC API FUNCTION. */ -void vDHCPProcess( portBASE_TYPE xReset, xMACAddress_t *pxMACAddress, uint32_t *pulIPAddress, xNetworkAddressingParameters_t *pxNetworkAddressing ); +void vDHCPProcess( BaseType_t xReset, xMACAddress_t *pxMACAddress, uint32_t *pulIPAddress, xNetworkAddressingParameters_t *pxNetworkAddressing ); #endif /* FREERTOS_DHCP_H */ diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-UDP/include/FreeRTOS_IP_Private.h b/FreeRTOS-Plus/Source/FreeRTOS-Plus-UDP/include/FreeRTOS_IP_Private.h index c654e586b..881db283c 100644 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-UDP/include/FreeRTOS_IP_Private.h +++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-UDP/include/FreeRTOS_IP_Private.h @@ -294,7 +294,7 @@ void vNetworkBufferRelease( xNetworkBufferDescriptor_t * const pxNetworkBuffer ) * interrupt. If a non zero value is returned, then the calling ISR should * perform a context switch before exiting the ISR. */ -portBASE_TYPE FreeRTOS_ReleaseFreeNetworkBufferFromISR( void ); +BaseType_t FreeRTOS_ReleaseFreeNetworkBufferFromISR( void ); /* * Create a message that contains a command to initialise the network interface. @@ -309,7 +309,7 @@ portBASE_TYPE FreeRTOS_ReleaseFreeNetworkBufferFromISR( void ); * the interrupt is exited. */ void FreeRTOS_NetworkDown( void ); -portBASE_TYPE FreeRTOS_NetworkDownFromISR( void ); +BaseType_t FreeRTOS_NetworkDownFromISR( void ); /* * Inspect an Ethernet frame to see if it contains data that the stack needs to @@ -319,11 +319,11 @@ portBASE_TYPE FreeRTOS_NetworkDownFromISR( void ); eFrameProcessingResult_t eConsiderFrameForProcessing( const uint8_t * const pucEthernetBuffer ); #if( ipconfigINCLUDE_TEST_CODE == 1 ) - unsigned portBASE_TYPE uxGetNumberOfFreeNetworkBuffers( void ); + UBaseType_t uxGetNumberOfFreeNetworkBuffers( void ); #endif /* ipconfigINCLUDE_TEST_CODE */ /* Socket related private functions. */ -portBASE_TYPE xProcessReceivedUDPPacket( xNetworkBufferDescriptor_t *pxNetworkBuffer, uint16_t usPort ); +BaseType_t xProcessReceivedUDPPacket( xNetworkBufferDescriptor_t *pxNetworkBuffer, uint16_t usPort ); void FreeRTOS_SocketsInit( void ); /* If FreeRTOS+NABTO is included then include the prototype of the function that diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-UDP/include/FreeRTOS_Sockets.h b/FreeRTOS-Plus/Source/FreeRTOS-Plus-UDP/include/FreeRTOS_Sockets.h index e8a62d089..0cf24d82f 100644 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-UDP/include/FreeRTOS_Sockets.h +++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-UDP/include/FreeRTOS_Sockets.h @@ -148,20 +148,20 @@ typedef void *xSocketSet_t; * FUNCTIONS IS AVAILABLE ON THE FOLLOWING URL: * http://www.FreeRTOS.org/FreeRTOS-Plus/FreeRTOS_Plus_UDP/FreeRTOS_UDP_API_Functions.shtml */ -xSocket_t FreeRTOS_socket( portBASE_TYPE xDomain, portBASE_TYPE xType, portBASE_TYPE xProtocol ); +xSocket_t FreeRTOS_socket( BaseType_t xDomain, BaseType_t xType, BaseType_t xProtocol ); int32_t FreeRTOS_recvfrom( xSocket_t xSocket, void *pvBuffer, size_t xBufferLength, uint32_t ulFlags, struct freertos_sockaddr *pxSourceAddress, socklen_t *pxSourceAddressLength ); int32_t FreeRTOS_sendto( xSocket_t xSocket, const void *pvBuffer, size_t xTotalDataLength, uint32_t ulFlags, const struct freertos_sockaddr *pxDestinationAddress, socklen_t xDestinationAddressLength ); -portBASE_TYPE FreeRTOS_bind( xSocket_t xSocket, struct freertos_sockaddr *pxAddress, socklen_t xAddressLength ); -portBASE_TYPE FreeRTOS_setsockopt( xSocket_t xSocket, int32_t lLevel, int32_t lOptionName, const void *pvOptionValue, size_t xOptionLength ); -portBASE_TYPE FreeRTOS_closesocket( xSocket_t xSocket ); +BaseType_t FreeRTOS_bind( xSocket_t xSocket, struct freertos_sockaddr *pxAddress, socklen_t xAddressLength ); +BaseType_t FreeRTOS_setsockopt( xSocket_t xSocket, int32_t lLevel, int32_t lOptionName, const void *pvOptionValue, size_t xOptionLength ); +BaseType_t FreeRTOS_closesocket( xSocket_t xSocket ); uint32_t FreeRTOS_gethostbyname( const char *pcHostName ); uint32_t FreeRTOS_inet_addr( const char *pcIPAddress ); #if ipconfigSUPPORT_SELECT_FUNCTION == 1 - xSocketSet_t FreeRTOS_CreateSocketSet( unsigned portBASE_TYPE uxEventQueueLength ); - portBASE_TYPE FreeRTOS_FD_SET( xSocket_t xSocket, xSocketSet_t xSocketSet ); - portBASE_TYPE FreeRTOS_FD_CLR( xSocket_t xSocket, xSocketSet_t xSocketSet ); - xSocket_t FreeRTOS_select( xSocketSet_t xSocketSet, portTickType xBlockTimeTicks ); + xSocketSet_t FreeRTOS_CreateSocketSet( UBaseType_t uxEventQueueLength ); + BaseType_t FreeRTOS_FD_SET( xSocket_t xSocket, xSocketSet_t xSocketSet ); + BaseType_t FreeRTOS_FD_CLR( xSocket_t xSocket, xSocketSet_t xSocketSet ); + xSocket_t FreeRTOS_select( xSocketSet_t xSocketSet, TickType_t xBlockTimeTicks ); #endif /* ipconfigSUPPORT_SELECT_FUNCTION */ #endif /* FREERTOS_UDP_H */ diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-UDP/include/FreeRTOS_UDP_IP.h b/FreeRTOS-Plus/Source/FreeRTOS-Plus-UDP/include/FreeRTOS_UDP_IP.h index af19ce46b..ce6319871 100644 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-UDP/include/FreeRTOS_UDP_IP.h +++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-UDP/include/FreeRTOS_UDP_IP.h @@ -98,17 +98,17 @@ typedef enum ePING_REPLY_STATUS * FUNCTIONS IS AVAILABLE ON THE FOLLOWING URL: * http://www.FreeRTOS.org/FreeRTOS-Plus/FreeRTOS_Plus_UDP/FreeRTOS_UDP_API_Functions.shtml */ -portBASE_TYPE FreeRTOS_IPInit( const uint8_t ucIPAddress[ ipIP_ADDRESS_LENGTH_BYTES ], const uint8_t ucNetMask[ ipIP_ADDRESS_LENGTH_BYTES ], const uint8_t ucGatewayAddress[ ipIP_ADDRESS_LENGTH_BYTES ], const uint8_t ucDNSServerAddress[ ipIP_ADDRESS_LENGTH_BYTES ], const uint8_t ucMACAddress[ ipMAC_ADDRESS_LENGTH_BYTES ] ); -void * FreeRTOS_GetUDPPayloadBuffer( size_t xRequestedSizeBytes, portTickType xBlockTimeTicks ); +BaseType_t FreeRTOS_IPInit( const uint8_t ucIPAddress[ ipIP_ADDRESS_LENGTH_BYTES ], const uint8_t ucNetMask[ ipIP_ADDRESS_LENGTH_BYTES ], const uint8_t ucGatewayAddress[ ipIP_ADDRESS_LENGTH_BYTES ], const uint8_t ucDNSServerAddress[ ipIP_ADDRESS_LENGTH_BYTES ], const uint8_t ucMACAddress[ ipMAC_ADDRESS_LENGTH_BYTES ] ); +void * FreeRTOS_GetUDPPayloadBuffer( size_t xRequestedSizeBytes, TickType_t xBlockTimeTicks ); void FreeRTOS_GetAddressConfiguration( uint32_t *pulIPAddress, uint32_t *pulNetMask, uint32_t *pulGatewayAddress, uint32_t *pulDNSServerAddress ); -portBASE_TYPE FreeRTOS_SendPingRequest( uint32_t ulIPAddress, size_t xNumberOfBytesToSend, portTickType xBlockTimeTicks ); +BaseType_t FreeRTOS_SendPingRequest( uint32_t ulIPAddress, size_t xNumberOfBytesToSend, TickType_t xBlockTimeTicks ); void vApplicationIPNetworkEventHook( eIPCallbackEvent_t eNetworkEvent ); void vApplicationPingReplyHook( ePingReplyStatus_t eStatus, uint16_t usIdentifier ); void FreeRTOS_ReleaseUDPPayloadBuffer( void *pvBuffer ); uint8_t * FreeRTOS_GetMACAddress( void ); #if ( ipconfigFREERTOS_PLUS_NABTO == 1 ) - portBASE_TYPE xStartNabtoTask( void ); + BaseType_t xStartNabtoTask( void ); #endif #endif /* FREERTOS_IP_H */ diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-UDP/include/NetworkBufferManagement.h b/FreeRTOS-Plus/Source/FreeRTOS-Plus-UDP/include/NetworkBufferManagement.h index fd6778cf1..2db7ffb59 100644 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-UDP/include/NetworkBufferManagement.h +++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-UDP/include/NetworkBufferManagement.h @@ -44,11 +44,11 @@ #define NETWORK_BUFFER_MANAGEMENT_H /* NOTE PUBLIC API FUNCTIONS. */ -portBASE_TYPE xNetworkBuffersInitialise( void ); -xNetworkBufferDescriptor_t *pxNetworkBufferGet( size_t xRequestedSizeBytes, portTickType xBlockTimeTicks ); +BaseType_t xNetworkBuffersInitialise( void ); +xNetworkBufferDescriptor_t *pxNetworkBufferGet( size_t xRequestedSizeBytes, TickType_t xBlockTimeTicks ); xNetworkBufferDescriptor_t *pxNetworkBufferGetFromISR( size_t xRequestedSizeBytes ); void vNetworkBufferRelease( xNetworkBufferDescriptor_t * const pxNetworkBuffer ); -portBASE_TYPE vNetworkBufferReleaseFromISR( xNetworkBufferDescriptor_t * const pxNetworkBuffer ); +BaseType_t vNetworkBufferReleaseFromISR( xNetworkBufferDescriptor_t * const pxNetworkBuffer ); uint8_t *pucEthernetBufferGet( size_t *pxRequestedSizeBytes ); void vEthernetBufferRelease( uint8_t *pucEthernetBuffer ); diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-UDP/include/NetworkInterface.h b/FreeRTOS-Plus/Source/FreeRTOS-Plus-UDP/include/NetworkInterface.h index 85e714119..bdae91791 100644 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-UDP/include/NetworkInterface.h +++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-UDP/include/NetworkInterface.h @@ -44,8 +44,8 @@ #define NETWORK_INTERFACE_H /* NOTE PUBLIC API FUNCTIONS. */ -portBASE_TYPE xNetworkInterfaceInitialise( void ); -portBASE_TYPE xNetworkInterfaceOutput( xNetworkBufferDescriptor_t * const pxNetworkBuffer ); +BaseType_t xNetworkInterfaceInitialise( void ); +BaseType_t xNetworkInterfaceOutput( xNetworkBufferDescriptor_t * const pxNetworkBuffer ); void vNetworkInterfaceAllocateRAMToBuffers( xNetworkBufferDescriptor_t pxNetworkBuffers[ ipconfigNUM_NETWORK_BUFFERS ] ); #endif /* NETWORK_INTERFACE_H */ diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-UDP/portable/BufferManagement/BufferAllocation_1.c b/FreeRTOS-Plus/Source/FreeRTOS-Plus-UDP/portable/BufferManagement/BufferAllocation_1.c index 743b41e19..93c9a5472 100644 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-UDP/portable/BufferManagement/BufferAllocation_1.c +++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-UDP/portable/BufferManagement/BufferAllocation_1.c @@ -82,9 +82,9 @@ static xSemaphoreHandle xNetworkBufferSemaphore = NULL; /*-----------------------------------------------------------*/ -portBASE_TYPE xNetworkBuffersInitialise( void ) +BaseType_t xNetworkBuffersInitialise( void ) { -portBASE_TYPE xReturn, x; +BaseType_t xReturn, x; /* Only initialise the buffers and their associated kernel objects if they have not been initialised before. */ @@ -126,7 +126,7 @@ portBASE_TYPE xReturn, x; } /*-----------------------------------------------------------*/ -xNetworkBufferDescriptor_t *pxNetworkBufferGet( size_t xRequestedSizeBytes, portTickType xBlockTimeTicks ) +xNetworkBufferDescriptor_t *pxNetworkBufferGet( size_t xRequestedSizeBytes, TickType_t xBlockTimeTicks ) { xNetworkBufferDescriptor_t *pxReturn = NULL; @@ -158,7 +158,7 @@ xNetworkBufferDescriptor_t *pxReturn = NULL; xNetworkBufferDescriptor_t *pxNetworkBufferGetFromISR( size_t xRequestedSizeBytes ) { xNetworkBufferDescriptor_t *pxReturn = NULL; -unsigned portBASE_TYPE uxSavedInterruptStatus; +UBaseType_t uxSavedInterruptStatus; /*_RB_ The current implementation only has a single size memory block, so the requested size parameter is not used (yet). */ @@ -194,10 +194,10 @@ unsigned portBASE_TYPE uxSavedInterruptStatus; } /*-----------------------------------------------------------*/ -portBASE_TYPE vNetworkBufferReleaseFromISR( xNetworkBufferDescriptor_t * const pxNetworkBuffer ) +BaseType_t vNetworkBufferReleaseFromISR( xNetworkBufferDescriptor_t * const pxNetworkBuffer ) { -unsigned portBASE_TYPE uxSavedInterruptStatus; -portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE; +UBaseType_t uxSavedInterruptStatus; +BaseType_t xHigherPriorityTaskWoken = pdFALSE; /* Ensure the buffer is returned to the list of free buffers before the counting semaphore is 'given' to say a buffer is available. */ @@ -216,7 +216,7 @@ portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE; void vNetworkBufferRelease( xNetworkBufferDescriptor_t * const pxNetworkBuffer ) { -portBASE_TYPE xListItemAlreadyInFreeList; +BaseType_t xListItemAlreadyInFreeList; /* Ensure the buffer is returned to the list of free buffers before the counting semaphore is 'given' to say a buffer is available. */ @@ -240,7 +240,7 @@ portBASE_TYPE xListItemAlreadyInFreeList; #if( ipconfigINCLUDE_TEST_CODE == 1 ) -unsigned portBASE_TYPE uxGetNumberOfFreeNetworkBuffers( void ) +UBaseType_t uxGetNumberOfFreeNetworkBuffers( void ) { return listCURRENT_LIST_LENGTH( &xFreeBuffersList ); } diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-UDP/portable/BufferManagement/BufferAllocation_2.c b/FreeRTOS-Plus/Source/FreeRTOS-Plus-UDP/portable/BufferManagement/BufferAllocation_2.c index db22a5831..34d6d78b8 100644 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-UDP/portable/BufferManagement/BufferAllocation_2.c +++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-UDP/portable/BufferManagement/BufferAllocation_2.c @@ -85,9 +85,9 @@ static xSemaphoreHandle xNetworkBufferSemaphore = NULL; /*-----------------------------------------------------------*/ -portBASE_TYPE xNetworkBuffersInitialise( void ) +BaseType_t xNetworkBuffersInitialise( void ) { -portBASE_TYPE xReturn, x; +BaseType_t xReturn, x; /* Only initialise the buffers and their associated kernel objects if they have not been initialised before. */ @@ -177,7 +177,7 @@ void vEthernetBufferRelease( uint8_t *pucEthernetBuffer ) } /*-----------------------------------------------------------*/ -xNetworkBufferDescriptor_t *pxNetworkBufferGet( size_t xRequestedSizeBytes, portTickType xBlockTimeTicks ) +xNetworkBufferDescriptor_t *pxNetworkBufferGet( size_t xRequestedSizeBytes, TickType_t xBlockTimeTicks ) { xNetworkBufferDescriptor_t *pxReturn = NULL; @@ -247,7 +247,7 @@ xNetworkBufferDescriptor_t *pxReturn = NULL; void vNetworkBufferRelease( xNetworkBufferDescriptor_t * const pxNetworkBuffer ) { -portBASE_TYPE xListItemAlreadyInFreeList; +BaseType_t xListItemAlreadyInFreeList; /* Ensure the buffer is returned to the list of free buffers before the counting semaphore is 'given' to say a buffer is available. Release the @@ -277,7 +277,7 @@ portBASE_TYPE xListItemAlreadyInFreeList; #if( ipconfigINCLUDE_TEST_CODE == 1 ) -unsigned portBASE_TYPE uxGetNumberOfFreeNetworkBuffers( void ) +UBaseType_t uxGetNumberOfFreeNetworkBuffers( void ) { return listCURRENT_LIST_LENGTH( &xFreeBuffersList ); } diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-UDP/portable/NetworkInterface/LPC17xx/NetworkInterface.c b/FreeRTOS-Plus/Source/FreeRTOS-Plus-UDP/portable/NetworkInterface/LPC17xx/NetworkInterface.c index 6d8476882..2db09bb8e 100644 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-UDP/portable/NetworkInterface/LPC17xx/NetworkInterface.c +++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-UDP/portable/NetworkInterface/LPC17xx/NetworkInterface.c @@ -75,7 +75,7 @@ task performing the transmit will block for niTX_BUFFER_FREE_WAIT milliseconds. It will do this a maximum of niMAX_TX_ATTEMPTS before giving up. */ -#define niTX_BUFFER_FREE_WAIT ( ( portTickType ) 2UL / portTICK_RATE_MS ) +#define niTX_BUFFER_FREE_WAIT ( ( TickType_t ) 2UL / portTICK_RATE_MS ) #define niMAX_TX_ATTEMPTS ( 5 ) /* The length of the queue used to send interrupt status words from the @@ -99,11 +99,11 @@ interrupt is received. */ static xSemaphoreHandle xEMACRxEventSemaphore = NULL; /*-----------------------------------------------------------*/ -portBASE_TYPE xNetworkInterfaceInitialise( void ) +BaseType_t xNetworkInterfaceInitialise( void ) { EMAC_CFG_Type Emac_Config; PINSEL_CFG_Type xPinConfig; -portBASE_TYPE xStatus, xReturn; +BaseType_t xStatus, xReturn; extern uint8_t ucMACAddress[ 6 ]; /* Enable Ethernet Pins */ @@ -142,9 +142,9 @@ extern uint8_t ucMACAddress[ 6 ]; } /*-----------------------------------------------------------*/ -portBASE_TYPE xNetworkInterfaceOutput( xNetworkBufferDescriptor_t * const pxNetworkBuffer ) +BaseType_t xNetworkInterfaceOutput( xNetworkBufferDescriptor_t * const pxNetworkBuffer ) { -portBASE_TYPE xReturn = pdFAIL; +BaseType_t xReturn = pdFAIL; int32_t x; extern void EMAC_StartTransmitNextBuffer( uint32_t ulLength ); extern void EMAC_SetNextPacketToSend( uint8_t * pucBuffer ); @@ -252,7 +252,7 @@ extern uint8_t *EMAC_NextPacketToRead( void ); stack. No storage is required as the network buffer will point directly to the buffer that already holds the received data. */ - pxNetworkBuffer = pxNetworkBufferGet( 0, ( portTickType ) 0 ); + pxNetworkBuffer = pxNetworkBufferGet( 0, ( TickType_t ) 0 ); if( pxNetworkBuffer != NULL ) { @@ -262,7 +262,7 @@ extern uint8_t *EMAC_NextPacketToRead( void ); /* Data was received and stored. Send a message to the IP task to let it know. */ - if( xQueueSendToBack( xNetworkEventQueue, &xRxEvent, ( portTickType ) 0 ) == pdFALSE ) + if( xQueueSendToBack( xNetworkEventQueue, &xRxEvent, ( TickType_t ) 0 ) == pdFALSE ) { vNetworkBufferRelease( pxNetworkBuffer ); iptraceETHERNET_RX_EVENT_LOST(); diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-UDP/portable/NetworkInterface/LPC18xx/Using_CMSISv2p10_LPC18xx_DriverLib/NetworkInterface.c b/FreeRTOS-Plus/Source/FreeRTOS-Plus-UDP/portable/NetworkInterface/LPC18xx/Using_CMSISv2p10_LPC18xx_DriverLib/NetworkInterface.c index e2e0f64ef..1983d8532 100644 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-UDP/portable/NetworkInterface/LPC18xx/Using_CMSISv2p10_LPC18xx_DriverLib/NetworkInterface.c +++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-UDP/portable/NetworkInterface/LPC18xx/Using_CMSISv2p10_LPC18xx_DriverLib/NetworkInterface.c @@ -71,7 +71,7 @@ operation will be held in the Blocked state (so other tasks can execute) for niTX_BUFFER_FREE_WAIT ticks. It will do this a maximum of niMAX_TX_ATTEMPTS before giving up. */ -#define niTX_BUFFER_FREE_WAIT ( ( portTickType ) 2UL / portTICK_RATE_MS ) +#define niTX_BUFFER_FREE_WAIT ( ( TickType_t ) 2UL / portTICK_RATE_MS ) #define niMAX_TX_ATTEMPTS ( 5 ) /*-----------------------------------------------------------*/ @@ -92,10 +92,10 @@ static xSemaphoreHandle xEMACRxEventSemaphore = NULL; /*-----------------------------------------------------------*/ -portBASE_TYPE xNetworkInterfaceInitialise( void ) +BaseType_t xNetworkInterfaceInitialise( void ) { EMAC_CFG_Type Emac_Config; -portBASE_TYPE xReturn; +BaseType_t xReturn; extern uint8_t ucMACAddress[ 6 ]; Emac_Config.pbEMAC_Addr = ucMACAddress; @@ -141,9 +141,9 @@ extern uint8_t ucMACAddress[ 6 ]; } /*-----------------------------------------------------------*/ -portBASE_TYPE xNetworkInterfaceOutput( xNetworkBufferDescriptor_t * const pxNetworkBuffer ) +BaseType_t xNetworkInterfaceOutput( xNetworkBufferDescriptor_t * const pxNetworkBuffer ) { -portBASE_TYPE xReturn = pdFAIL; +BaseType_t xReturn = pdFAIL; int32_t x; /* Attempt to obtain access to a Tx descriptor. */ @@ -236,7 +236,7 @@ xIPStackEvent_t xRxEvent = { eEthernetRxEvent, NULL }; { /* The buffer filled by the DMA is going to be passed into the IP stack. Allocate another buffer for the DMA descriptor. */ - pxNetworkBuffer = pxNetworkBufferGet( ipTOTAL_ETHERNET_FRAME_SIZE, ( portTickType ) 0 ); + pxNetworkBuffer = pxNetworkBufferGet( ipTOTAL_ETHERNET_FRAME_SIZE, ( TickType_t ) 0 ); if( pxNetworkBuffer != NULL ) { @@ -273,7 +273,7 @@ xIPStackEvent_t xRxEvent = { eEthernetRxEvent, NULL }; /* Data was received and stored. Send it to the IP task for processing. */ xRxEvent.pvData = ( void * ) pxNetworkBuffer; - if( xQueueSendToBack( xNetworkEventQueue, &xRxEvent, ( portTickType ) 0 ) == pdFALSE ) + if( xQueueSendToBack( xNetworkEventQueue, &xRxEvent, ( TickType_t ) 0 ) == pdFALSE ) { /* The buffer could not be sent to the IP task so the buffer must be released. */ diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-UDP/portable/NetworkInterface/LPC18xx/Using_CMSISv2p10_LPC18xx_DriverLib/lpc18xx_emac.c b/FreeRTOS-Plus/Source/FreeRTOS-Plus-UDP/portable/NetworkInterface/LPC18xx/Using_CMSISv2p10_LPC18xx_DriverLib/lpc18xx_emac.c index 5162f4d75..98730ada5 100644 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-UDP/portable/NetworkInterface/LPC18xx/Using_CMSISv2p10_LPC18xx_DriverLib/lpc18xx_emac.c +++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-UDP/portable/NetworkInterface/LPC18xx/Using_CMSISv2p10_LPC18xx_DriverLib/lpc18xx_emac.c @@ -81,13 +81,13 @@ static void setEmacAddr( uint8_t abStationAddr[] ); * all remain interrupts are disabled * (Ref. from LPC17xx UM) **********************************************************************/ -portBASE_TYPE EMAC_Init(EMAC_CFG_Type *EMAC_ConfigStruct) +BaseType_t EMAC_Init(EMAC_CFG_Type *EMAC_ConfigStruct) { int32_t id1, id2, regv, phy = 0; int32_t phy_linkstatus_reg, phy_linkstatus_mask; uint32_t x; const uint32_t ulMaxAttempts = 250UL; -portBASE_TYPE xReturn = pdPASS; +BaseType_t xReturn = pdPASS; /* Enable Ethernet Pins (NGX LPC1830 Xplorer. */ scu_pinmux(0x2 ,0 , (MD_EHS | MD_PLN | MD_EZI | MD_ZI), FUNC7); @@ -287,9 +287,9 @@ portBASE_TYPE xReturn = pdPASS; /*********************************************************************//** **********************************************************************/ -portBASE_TYPE EMAC_CheckTransmitIndex( void ) +BaseType_t EMAC_CheckTransmitIndex( void ) { -portBASE_TYPE xReturn; +BaseType_t xReturn; if( ( Tx_Desc[ TxDescIndex ].Status & OWN_BIT ) == 0 ) { @@ -374,9 +374,9 @@ void EMAC_UpdateRxConsumeIndex( void ) * it means there're available data has been received. They should be read * out and released the Receive Data Buffer by updating the RxConsumeIndex value. **********************************************************************/ -portBASE_TYPE EMAC_CheckReceiveIndex(void) +BaseType_t EMAC_CheckReceiveIndex(void) { -portBASE_TYPE xReturn; +BaseType_t xReturn; if( ( Rx_Desc[ RxDescIndex ].Status & OWN_BIT ) == 0 ) { diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-UDP/portable/NetworkInterface/LPC18xx/Using_CMSISv2p10_LPC18xx_DriverLib/lpc18xx_emac.h b/FreeRTOS-Plus/Source/FreeRTOS-Plus-UDP/portable/NetworkInterface/LPC18xx/Using_CMSISv2p10_LPC18xx_DriverLib/lpc18xx_emac.h index cc4444d7d..1c318fcc8 100644 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-UDP/portable/NetworkInterface/LPC18xx/Using_CMSISv2p10_LPC18xx_DriverLib/lpc18xx_emac.h +++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-UDP/portable/NetworkInterface/LPC18xx/Using_CMSISv2p10_LPC18xx_DriverLib/lpc18xx_emac.h @@ -215,15 +215,15 @@ typedef struct { /* Prototypes */ -portBASE_TYPE EMAC_Init(EMAC_CFG_Type *EMAC_ConfigStruct); +BaseType_t EMAC_Init(EMAC_CFG_Type *EMAC_ConfigStruct); int32_t EMAC_UpdatePHYStatus(void); uint32_t EMAC_GetReceiveDataSize(void); void EMAC_StartTransmitNextBuffer( uint32_t ulLength ); void EMAC_SetNextPacketToSend( uint8_t * pucBuffer ); void EMAC_NextPacketToRead( xNetworkBufferDescriptor_t *pxNetworkBuffer ); void EMAC_UpdateRxConsumeIndex(void); -portBASE_TYPE EMAC_CheckReceiveIndex(void); -portBASE_TYPE EMAC_CheckTransmitIndex(void); +BaseType_t EMAC_CheckReceiveIndex(void); +BaseType_t EMAC_CheckTransmitIndex(void); #ifdef __cplusplus } diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-UDP/portable/NetworkInterface/LPC18xx/Using_LPCOpen_Library/NetworkInterface.c b/FreeRTOS-Plus/Source/FreeRTOS-Plus-UDP/portable/NetworkInterface/LPC18xx/Using_LPCOpen_Library/NetworkInterface.c index 63bd2a44d..a5618feb8 100644 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-UDP/portable/NetworkInterface/LPC18xx/Using_LPCOpen_Library/NetworkInterface.c +++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-UDP/portable/NetworkInterface/LPC18xx/Using_LPCOpen_Library/NetworkInterface.c @@ -78,7 +78,7 @@ operation will be held in the Blocked state (so other tasks can execute) for niTX_BUFFER_FREE_WAIT ticks. It will do this a maximum of niMAX_TX_ATTEMPTS before giving up. */ -#define niTX_BUFFER_FREE_WAIT ( ( portTickType ) 2UL / portTICK_RATE_MS ) +#define niTX_BUFFER_FREE_WAIT ( ( TickType_t ) 2UL / portTICK_RATE_MS ) #define niMAX_TX_ATTEMPTS ( 5 ) /*-----------------------------------------------------------*/ @@ -99,9 +99,9 @@ xSemaphoreHandle xEMACRxEventSemaphore = NULL; /*-----------------------------------------------------------*/ -portBASE_TYPE xNetworkInterfaceInitialise( void ) +BaseType_t xNetworkInterfaceInitialise( void ) { -portBASE_TYPE xReturn; +BaseType_t xReturn; extern uint8_t ucMACAddress[ 6 ]; xReturn = xEMACInit( ucMACAddress ); @@ -138,9 +138,9 @@ extern uint8_t ucMACAddress[ 6 ]; } /*-----------------------------------------------------------*/ -portBASE_TYPE xNetworkInterfaceOutput( xNetworkBufferDescriptor_t * const pxNetworkBuffer ) +BaseType_t xNetworkInterfaceOutput( xNetworkBufferDescriptor_t * const pxNetworkBuffer ) { -portBASE_TYPE xReturn = pdFAIL; +BaseType_t xReturn = pdFAIL; int32_t x; /* Attempt to obtain access to a Tx descriptor. */ @@ -203,7 +203,7 @@ xIPStackEvent_t xRxEvent = { eEthernetRxEvent, NULL }; { /* The buffer filled by the DMA is going to be passed into the IP stack. Allocate another buffer for the DMA descriptor. */ - pxNetworkBuffer = pxNetworkBufferGet( ipTOTAL_ETHERNET_FRAME_SIZE, ( portTickType ) 0 ); + pxNetworkBuffer = pxNetworkBufferGet( ipTOTAL_ETHERNET_FRAME_SIZE, ( TickType_t ) 0 ); if( pxNetworkBuffer != NULL ) { @@ -240,7 +240,7 @@ xIPStackEvent_t xRxEvent = { eEthernetRxEvent, NULL }; /* Data was received and stored. Send it to the IP task for processing. */ xRxEvent.pvData = ( void * ) pxNetworkBuffer; - if( xQueueSendToBack( xNetworkEventQueue, &xRxEvent, ( portTickType ) 0 ) == pdFALSE ) + if( xQueueSendToBack( xNetworkEventQueue, &xRxEvent, ( TickType_t ) 0 ) == pdFALSE ) { /* The buffer could not be sent to the IP task so the buffer must be released. */ diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-UDP/portable/NetworkInterface/LPC18xx/Using_LPCOpen_Library/lpc18xx_43xx_EMAC_LPCOpen.c b/FreeRTOS-Plus/Source/FreeRTOS-Plus-UDP/portable/NetworkInterface/LPC18xx/Using_LPCOpen_Library/lpc18xx_43xx_EMAC_LPCOpen.c index 30ac1daba..3932bab34 100644 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-UDP/portable/NetworkInterface/LPC18xx/Using_LPCOpen_Library/lpc18xx_43xx_EMAC_LPCOpen.c +++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-UDP/portable/NetworkInterface/LPC18xx/Using_LPCOpen_Library/lpc18xx_43xx_EMAC_LPCOpen.c @@ -84,9 +84,9 @@ static unsigned int xTxDescriptorIndex = 0; /*-----------------------------------------------------------*/ -portBASE_TYPE xEMACInit( uint8_t ucMACAddress[ 6 ] ) +BaseType_t xEMACInit( uint8_t ucMACAddress[ 6 ] ) { -portBASE_TYPE xReturn; +BaseType_t xReturn; uint32_t ulPHYStatus; /* Configure the hardware. */ @@ -151,9 +151,9 @@ uint32_t ulPHYStatus; } /*-----------------------------------------------------------*/ -portBASE_TYPE xEMACIsTxDescriptorAvailable( void ) +BaseType_t xEMACIsTxDescriptorAvailable( void ) { -portBASE_TYPE xReturn; +BaseType_t xReturn; if( ( xTxDescriptors[ xTxDescriptorIndex ].CTRLSTAT & RDES_OWN ) == 0 ) { @@ -215,9 +215,9 @@ void vEMACReturnRxDescriptor( void ) } /*-----------------------------------------------------------*/ -portBASE_TYPE xEMACRxDataAvailable( void ) +BaseType_t xEMACRxDataAvailable( void ) { -portBASE_TYPE xReturn; +BaseType_t xReturn; if( ( xRXDescriptors[ xRxDescriptorIndex ].STATUS & RDES_OWN ) == 0 ) { diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-UDP/portable/NetworkInterface/LPC18xx/Using_LPCOpen_Library/lpc18xx_43xx_EMAC_LPCOpen.h b/FreeRTOS-Plus/Source/FreeRTOS-Plus-UDP/portable/NetworkInterface/LPC18xx/Using_LPCOpen_Library/lpc18xx_43xx_EMAC_LPCOpen.h index bfe25d1b9..4ac9b1d10 100644 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-UDP/portable/NetworkInterface/LPC18xx/Using_LPCOpen_Library/lpc18xx_43xx_EMAC_LPCOpen.h +++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-UDP/portable/NetworkInterface/LPC18xx/Using_LPCOpen_Library/lpc18xx_43xx_EMAC_LPCOpen.h @@ -46,13 +46,13 @@ /* * Initialise the MAC and PHY. */ -portBASE_TYPE xEMACInit( uint8_t ucMACAddress[ 6 ] ); +BaseType_t xEMACInit( uint8_t ucMACAddress[ 6 ] ); /* * Return pdTRUE if there is a FreeRTOS Tx descriptor. Return pdFALSE if all * Tx descriptors are already in use. */ -portBASE_TYPE xEMACIsTxDescriptorAvailable( void ); +BaseType_t xEMACIsTxDescriptorAvailable( void ); /* * Assign a buffer to a Tx descriptor so it is ready to be transmitted, but @@ -77,7 +77,7 @@ void vEMACReturnRxDescriptor( void ); * Returns pdTRUE if the next Rx descriptor contains received data. Returns * pdFLASE fi the next Rx descriptor is still under the control of the DMA. */ -portBASE_TYPE xEMACRxDataAvailable( void ); +BaseType_t xEMACRxDataAvailable( void ); void vEMACSwapEmptyBufferForRxedData( xNetworkBufferDescriptor_t *pxNetworkBuffer ); #endif /* LPC18xx_43xx_EMAC_H */ diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-UDP/portable/NetworkInterface/SAM4E/NetworkInterface.c b/FreeRTOS-Plus/Source/FreeRTOS-Plus-UDP/portable/NetworkInterface/SAM4E/NetworkInterface.c index 7fa9d149c..670c87813 100644 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-UDP/portable/NetworkInterface/SAM4E/NetworkInterface.c +++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-UDP/portable/NetworkInterface/SAM4E/NetworkInterface.c @@ -61,7 +61,7 @@ operation will be held in the Blocked state (so other tasks can execute) for niTX_BUFFER_FREE_WAIT ticks. It will do this a maximum of niMAX_TX_ATTEMPTS before giving up. */ -#define niTX_BUFFER_FREE_WAIT ( ( portTickType ) 2UL / portTICK_RATE_MS ) +#define niTX_BUFFER_FREE_WAIT ( ( TickType_t ) 2UL / portTICK_RATE_MS ) #define niMAX_TX_ATTEMPTS ( 5 ) /*-----------------------------------------------------------*/ @@ -90,12 +90,12 @@ static gmac_device_t xGMACStruct; /*-----------------------------------------------------------*/ -portBASE_TYPE xNetworkInterfaceInitialise( void ) +BaseType_t xNetworkInterfaceInitialise( void ) { gmac_options_t xGMACOptions; extern uint8_t ucMACAddress[ 6 ]; -const portTickType xPHYDelay_400ms = 400UL; -portBASE_TYPE xReturn = pdFALSE; +const TickType_t xPHYDelay_400ms = 400UL; +BaseType_t xReturn = pdFALSE; /* Ensure PHY is ready. */ vTaskDelay( xPHYDelay_400ms / portTICK_RATE_MS ); @@ -167,7 +167,7 @@ portBASE_TYPE xReturn = pdFALSE; static void prvGMACRxCallback( uint32_t ulStatus ) { -portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE; +BaseType_t xHigherPriorityTaskWoken = pdFALSE; /* Unblock the deferred interrupt handler task if the event was an Rx. */ if( ulStatus == GMAC_RSR_REC ) @@ -179,9 +179,9 @@ portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE; } /*-----------------------------------------------------------*/ -portBASE_TYPE xNetworkInterfaceOutput( xNetworkBufferDescriptor_t * const pxNetworkBuffer ) +BaseType_t xNetworkInterfaceOutput( xNetworkBufferDescriptor_t * const pxNetworkBuffer ) { -portBASE_TYPE xReturn = pdFAIL; +BaseType_t xReturn = pdFAIL; int32_t x; /* Attempt to obtain access to a Tx descriptor. */ @@ -217,7 +217,7 @@ static void prvGMACDeferredInterruptHandlerTask( void *pvParameters ) { xNetworkBufferDescriptor_t *pxNetworkBuffer; xIPStackEvent_t xRxEvent = { eEthernetRxEvent, NULL }; -static const portTickType xBufferWaitDelay = 1500UL / portTICK_RATE_MS; +static const TickType_t xBufferWaitDelay = 1500UL / portTICK_RATE_MS; uint32_t ulReturned; ( void ) pvParameters; @@ -268,7 +268,7 @@ uint32_t ulReturned; /* Data was received and stored. Send it to the IP task for processing. */ xRxEvent.pvData = ( void * ) pxNetworkBuffer; - if( xQueueSendToBack( xNetworkEventQueue, &xRxEvent, ( portTickType ) 0 ) == pdFALSE ) + if( xQueueSendToBack( xNetworkEventQueue, &xRxEvent, ( TickType_t ) 0 ) == pdFALSE ) { /* The buffer could not be sent to the IP task so the buffer must be released. */ diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-UDP/portable/NetworkInterface/SH2A/NetworkInterface.c b/FreeRTOS-Plus/Source/FreeRTOS-Plus-UDP/portable/NetworkInterface/SH2A/NetworkInterface.c index 474541568..983c47915 100644 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-UDP/portable/NetworkInterface/SH2A/NetworkInterface.c +++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-UDP/portable/NetworkInterface/SH2A/NetworkInterface.c @@ -71,7 +71,7 @@ task performing the transmit will block for niTX_BUFFER_FREE_WAIT milliseconds. It will do this a maximum of niMAX_TX_ATTEMPTS before giving up. */ -#define niTX_BUFFER_FREE_WAIT ( ( portTickType ) 2UL / portTICK_RATE_MS ) +#define niTX_BUFFER_FREE_WAIT ( ( TickType_t ) 2UL / portTICK_RATE_MS ) #define niMAX_TX_ATTEMPTS ( 5 ) /* The length of the queue used to send interrupt status words from the @@ -95,9 +95,9 @@ interrupt is received. */ xSemaphoreHandle xEMACRxEventSemaphore = NULL; /*-----------------------------------------------------------*/ -portBASE_TYPE xNetworkInterfaceInitialise( void ) +BaseType_t xNetworkInterfaceInitialise( void ) { -portBASE_TYPE xStatus, xReturn; +BaseType_t xStatus, xReturn; extern uint8_t ucMACAddress[ 6 ]; /* Initialise the MAC. */ @@ -120,7 +120,7 @@ extern uint8_t ucMACAddress[ 6 ]; } /*-----------------------------------------------------------*/ -portBASE_TYPE xNetworkInterfaceOutput( xNetworkBufferDescriptor_t * const pxNetworkBuffer ) +BaseType_t xNetworkInterfaceOutput( xNetworkBufferDescriptor_t * const pxNetworkBuffer ) { extern void vEMACCopyWrite( uint8_t * pucBuffer, uint16_t usLength ); diff --git a/FreeRTOS-Plus/Source/FreeRTOS-Plus-UDP/portable/NetworkInterface/WinPCap/NetworkInterface.c b/FreeRTOS-Plus/Source/FreeRTOS-Plus-UDP/portable/NetworkInterface/WinPCap/NetworkInterface.c index f57316a7d..2d971bd8d 100644 --- a/FreeRTOS-Plus/Source/FreeRTOS-Plus-UDP/portable/NetworkInterface/WinPCap/NetworkInterface.c +++ b/FreeRTOS-Plus/Source/FreeRTOS-Plus-UDP/portable/NetworkInterface/WinPCap/NetworkInterface.c @@ -129,9 +129,9 @@ xSemaphoreHandle xPCAPMutex = NULL; /*-----------------------------------------------------------*/ -portBASE_TYPE xNetworkInterfaceInitialise( void ) +BaseType_t xNetworkInterfaceInitialise( void ) { -portBASE_TYPE xReturn = pdFALSE; +BaseType_t xReturn = pdFALSE; pcap_if_t *pxAllNetworkInterfaces; if( xPCAPMutex == NULL ) @@ -165,13 +165,13 @@ pcap_if_t *pxAllNetworkInterfaces; #if updconfigLOOPBACK_ETHERNET_PACKETS == 1 - portBASE_TYPE xNetworkInterfaceOutput( xNetworkBufferDescriptor_t * const pxNetworkBuffer ) + BaseType_t xNetworkInterfaceOutput( xNetworkBufferDescriptor_t * const pxNetworkBuffer ) { xEthernetHeader_t *pxEthernetHeader; xIPStackEvent_t xRxEvent = { eEthernetRxEvent, NULL }; extern uint8_t xDefaultPartUDPPacketHeader[]; static const xMACAddress_t xBroadcastMACAddress = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; - portBASE_TYPE xCanLoopback; + BaseType_t xCanLoopback; pxEthernetHeader = ( xEthernetHeader_t * ) pxNetworkBuffer->pucEthernetBuffer; @@ -199,7 +199,7 @@ pcap_if_t *pxAllNetworkInterfaces; is sending a message to itself, so a block time cannot be used for fear of deadlocking. */ xRxEvent.pvData = ( void * ) pxNetworkBuffer; - if( xQueueSendToBack( xNetworkEventQueue, &xRxEvent, ( portTickType ) 0 ) == pdFALSE ) + if( xQueueSendToBack( xNetworkEventQueue, &xRxEvent, ( TickType_t ) 0 ) == pdFALSE ) { vNetworkBufferRelease( pxNetworkBuffer ); iptraceETHERNET_RX_EVENT_LOST(); @@ -227,7 +227,7 @@ pcap_if_t *pxAllNetworkInterfaces; #else /* updconfigLOOPBACK_ETHERNET_PACKETS == 1 */ - portBASE_TYPE xNetworkInterfaceOutput( xNetworkBufferDescriptor_t * const pxNetworkBuffer ) + BaseType_t xNetworkInterfaceOutput( xNetworkBufferDescriptor_t * const pxNetworkBuffer ) { xSemaphoreTake( xPCAPMutex, portMAX_DELAY ); { @@ -432,7 +432,7 @@ eFrameProcessingResult_t eResult; /* Data was received and stored. Send a message to the IP task to let it know. */ - if( xQueueSendToBack( xNetworkEventQueue, &xRxEvent, ( portTickType ) 0 ) == pdFALSE ) + if( xQueueSendToBack( xNetworkEventQueue, &xRxEvent, ( TickType_t ) 0 ) == pdFALSE ) { /* The buffer could not be sent to the stack so must be released again. This is only an interrupt @@ -471,7 +471,7 @@ eFrameProcessingResult_t eResult; #if configUSE_STATIC_BUFFERS == 1 void vNetworkInterfaceAllocateRAMToBuffers( xNetworkBufferDescriptor_t pxNetworkBuffers[ ipconfigNUM_NETWORK_BUFFERS ] ) { - portBASE_TYPE x; + BaseType_t x; for( x = 0; x < ipconfigNUM_NETWORK_BUFFERS; x++ ) { -- 2.39.5