/*\r
* Copies an existing file into a newly created file.\r
*/\r
-static portBASE_TYPE prvPerformCopy( const char *pcSourceFile,\r
+static BaseType_t prvPerformCopy( const char *pcSourceFile,\r
int32_t lSourceFileLength,\r
const char *pcDestinationFile,\r
char *pxWriteBuffer,\r
/*\r
* Implements the DIR command.\r
*/\r
-static portBASE_TYPE prvDIRCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
+static BaseType_t prvDIRCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
\r
/*\r
* Implements the CD command.\r
*/\r
-static portBASE_TYPE prvCDCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
+static BaseType_t prvCDCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
\r
/*\r
* Implements the DEL command.\r
*/\r
-static portBASE_TYPE prvDELCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
+static BaseType_t prvDELCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
\r
/*\r
* Implements the TYPE command.\r
*/\r
-static portBASE_TYPE prvTYPECommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
+static BaseType_t prvTYPECommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
\r
/*\r
* Implements the COPY command.\r
*/\r
-static portBASE_TYPE prvCOPYCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
+static BaseType_t prvCOPYCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
\r
/* Structure that defines the DIR command line command, which lists all the\r
files in the current directory. */\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static portBASE_TYPE prvTYPECommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
+static BaseType_t prvTYPECommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
{\r
const char *pcParameter;\r
-portBASE_TYPE xParameterStringLength, xReturn = pdTRUE;\r
+BaseType_t xParameterStringLength, xReturn = pdTRUE;\r
static F_FILE *pxFile = NULL;\r
int iChar;\r
size_t xByte;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static portBASE_TYPE prvCDCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
+static BaseType_t prvCDCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
{\r
const char *pcParameter;\r
-portBASE_TYPE xParameterStringLength;\r
+BaseType_t xParameterStringLength;\r
unsigned char ucReturned;\r
size_t xStringLength;\r
\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static portBASE_TYPE prvDIRCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
+static BaseType_t prvDIRCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
{\r
static F_FIND *pxFindStruct = NULL;\r
unsigned char ucReturned;\r
-portBASE_TYPE xReturn = pdFALSE;\r
+BaseType_t xReturn = pdFALSE;\r
\r
/* This assumes pcWriteBuffer is long enough. */\r
( void ) pcCommandString;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static portBASE_TYPE prvDELCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
+static BaseType_t prvDELCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
{\r
const char *pcParameter;\r
-portBASE_TYPE xParameterStringLength;\r
+BaseType_t xParameterStringLength;\r
unsigned char ucReturned;\r
\r
/* This function assumes xWriteBufferLen is large enough! */\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static portBASE_TYPE prvCOPYCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
+static BaseType_t prvCOPYCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
{\r
char *pcSourceFile, *pcDestinationFile;\r
-portBASE_TYPE xParameterStringLength;\r
+BaseType_t xParameterStringLength;\r
long lSourceLength, lDestinationLength = 0;\r
\r
/* Obtain the name of the destination file. */\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static portBASE_TYPE prvPerformCopy( const char *pcSourceFile,\r
+static BaseType_t prvPerformCopy( const char *pcSourceFile,\r
int32_t lSourceFileLength,\r
const char *pcDestinationFile,\r
char *pxWriteBuffer,\r
{\r
int32_t lBytesRead = 0, lBytesToRead, lBytesRemaining;\r
F_FILE *pxFile;\r
-portBASE_TYPE xReturn = pdPASS;\r
+BaseType_t xReturn = pdPASS;\r
\r
/* NOTE: Error handling has been omitted for clarity. */\r
\r
/*\r
* Implements the task-stats command.\r
*/\r
-static portBASE_TYPE prvTaskStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
+static BaseType_t prvTaskStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
\r
/*\r
* Implements the run-time-stats command.\r
*/\r
-static portBASE_TYPE prvRunTimeStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
+static BaseType_t prvRunTimeStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
\r
/*\r
* Implements the echo-three-parameters command.\r
*/\r
-static portBASE_TYPE prvThreeParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
+static BaseType_t prvThreeParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
\r
/*\r
* Implements the echo-parameters command.\r
*/\r
-static portBASE_TYPE prvParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
+static BaseType_t prvParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
\r
/*\r
* Implements the "trace start" and "trace stop" commands;\r
*/\r
#if configINCLUDE_TRACE_RELATED_CLI_COMMANDS == 1\r
- static portBASE_TYPE prvStartStopTraceCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
+ static BaseType_t prvStartStopTraceCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
#endif\r
\r
/* Structure that defines the "run-time-stats" command line command. This\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static portBASE_TYPE prvTaskStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
+static BaseType_t prvTaskStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
{\r
const char *const pcHeader = "Task State Priority Stack #\r\n************************************************\r\n";\r
\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static portBASE_TYPE prvRunTimeStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
+static BaseType_t prvRunTimeStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
{\r
const char * const pcHeader = "Task Abs Time % Time\r\n****************************************\r\n";\r
\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static portBASE_TYPE prvThreeParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
+static BaseType_t prvThreeParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
{\r
const char *pcParameter;\r
-portBASE_TYPE xParameterStringLength, xReturn;\r
-static portBASE_TYPE lParameterNumber = 0;\r
+BaseType_t xParameterStringLength, xReturn;\r
+static BaseType_t lParameterNumber = 0;\r
\r
/* Remove compile time warnings about unused parameters, and check the\r
write buffer is not NULL. NOTE - for simplicity, this example assumes the\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static portBASE_TYPE prvParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
+static BaseType_t prvParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
{\r
const char *pcParameter;\r
-portBASE_TYPE xParameterStringLength, xReturn;\r
-static portBASE_TYPE lParameterNumber = 0;\r
+BaseType_t xParameterStringLength, xReturn;\r
+static BaseType_t lParameterNumber = 0;\r
\r
/* Remove compile time warnings about unused parameters, and check the\r
write buffer is not NULL. NOTE - for simplicity, this example assumes the\r
\r
#if configINCLUDE_TRACE_RELATED_CLI_COMMANDS == 1\r
\r
- static portBASE_TYPE prvStartStopTraceCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
+ static BaseType_t prvStartStopTraceCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
{\r
const char *pcParameter;\r
- portBASE_TYPE lParameterStringLength;\r
+ BaseType_t lParameterStringLength;\r
\r
/* Remove compile time warnings about unused parameters, and check the\r
write buffer is not NULL. NOTE - for simplicity, this example assumes the\r
uint8_t ucInputIndex = 0;\r
char *pcOutputString;\r
static char cInputString[ cmdMAX_INPUT_SIZE ], cLastInputString[ cmdMAX_INPUT_SIZE ];\r
-portBASE_TYPE xReturned;\r
+BaseType_t xReturned;\r
xComPortHandle xPort;\r
\r
( void ) pvParameters;\r
/*\r
* Defines a command that prints out IP address information.\r
*/\r
-static portBASE_TYPE prvDisplayIPConfig( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
+static BaseType_t prvDisplayIPConfig( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
\r
/*\r
* Defines a command that prints out the gathered demo debug stats.\r
*/\r
-static portBASE_TYPE prvDisplayIPDebugStats( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
+static BaseType_t prvDisplayIPDebugStats( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
\r
/*\r
* Defines a command that sends an ICMP ping request to an IP address.\r
*/\r
-static portBASE_TYPE prvPingCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
+static BaseType_t prvPingCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
\r
/* Structure that defines the "ip-config" command line command. */\r
static const CLI_Command_Definition_t xIPConfig =\r
\r
#if ipconfigSUPPORT_OUTGOING_PINGS == 1\r
\r
- static portBASE_TYPE prvPingCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
+ static BaseType_t prvPingCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
{\r
char * pcParameter;\r
- portBASE_TYPE lParameterStringLength, xReturn;\r
+ BaseType_t lParameterStringLength, xReturn;\r
uint32_t ulIPAddress, ulBytesToPing;\r
const uint32_t ulDefaultBytesToPing = 8UL;\r
char cBuffer[ 16 ];\r
\r
#if configINCLUDE_DEMO_DEBUG_STATS != 0\r
\r
- static portBASE_TYPE prvDisplayIPDebugStats( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
+ static BaseType_t prvDisplayIPDebugStats( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
{\r
- static portBASE_TYPE xIndex = -1;\r
+ static BaseType_t xIndex = -1;\r
extern xExampleDebugStatEntry_t xIPTraceValues[];\r
- portBASE_TYPE xReturn;\r
+ BaseType_t xReturn;\r
\r
/* Remove compile time warnings about unused parameters, and check the\r
write buffer is not NULL. NOTE - for simplicity, this example assumes the\r
\r
#endif /* configINCLUDE_DEMO_DEBUG_STATS */\r
\r
-static portBASE_TYPE prvDisplayIPConfig( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
+static BaseType_t prvDisplayIPConfig( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
{\r
-static portBASE_TYPE xIndex = 0;\r
-portBASE_TYPE xReturn;\r
+static BaseType_t xIndex = 0;\r
+BaseType_t xReturn;\r
uint32_t ulAddress;\r
\r
/* Remove compile time warnings about unused parameters, and check the\r
\r
static void prvCreateDemoFilesUsing_f_write( void )\r
{\r
-portBASE_TYPE xFileNumber, xWriteNumber;\r
+BaseType_t xFileNumber, xWriteNumber;\r
char cFileName[ fsMAX_FILE_NAME_LEN ];\r
-const portBASE_TYPE xMaxFiles = 5;\r
+const BaseType_t xMaxFiles = 5;\r
long lItemsWritten;\r
F_FILE *pxFile;\r
\r
\r
static void prvVerifyDemoFileUsing_f_read( void )\r
{\r
-portBASE_TYPE xFileNumber, xReadNumber;\r
+BaseType_t xFileNumber, xReadNumber;\r
char cFileName[ fsMAX_FILE_NAME_LEN ];\r
-const portBASE_TYPE xMaxFiles = 5;\r
+const BaseType_t xMaxFiles = 5;\r
long lItemsRead, lChar;\r
F_FILE *pxFile;\r
\r
/*\r
* Implements the run-time-stats command.\r
*/\r
-static portBASE_TYPE prvTaskStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
+static BaseType_t prvTaskStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
\r
/*\r
* Implements the task-stats command.\r
*/\r
-static portBASE_TYPE prvRunTimeStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
+static BaseType_t prvRunTimeStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
\r
/*\r
* Implements the echo-three-parameters command.\r
*/\r
-static portBASE_TYPE prvThreeParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
+static BaseType_t prvThreeParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
\r
/*\r
* Implements the echo-parameters command.\r
*/\r
-static portBASE_TYPE prvParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
+static BaseType_t prvParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
\r
/*\r
* Defines a command that prints out IP address information.\r
*/\r
-static portBASE_TYPE prvDisplayIPConfig( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
+static BaseType_t prvDisplayIPConfig( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
\r
/*\r
* Defines a command that prints out the gathered demo debug stats.\r
*/\r
-static portBASE_TYPE prvDisplayIPDebugStats( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
+static BaseType_t prvDisplayIPDebugStats( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
\r
/*\r
* Defines a command that sends an ICMP ping request to an IP address.\r
*/\r
-static portBASE_TYPE prvPingCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
+static BaseType_t prvPingCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
\r
/*\r
* Implements the "trace start" and "trace stop" commands;\r
*/\r
#if configINCLUDE_TRACE_RELATED_CLI_COMMANDS == 1\r
- static portBASE_TYPE prvStartStopTraceCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
+ static BaseType_t prvStartStopTraceCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
#endif\r
\r
/* Structure that defines the "ip-config" command line command. */\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static portBASE_TYPE prvTaskStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
+static BaseType_t prvTaskStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
{\r
const char *const pcHeader = "Task State Priority Stack #\r\n************************************************\r\n";\r
\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static portBASE_TYPE prvRunTimeStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
+static BaseType_t prvRunTimeStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
{\r
const char * const pcHeader = "Task Abs Time % Time\r\n****************************************\r\n";\r
\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static portBASE_TYPE prvThreeParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
+static BaseType_t prvThreeParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
{\r
const char *pcParameter;\r
-portBASE_TYPE xParameterStringLength, xReturn;\r
-static portBASE_TYPE lParameterNumber = 0;\r
+BaseType_t xParameterStringLength, xReturn;\r
+static BaseType_t lParameterNumber = 0;\r
\r
/* Remove compile time warnings about unused parameters, and check the\r
write buffer is not NULL. NOTE - for simplicity, this example assumes the\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static portBASE_TYPE prvParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
+static BaseType_t prvParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
{\r
const char *pcParameter;\r
-portBASE_TYPE xParameterStringLength, xReturn;\r
-static portBASE_TYPE lParameterNumber = 0;\r
+BaseType_t xParameterStringLength, xReturn;\r
+static BaseType_t lParameterNumber = 0;\r
\r
/* Remove compile time warnings about unused parameters, and check the\r
write buffer is not NULL. NOTE - for simplicity, this example assumes the\r
\r
#if ipconfigSUPPORT_OUTGOING_PINGS == 1\r
\r
- static portBASE_TYPE prvPingCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
+ static BaseType_t prvPingCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
{\r
char * pcParameter;\r
- portBASE_TYPE lParameterStringLength, xReturn;\r
+ BaseType_t lParameterStringLength, xReturn;\r
uint32_t ulIPAddress, ulBytesToPing;\r
const uint32_t ulDefaultBytesToPing = 8UL;\r
char cBuffer[ 16 ];\r
\r
#if configINCLUDE_DEMO_DEBUG_STATS != 0\r
\r
- static portBASE_TYPE prvDisplayIPDebugStats( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
+ static BaseType_t prvDisplayIPDebugStats( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
{\r
- static portBASE_TYPE xIndex = -1;\r
+ static BaseType_t xIndex = -1;\r
extern xExampleDebugStatEntry_t xIPTraceValues[];\r
- portBASE_TYPE xReturn;\r
+ BaseType_t xReturn;\r
\r
/* Remove compile time warnings about unused parameters, and check the\r
write buffer is not NULL. NOTE - for simplicity, this example assumes the\r
\r
#endif /* configINCLUDE_DEMO_DEBUG_STATS */\r
\r
-static portBASE_TYPE prvDisplayIPConfig( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
+static BaseType_t prvDisplayIPConfig( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
{\r
-static portBASE_TYPE xIndex = 0;\r
-portBASE_TYPE xReturn;\r
+static BaseType_t xIndex = 0;\r
+BaseType_t xReturn;\r
uint32_t ulAddress;\r
\r
/* Remove compile time warnings about unused parameters, and check the\r
\r
#if configINCLUDE_TRACE_RELATED_CLI_COMMANDS == 1\r
\r
- static portBASE_TYPE prvStartStopTraceCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
+ static BaseType_t prvStartStopTraceCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
{\r
const char *pcParameter;\r
- portBASE_TYPE lParameterStringLength;\r
+ BaseType_t lParameterStringLength;\r
\r
/* Remove compile time warnings about unused parameters, and check the\r
write buffer is not NULL. NOTE - for simplicity, this example assumes the\r
#ifndef UDP_COMMAND_INTERPRETER_H\r
#define UDP_COMMAND_INTERPRETER_H\r
\r
-void vStartUDPCommandInterpreterTask( uint16_t usStackSize, uint32_t ulPort, unsigned portBASE_TYPE uxPriority );\r
+void vStartUDPCommandInterpreterTask( uint16_t usStackSize, uint32_t ulPort, UBaseType_t uxPriority );\r
\r
#endif /* UDP_COMMAND_INTERPRETER_H */\r
\r
/*-----------------------------------------------------------*/\r
\r
-void vStartUDPCommandInterpreterTask( uint16_t usStackSize, uint32_t ulPort, unsigned portBASE_TYPE uxPriority )\r
+void vStartUDPCommandInterpreterTask( uint16_t usStackSize, uint32_t ulPort, UBaseType_t uxPriority )\r
{\r
xTaskCreate( vUDPCommandInterpreterTask, "CLI", usStackSize, ( void * ) ulPort, uxPriority, NULL );\r
}\r
long lBytes, lByte;\r
signed char cInChar, cInputIndex = 0;\r
static char cInputString[ cmdMAX_INPUT_SIZE ], cOutputString[ cmdMAX_OUTPUT_SIZE ], cLocalBuffer[ cmdSOCKET_INPUT_BUFFER_SIZE ];\r
-portBASE_TYPE xMoreDataToFollow;\r
+BaseType_t xMoreDataToFollow;\r
struct freertos_sockaddr xClient;\r
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. */\r
xSocket_t xSocket;\r
#include "FreeRTOS_Sockets.h"\r
\r
/* Small delay used between attempts to obtain a zero copy buffer. */\r
-#define echoTINY_DELAY ( ( portTickType ) 2 )\r
+#define echoTINY_DELAY ( ( TickType_t ) 2 )\r
\r
/* The echo tasks create a socket, send out a number of echo requests\r
(listening for each echo reply), then close the socket again before\r
starting over. This delay is used between each iteration to ensure the\r
network does not get too congested. */\r
-#define echoLOOP_DELAY ( ( portTickType ) 250 / portTICK_RATE_MS )\r
+#define echoLOOP_DELAY ( ( TickType_t ) 250 / portTICK_RATE_MS )\r
\r
#if ipconfigINCLUDE_EXAMPLE_FREERTOS_PLUS_TRACE_CALLS == 1\r
/* When the trace recorder code is included user events are generated to\r
/* The receive timeout is set shorter when the windows simulator is used\r
because simulated time is slower than real time. */\r
#ifdef _WINDOWS_\r
- const portTickType xReceiveTimeOut = 50 / portTICK_RATE_MS;\r
+ const TickType_t xReceiveTimeOut = 50 / portTICK_RATE_MS;\r
#else\r
- const portTickType xReceiveTimeOut = 500 / portTICK_RATE_MS;\r
+ const TickType_t xReceiveTimeOut = 500 / portTICK_RATE_MS;\r
#endif\r
\r
/*-----------------------------------------------------------*/\r
\r
-void vStartEchoClientTasks( uint16_t usTaskStackSize, unsigned portBASE_TYPE uxTaskPriority )\r
+void vStartEchoClientTasks( uint16_t usTaskStackSize, UBaseType_t uxTaskPriority )\r
{\r
/* Create the echo client task that does not use the zero copy interface. */\r
xTaskCreate( prvEchoClientTask, /* The function that implements the task. */\r
* to send to and receive from an echo server. The other task uses the zero\r
* copy interface to send to and receive from an echo server.\r
*/\r
-void vStartEchoClientTasks( uint16_t usTaskStackSize, unsigned portBASE_TYPE uxTaskPriority );\r
+void vStartEchoClientTasks( uint16_t usTaskStackSize, UBaseType_t uxTaskPriority );\r
\r
#endif /* TWO_ECHO_CLIENTS_H */\r
\r
/*-----------------------------------------------------------*/\r
\r
-portBASE_TYPE xExampleDebugStatEntries( void )\r
+BaseType_t xExampleDebugStatEntries( void )\r
{\r
/* Return the number of entries in the xIPTraceValues[] table. */\r
- return ( portBASE_TYPE ) ( sizeof( xIPTraceValues ) / sizeof( xExampleDebugStatEntry_t ) );\r
+ return ( BaseType_t ) ( sizeof( xIPTraceValues ) / sizeof( xExampleDebugStatEntry_t ) );\r
}\r
/*-----------------------------------------------------------*/\r
\r
void vExampleDebugStatUpdate( uint8_t ucIdentifier, uint32_t ulValue )\r
{\r
-portBASE_TYPE xIndex;\r
-const portBASE_TYPE xEntries = sizeof( xIPTraceValues ) / sizeof( xExampleDebugStatEntry_t );\r
+BaseType_t xIndex;\r
+const BaseType_t xEntries = sizeof( xIPTraceValues ) / sizeof( xExampleDebugStatEntry_t );\r
\r
/* Update an entry in the xIPTraceValues[] table. Each row in the table\r
includes a pointer to a function that performs the actual update. This\r
/*\r
* Returns the number of entries in the xIPTraceValues table.\r
*/\r
- portBASE_TYPE xExampleDebugStatEntries( void );\r
+ BaseType_t xExampleDebugStatEntries( void );\r
\r
#endif /* configINCLUDE_DEMO_DEBUG_STATS == 1 */\r
\r
* Defines a command that returns a table showing the state of each task at the\r
* time the command is called.\r
*/\r
-static portBASE_TYPE prvTaskStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
+static BaseType_t prvTaskStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
\r
/*\r
* Defines a command that returns a table showing how much time each task has\r
* spent in the Running state.\r
*/\r
-static portBASE_TYPE prvRunTimeStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
+static BaseType_t prvRunTimeStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
\r
/*\r
* Defines a command that expects exactly three parameters. Each of the three\r
* parameter are echoed back one at a time.\r
*/\r
-static portBASE_TYPE prvThreeParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
+static BaseType_t prvThreeParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
\r
/*\r
* Defines a command that can take a variable number of parameters. Each\r
* parameter is echoes back one at a time.\r
*/\r
-static portBASE_TYPE prvParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
+static BaseType_t prvParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
\r
/*\r
* Defines a command that starts/stops events being recorded for offline viewing\r
* in FreeRTOS+Trace.\r
*/\r
-static portBASE_TYPE prvStartStopTraceCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
+static BaseType_t prvStartStopTraceCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
\r
/* Structure that defines the "run-time-stats" command line command. */\r
static const CLI_Command_Definition_t xRunTimeStats =\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static portBASE_TYPE prvTaskStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
+static BaseType_t prvTaskStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
{\r
const char *const pcHeader = "Task State Priority Stack #\r\n************************************************\r\n";\r
\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static portBASE_TYPE prvRunTimeStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
+static BaseType_t prvRunTimeStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
{\r
const char * const pcHeader = "Task Abs Time % Time\r\n****************************************\r\n";\r
\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static portBASE_TYPE prvThreeParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
+static BaseType_t prvThreeParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
{\r
const char *pcParameter;\r
-portBASE_TYPE lParameterStringLength, xReturn;\r
-static portBASE_TYPE lParameterNumber = 0;\r
+BaseType_t lParameterStringLength, xReturn;\r
+static BaseType_t lParameterNumber = 0;\r
\r
/* Remove compile time warnings about unused parameters, and check the\r
write buffer is not NULL. NOTE - for simplicity, this example assumes the\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static portBASE_TYPE prvParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
+static BaseType_t prvParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
{\r
const char *pcParameter;\r
-portBASE_TYPE lParameterStringLength, xReturn;\r
-static portBASE_TYPE lParameterNumber = 0;\r
+BaseType_t lParameterStringLength, xReturn;\r
+static BaseType_t lParameterNumber = 0;\r
\r
/* Remove compile time warnings about unused parameters, and check the\r
write buffer is not NULL. NOTE - for simplicity, this example assumes the\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static portBASE_TYPE prvStartStopTraceCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
+static BaseType_t prvStartStopTraceCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
{\r
const char *pcParameter;\r
-portBASE_TYPE lParameterStringLength;\r
+BaseType_t lParameterStringLength;\r
\r
/* Remove compile time warnings about unused parameters, and check the\r
write buffer is not NULL. NOTE - for simplicity, this example assumes the\r
#define configTIMER_QUEUE_LENGTH 20\r
#define configTIMER_TASK_STACK_DEPTH ( configMINIMAL_STACK_SIZE * 2 )\r
\r
-#define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 7 )\r
+#define configMAX_PRIORITIES ( ( UBaseType_t ) 7 )\r
#define configMAX_CO_ROUTINE_PRIORITIES ( 2 )\r
\r
\r
long lBytes, lByte;\r
signed char cInChar, cInputIndex = 0;\r
static signed char cInputString[ cmdMAX_INPUT_SIZE ], cOutputString[ cmdMAX_OUTPUT_SIZE ], cLocalBuffer[ cmdSOCKET_INPUT_BUFFER_SIZE ];\r
-portBASE_TYPE xMoreDataToFollow;\r
+BaseType_t xMoreDataToFollow;\r
volatile int iErrorCode = 0;\r
struct sockaddr_in xClient;\r
int xClientAddressLength = sizeof( struct sockaddr_in );\r
\r
static void prvQueueSendTask( void *pvParameters )\r
{\r
-portTickType xNextWakeTime;\r
+TickType_t xNextWakeTime;\r
const unsigned long ulValueToSend = 100UL;\r
\r
/* Remove warning about unused parameters. */\r
#define configTIMER_QUEUE_LENGTH 20\r
#define configTIMER_TASK_STACK_DEPTH ( configMINIMAL_STACK_SIZE * 2 )\r
\r
-#define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 7 )\r
+#define configMAX_PRIORITIES ( ( UBaseType_t ) 7 )\r
#define configMAX_CO_ROUTINE_PRIORITIES ( 2 )\r
\r
\r
WORD wVersionRequested;\r
WSADATA xWSAData;\r
char cString[ 50 ];\r
-portBASE_TYPE lReturned;\r
+BaseType_t lReturned;\r
uint32_t ulCount = 0UL;\r
\r
/* Remove compiler warning about unused parameters. */\r
/* See the comments at the top of main.c. */\r
void vSecureTCPServerTask( void *pvParameters )\r
{\r
-portBASE_TYPE xReturned;\r
+BaseType_t xReturned;\r
long lBytes;\r
uint8_t cReceivedString[ 60 ];\r
struct sockaddr_in xClient;\r
*----------------------------------------------------------*/\r
\r
#define configUSE_PREEMPTION 1\r
-#define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 7 )\r
+#define configMAX_PRIORITIES ( ( UBaseType_t ) 7 )\r
#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. */\r
#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. */\r
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 32U * 1024U ) )\r
/*\r
* Copies an existing file into a newly created file.\r
*/\r
-static portBASE_TYPE prvPerformCopy( const char *pcSourceFile,\r
+static BaseType_t prvPerformCopy( const char *pcSourceFile,\r
int32_t lSourceFileLength,\r
const char *pcDestinationFile,\r
char *pxWriteBuffer,\r
/*\r
* Implements the DIR command.\r
*/\r
-static portBASE_TYPE prvDIRCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
+static BaseType_t prvDIRCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
\r
/*\r
* Implements the CD command.\r
*/\r
-static portBASE_TYPE prvCDCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
+static BaseType_t prvCDCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
\r
/*\r
* Implements the DEL command.\r
*/\r
-static portBASE_TYPE prvDELCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
+static BaseType_t prvDELCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
\r
/*\r
* Implements the TYPE command.\r
*/\r
-static portBASE_TYPE prvTYPECommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
+static BaseType_t prvTYPECommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
\r
/*\r
* Implements the COPY command.\r
*/\r
-static portBASE_TYPE prvCOPYCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
+static BaseType_t prvCOPYCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
\r
/*\r
* Implements the TEST command.\r
*/\r
-static portBASE_TYPE prvTESTFSCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
+static BaseType_t prvTESTFSCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
\r
/* Structure that defines the DIR command line command, which lists all the\r
files in the current directory. */\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static portBASE_TYPE prvTYPECommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
+static BaseType_t prvTYPECommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
{\r
const char *pcParameter;\r
-portBASE_TYPE xParameterStringLength, xReturn = pdTRUE;\r
+BaseType_t xParameterStringLength, xReturn = pdTRUE;\r
static F_FILE *pxFile = NULL;\r
int iChar;\r
size_t xByte;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static portBASE_TYPE prvCDCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
+static BaseType_t prvCDCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
{\r
const char *pcParameter;\r
-portBASE_TYPE xParameterStringLength;\r
+BaseType_t xParameterStringLength;\r
unsigned char ucReturned;\r
size_t xStringLength;\r
\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static portBASE_TYPE prvDIRCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
+static BaseType_t prvDIRCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
{\r
static F_FIND *pxFindStruct = NULL;\r
unsigned char ucReturned;\r
-portBASE_TYPE xReturn = pdFALSE;\r
+BaseType_t xReturn = pdFALSE;\r
\r
/* This assumes pcWriteBuffer is long enough. */\r
( void ) pcCommandString;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static portBASE_TYPE prvDELCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
+static BaseType_t prvDELCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
{\r
const char *pcParameter;\r
-portBASE_TYPE xParameterStringLength;\r
+BaseType_t xParameterStringLength;\r
unsigned char ucReturned;\r
\r
/* This function assumes xWriteBufferLen is large enough! */\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static portBASE_TYPE prvTESTFSCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
+static BaseType_t prvTESTFSCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
{\r
-unsigned portBASE_TYPE uxOriginalPriority;\r
+UBaseType_t uxOriginalPriority;\r
\r
/* Avoid compiler warnings. */\r
( void ) xWriteBufferLen;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static portBASE_TYPE prvCOPYCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
+static BaseType_t prvCOPYCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
{\r
char *pcSourceFile;\r
const char *pcDestinationFile;\r
-portBASE_TYPE xParameterStringLength;\r
+BaseType_t xParameterStringLength;\r
long lSourceLength, lDestinationLength = 0;\r
\r
/* Obtain the name of the destination file. */\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static portBASE_TYPE prvPerformCopy( const char *pcSourceFile,\r
+static BaseType_t prvPerformCopy( const char *pcSourceFile,\r
int32_t lSourceFileLength,\r
const char *pcDestinationFile,\r
char *pxWriteBuffer,\r
{\r
int32_t lBytesRead = 0, lBytesToRead, lBytesRemaining;\r
F_FILE *pxFile;\r
-portBASE_TYPE xReturn = pdPASS;\r
+BaseType_t xReturn = pdPASS;\r
\r
/* NOTE: Error handling has been omitted for clarity. */\r
\r
\r
static void prvCreateDemoFilesUsing_f_write( void )\r
{\r
-portBASE_TYPE xFileNumber, xWriteNumber;\r
+BaseType_t xFileNumber, xWriteNumber;\r
char cFileName[ fsMAX_FILE_NAME_LEN ];\r
-const portBASE_TYPE xMaxFiles = 5;\r
+const BaseType_t xMaxFiles = 5;\r
long lItemsWritten;\r
F_FILE *pxFile;\r
\r
\r
static void prvVerifyDemoFileUsing_f_read( void )\r
{\r
-portBASE_TYPE xFileNumber, xReadNumber;\r
+BaseType_t xFileNumber, xReadNumber;\r
char cFileName[ fsMAX_FILE_NAME_LEN ];\r
-const portBASE_TYPE xMaxFiles = 5;\r
+const BaseType_t xMaxFiles = 5;\r
long lItemsRead, lChar;\r
F_FILE *pxFile;\r
\r
/*\r
* Implements the run-time-stats command.\r
*/\r
-static portBASE_TYPE prvTaskStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
+static BaseType_t prvTaskStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
\r
/*\r
* Implements the task-stats command.\r
*/\r
-static portBASE_TYPE prvRunTimeStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
+static BaseType_t prvRunTimeStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
\r
/*\r
* Implements the echo-three-parameters command.\r
*/\r
-static portBASE_TYPE prvThreeParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
+static BaseType_t prvThreeParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
\r
/*\r
* Implements the echo-parameters command.\r
*/\r
-static portBASE_TYPE prvParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
+static BaseType_t prvParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
\r
/*\r
* Implements the "trace start" and "trace stop" commands;\r
*/\r
#if configINCLUDE_TRACE_RELATED_CLI_COMMANDS == 1\r
- static portBASE_TYPE prvStartStopTraceCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
+ static BaseType_t prvStartStopTraceCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
#endif\r
\r
/* Structure that defines the "run-time-stats" command line command. This\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static portBASE_TYPE prvTaskStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
+static BaseType_t prvTaskStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
{\r
const char *const pcHeader = "Task State Priority Stack #\r\n************************************************\r\n";\r
\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static portBASE_TYPE prvRunTimeStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
+static BaseType_t prvRunTimeStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
{\r
const char * const pcHeader = "Task Abs Time % Time\r\n****************************************\r\n";\r
\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static portBASE_TYPE prvThreeParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
+static BaseType_t prvThreeParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
{\r
const char *pcParameter;\r
-portBASE_TYPE xParameterStringLength, xReturn;\r
-static portBASE_TYPE lParameterNumber = 0;\r
+BaseType_t xParameterStringLength, xReturn;\r
+static BaseType_t lParameterNumber = 0;\r
\r
/* Remove compile time warnings about unused parameters, and check the\r
write buffer is not NULL. NOTE - for simplicity, this example assumes the\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static portBASE_TYPE prvParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
+static BaseType_t prvParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
{\r
const char *pcParameter;\r
-portBASE_TYPE xParameterStringLength, xReturn;\r
-static portBASE_TYPE lParameterNumber = 0;\r
+BaseType_t xParameterStringLength, xReturn;\r
+static BaseType_t lParameterNumber = 0;\r
\r
/* Remove compile time warnings about unused parameters, and check the\r
write buffer is not NULL. NOTE - for simplicity, this example assumes the\r
\r
#if configINCLUDE_TRACE_RELATED_CLI_COMMANDS == 1\r
\r
- static portBASE_TYPE prvStartStopTraceCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
+ static BaseType_t prvStartStopTraceCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
{\r
const char *pcParameter;\r
- portBASE_TYPE lParameterStringLength;\r
+ BaseType_t lParameterStringLength;\r
\r
/* Remove compile time warnings about unused parameters, and check the\r
write buffer is not NULL. NOTE - for simplicity, this example assumes the\r
long lBytes, lByte;\r
signed char cInChar, cInputIndex = 0;\r
static signed char cInputString[ cmdMAX_INPUT_SIZE ], cOutputString[ cmdMAX_OUTPUT_SIZE ], cLocalBuffer[ cmdSOCKET_INPUT_BUFFER_SIZE ];\r
-portBASE_TYPE xMoreDataToFollow;\r
+BaseType_t xMoreDataToFollow;\r
volatile int iErrorCode = 0;\r
struct sockaddr_in xClient;\r
int xClientAddressLength = sizeof( struct sockaddr_in );\r
the set of sample files are created from the idle task hook function. */\r
#if F_FS_THREAD_AWARE == 1\r
{\r
- static portBASE_TYPE xCreatedSampleFiles = pdFALSE;\r
+ static BaseType_t xCreatedSampleFiles = pdFALSE;\r
\r
/* Initialise the drive and file system, then create a few example\r
files. The output from this function just goes to the stdout window,\r
/*\r
* Implements the run-time-stats command.\r
*/\r
-static portBASE_TYPE prvTaskStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
+static BaseType_t prvTaskStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
\r
/*\r
* Implements the task-stats command.\r
*/\r
-static portBASE_TYPE prvRunTimeStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
+static BaseType_t prvRunTimeStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
\r
/*\r
* Implements the echo-three-parameters command.\r
*/\r
-static portBASE_TYPE prvThreeParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
+static BaseType_t prvThreeParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
\r
/*\r
* Implements the echo-parameters command.\r
*/\r
-static portBASE_TYPE prvParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
+static BaseType_t prvParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
\r
/*\r
* Defines a command that prints out IP address information.\r
*/\r
-static portBASE_TYPE prvDisplayIPConfig( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
+static BaseType_t prvDisplayIPConfig( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
\r
/*\r
* Defines a command that prints out the gathered demo debug stats.\r
*/\r
-static portBASE_TYPE prvDisplayIPDebugStats( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
+static BaseType_t prvDisplayIPDebugStats( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
\r
/*\r
* Defines a command that sends an ICMP ping request to an IP address.\r
*/\r
-static portBASE_TYPE prvPingCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
+static BaseType_t prvPingCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
\r
/*\r
* Implements the "trace start" and "trace stop" commands;\r
*/\r
#if configINCLUDE_TRACE_RELATED_CLI_COMMANDS == 1\r
- static portBASE_TYPE prvStartStopTraceCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
+ static BaseType_t prvStartStopTraceCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
#endif\r
\r
/* Structure that defines the "ip-config" command line command. */\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static portBASE_TYPE prvTaskStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
+static BaseType_t prvTaskStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
{\r
const char *const pcHeader = "Task State Priority Stack #\r\n************************************************\r\n";\r
\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static portBASE_TYPE prvRunTimeStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
+static BaseType_t prvRunTimeStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
{\r
const char * const pcHeader = "Task Abs Time % Time\r\n****************************************\r\n";\r
\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static portBASE_TYPE prvThreeParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
+static BaseType_t prvThreeParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
{\r
const char *pcParameter;\r
-portBASE_TYPE xParameterStringLength, xReturn;\r
-static portBASE_TYPE lParameterNumber = 0;\r
+BaseType_t xParameterStringLength, xReturn;\r
+static BaseType_t lParameterNumber = 0;\r
\r
/* Remove compile time warnings about unused parameters, and check the\r
write buffer is not NULL. NOTE - for simplicity, this example assumes the\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static portBASE_TYPE prvParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
+static BaseType_t prvParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
{\r
const char *pcParameter;\r
-portBASE_TYPE xParameterStringLength, xReturn;\r
-static portBASE_TYPE lParameterNumber = 0;\r
+BaseType_t xParameterStringLength, xReturn;\r
+static BaseType_t lParameterNumber = 0;\r
\r
/* Remove compile time warnings about unused parameters, and check the\r
write buffer is not NULL. NOTE - for simplicity, this example assumes the\r
\r
#if ipconfigSUPPORT_OUTGOING_PINGS == 1\r
\r
- static portBASE_TYPE prvPingCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
+ static BaseType_t prvPingCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
{\r
char * pcParameter;\r
- portBASE_TYPE lParameterStringLength, xReturn;\r
+ BaseType_t lParameterStringLength, xReturn;\r
uint32_t ulIPAddress, ulBytesToPing;\r
const uint32_t ulDefaultBytesToPing = 8UL;\r
char cBuffer[ 16 ];\r
\r
#if configINCLUDE_DEMO_DEBUG_STATS != 0\r
\r
- static portBASE_TYPE prvDisplayIPDebugStats( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
+ static BaseType_t prvDisplayIPDebugStats( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
{\r
- static portBASE_TYPE xIndex = -1;\r
+ static BaseType_t xIndex = -1;\r
extern xExampleDebugStatEntry_t xIPTraceValues[];\r
- portBASE_TYPE xReturn;\r
+ BaseType_t xReturn;\r
\r
/* Remove compile time warnings about unused parameters, and check the\r
write buffer is not NULL. NOTE - for simplicity, this example assumes the\r
\r
#endif /* configINCLUDE_DEMO_DEBUG_STATS */\r
\r
-static portBASE_TYPE prvDisplayIPConfig( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
+static BaseType_t prvDisplayIPConfig( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
{\r
-static portBASE_TYPE xIndex = 0;\r
-portBASE_TYPE xReturn;\r
+static BaseType_t xIndex = 0;\r
+BaseType_t xReturn;\r
uint32_t ulAddress;\r
\r
/* Remove compile time warnings about unused parameters, and check the\r
\r
#if configINCLUDE_TRACE_RELATED_CLI_COMMANDS == 1\r
\r
- static portBASE_TYPE prvStartStopTraceCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
+ static BaseType_t prvStartStopTraceCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
{\r
const char *pcParameter;\r
- portBASE_TYPE lParameterStringLength;\r
+ BaseType_t lParameterStringLength;\r
\r
/* Remove compile time warnings about unused parameters, and check the\r
write buffer is not NULL. NOTE - for simplicity, this example assumes the\r
\r
/*-----------------------------------------------------------*/\r
\r
-void vCDCCommandConsoleStart( uint16_t usStackSize, unsigned portBASE_TYPE uxPriority )\r
+void vCDCCommandConsoleStart( uint16_t usStackSize, UBaseType_t uxPriority )\r
{\r
/* Create the semaphores and mutexes used by the CDC to task interface. */\r
xCDCMutex = xSemaphoreCreateMutex();\r
uint8_t ucInputIndex = 0;\r
char *pcOutputString;\r
static char cInputString[ cmdMAX_INPUT_SIZE ], cLastInputString[ cmdMAX_INPUT_SIZE ];\r
-portBASE_TYPE xReturned;\r
+BaseType_t xReturned;\r
\r
( void ) pvParameters;\r
\r
/* Callback function executed by the USB interrupt when new data arrives. */\r
void vCDCNewDataNotify( void )\r
{\r
-portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;\r
+BaseType_t xHigherPriorityTaskWoken = pdFALSE;\r
\r
configASSERT( xNewDataSemaphore );\r
\r
* Create the task that implements a command console using the USB virtual com\r
* port driver for intput and output.\r
*/\r
-void vCDCCommandConsoleStart( uint16_t usStackSize, unsigned portBASE_TYPE uxPriority );\r
+void vCDCCommandConsoleStart( uint16_t usStackSize, UBaseType_t uxPriority );\r
\r
#endif /* CDC_COMMAND_CONSOLE_H */\r
\r
* to send to and receive from an echo server. The other task uses the zero\r
* copy interface to send to and receive from an echo server.\r
*/\r
-void vStartEchoClientTasks( uint16_t usTaskStackSize, unsigned portBASE_TYPE uxTaskPriority );\r
+void vStartEchoClientTasks( uint16_t usTaskStackSize, UBaseType_t uxTaskPriority );\r
\r
#endif /* TWO_ECHO_CLIENTS_H */\r
/* Called by FreeRTOS+UDP when the network connects. */\r
void vApplicationIPNetworkEventHook( eIPCallbackEvent_t eNetworkEvent )\r
{\r
-static portBASE_TYPE xTaskAlreadyCreated = pdFALSE;\r
+static BaseType_t xTaskAlreadyCreated = pdFALSE;\r
\r
if( eNetworkEvent == eNetworkUp )\r
{\r
#include "FreeRTOS_UDP_IP.h"\r
#include "FreeRTOS_Sockets.h"\r
\r
-#define selTINY_DELAY ( ( portTickType ) 2 )\r
+#define selTINY_DELAY ( ( TickType_t ) 2 )\r
#define selNUMBER_OF_SOCKETS ( 3 )\r
#define selSELECT_QUEUE_SIZE ( selNUMBER_OF_SOCKETS * 2 )\r
\r
\r
/*-----------------------------------------------------------*/\r
\r
-void vStartSelectUDPServerTasks( uint16_t usStackSize, uint32_t ulFirstPortNumber, unsigned portBASE_TYPE uxPriority )\r
+void vStartSelectUDPServerTasks( uint16_t usStackSize, uint32_t ulFirstPortNumber, UBaseType_t uxPriority )\r
{\r
/* Create task that sends to multiple sockets, and the task that uses the\r
FreeRTOS_select() function to receive from multiple sockets. The first\r
uint32_t xClientLength = sizeof( struct freertos_sockaddr ), ulFirstRxPortNumber, x;\r
uint32_t ulReceivedValue = 0, ulExpectedValue = 0UL, ulReceivedCount[ selNUMBER_OF_SOCKETS ] = { 0 };\r
int32_t lBytes;\r
-const portTickType xRxBlockTime = 0;\r
+const TickType_t xRxBlockTime = 0;\r
\r
/* The number of the port the first Rx socket will be bound to is passed in\r
as the task parameter. Other port numbers used are consecutive from this. */\r
struct freertos_sockaddr xDestinationAddress;\r
uint32_t ulIPAddress, ulFirstDestinationPortNumber, xPortNumber;\r
xSocket_t xTxSocket;\r
-const portTickType xShortDelay = 100 / portTICK_RATE_MS, xSendBlockTime = 500 / portTICK_RATE_MS;\r
+const TickType_t xShortDelay = 100 / portTICK_RATE_MS, xSendBlockTime = 500 / portTICK_RATE_MS;\r
\r
srand( ( unsigned int ) &xPortNumber );\r
\r
#include "FreeRTOS_UDP_IP.h"\r
#include "FreeRTOS_Sockets.h"\r
\r
-#define simpTINY_DELAY ( ( portTickType ) 2 )\r
+#define simpTINY_DELAY ( ( TickType_t ) 2 )\r
\r
/*\r
* Uses a socket to send data without using the zero copy option.\r
\r
/*-----------------------------------------------------------*/\r
\r
-void vStartSimpleUDPClientServerTasks( uint16_t usStackSize, uint32_t ulPort, unsigned portBASE_TYPE uxPriority )\r
+void vStartSimpleUDPClientServerTasks( uint16_t usStackSize, uint32_t ulPort, UBaseType_t uxPriority )\r
{\r
/* Create the client and server tasks that do not use the zero copy\r
interface. */\r
xSocket_t xClientSocket;\r
struct freertos_sockaddr xDestinationAddress;\r
char cString[ 50 ];\r
-portBASE_TYPE lReturned;\r
+BaseType_t lReturned;\r
uint32_t ulCount = 0UL, ulIPAddress;\r
const uint32_t ulLoopsPerSocket = 10UL;\r
-const portTickType x150ms = 150UL / portTICK_RATE_MS;\r
+const TickType_t x150ms = 150UL / portTICK_RATE_MS;\r
\r
/* Remove compiler warning about unused parameters. */\r
( void ) pvParameters;\r
}\r
\r
/* Error check. */\r
- configASSERT( lBytes == ( portBASE_TYPE ) strlen( cReceivedString ) );\r
+ configASSERT( lBytes == ( BaseType_t ) strlen( cReceivedString ) );\r
}\r
}\r
/*-----------------------------------------------------------*/\r
xSocket_t xClientSocket;\r
uint8_t *pucUDPPayloadBuffer;\r
struct freertos_sockaddr xDestinationAddress;\r
-portBASE_TYPE lReturned;\r
+BaseType_t lReturned;\r
uint32_t ulCount = 0UL, ulIPAddress;\r
const uint32_t ulLoopsPerSocket = 10UL;\r
const char *pcStringToSend = "Server received (using zero copy): Message number ";\r
-const portTickType x150ms = 150UL / portTICK_RATE_MS;\r
+const TickType_t x150ms = 150UL / portTICK_RATE_MS;\r
/* 15 is added to ensure the number, \r\n and terminating zero fit. */\r
const size_t xStringLength = strlen( pcStringToSend ) + 15;\r
\r
\r
/* It is expected to receive one more byte than the string length as\r
the NULL terminator is also transmitted. */\r
- configASSERT( lBytes == ( ( portBASE_TYPE ) strlen( ( const char * ) pucUDPPayloadBuffer ) + 1 ) );\r
+ configASSERT( lBytes == ( ( BaseType_t ) strlen( ( const char * ) pucUDPPayloadBuffer ) + 1 ) );\r
\r
/* Print the received characters. */\r
if( lBytes > 0 )\r
\r
/*-----------------------------------------------------------*/\r
\r
-void vStartUDPCommandInterpreterTask( uint16_t usStackSize, uint32_t ulPort, unsigned portBASE_TYPE uxPriority )\r
+void vStartUDPCommandInterpreterTask( uint16_t usStackSize, uint32_t ulPort, UBaseType_t uxPriority )\r
{\r
xTaskCreate( vUDPCommandInterpreterTask, "CLI", usStackSize, ( void * ) ulPort, uxPriority, NULL );\r
}\r
long lBytes, lByte;\r
signed char cInChar, cInputIndex = 0;\r
static signed char cInputString[ cmdMAX_INPUT_SIZE ], cOutputString[ cmdMAX_OUTPUT_SIZE ], cLocalBuffer[ cmdSOCKET_INPUT_BUFFER_SIZE ];\r
-portBASE_TYPE xMoreDataToFollow;\r
+BaseType_t xMoreDataToFollow;\r
struct freertos_sockaddr xClient;\r
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. */\r
xSocket_t xSocket;\r
#ifndef SELECT_SERVER_H\r
#define SELECT_SERVER_H\r
\r
-void vStartSelectUDPServerTasks( uint16_t usStackSize, uint32_t ulFirstPortNumber, unsigned portBASE_TYPE uxPriority );\r
+void vStartSelectUDPServerTasks( uint16_t usStackSize, uint32_t ulFirstPortNumber, UBaseType_t uxPriority );\r
\r
#endif /* SELECT_SERVER_H */\r
#ifndef SIMPLE_CLIENT_AND_SERVER_H\r
#define SIMPLE_CLIENT_AND_SERVER_H\r
\r
-void vStartSimpleUDPClientServerTasks( uint16_t usStackSize, uint32_t ulsPort, unsigned portBASE_TYPE uxPriority );\r
+void vStartSimpleUDPClientServerTasks( uint16_t usStackSize, uint32_t ulsPort, UBaseType_t uxPriority );\r
\r
#endif /* SIMPLE_CLIENT_AND_SERVER_H */\r
#ifndef UDP_COMMAND_INTERPRETER_H\r
#define UDP_COMMAND_INTERPRETER_H\r
\r
-void vStartUDPCommandInterpreterTask( uint16_t usStackSize, uint32_t ulPort, unsigned portBASE_TYPE uxPriority );\r
+void vStartUDPCommandInterpreterTask( uint16_t usStackSize, uint32_t ulPort, UBaseType_t uxPriority );\r
\r
#endif /* UDP_COMMAND_INTERPRETER_H */\r
*----------------------------------------------------------*/\r
\r
#define configUSE_PREEMPTION 1\r
-#define configMAX_PRIORITIES ( ( unsigned portBASE_TYPE ) 7 )\r
+#define configMAX_PRIORITIES ( ( UBaseType_t ) 7 )\r
#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. */\r
#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. */\r
#define configTOTAL_HEAP_SIZE ( ( size_t ) ( 32U * 1024U ) )\r
results in the wired network being used, while setting\r
configNETWORK_INTERFACE_TO_USE to 2 results in the wireless network being\r
used. */\r
-#define configNETWORK_INTERFACE_TO_USE 1L\r
+#define configNETWORK_INTERFACE_TO_USE 4L\r
\r
/* The address of an echo server that will be used by the two demo echo client\r
tasks.\r
}\r
/*-----------------------------------------------------------*/\r
\r
-unsigned portBASE_TYPE uxNetifRx( void )\r
+UBaseType_t uxNetifRx( void )\r
{\r
-unsigned portBASE_TYPE xDataLen;\r
+UBaseType_t xDataLen;\r
unsigned char *pucTemp;\r
\r
/* Check there is really data available. */\r
}\r
/*-----------------------------------------------------------*/\r
\r
-portBASE_TYPE xNetifInit( void )\r
+BaseType_t xNetifInit( void )\r
{\r
-portBASE_TYPE x;\r
+BaseType_t x;\r
pcap_if_t *pxAllNetworkInterfaces;\r
\r
/* Allocate a free buffer to each buffer pointer. */\r
* bytes are placed in uip_buf. The number of bytes copied into uip_buf is\r
* returned.\r
*/\r
-unsigned portBASE_TYPE uxNetifRx( void );\r
+UBaseType_t uxNetifRx( void );\r
\r
/*\r
* Prepare a packet capture session. This will print out all the network \r
* interfaces available, and the one actually used is set by the \r
* configNETWORK_INTERFACE_TO_USE constant that is defined in \r
* FreeRTOSConfig.h. */\r
-portBASE_TYPE xNetifInit( void );\r
+BaseType_t xNetifInit( void );\r
\r
#endif /* NET_IF_H */\r
{\r
uint32_t ulIPAddress, ulNetMask, ulGatewayAddress, ulDNSServerAddress;\r
int8_t cBuffer[ 16 ];\r
-static portBASE_TYPE xTasksAlreadyCreated = pdFALSE;\r
+static BaseType_t xTasksAlreadyCreated = pdFALSE;\r
\r
if( eNetworkEvent == eNetworkUp )\r
{\r
* The callback function that is executed when "help" is entered. This is the\r
* only default command that is always present.\r
*/\r
-static portBASE_TYPE prvHelpCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
+static BaseType_t prvHelpCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
\r
/*\r
* Return the number of parameters that follow the command name.\r
\r
/*-----------------------------------------------------------*/\r
\r
-portBASE_TYPE FreeRTOS_CLIRegisterCommand( const CLI_Command_Definition_t * const pxCommandToRegister )\r
+BaseType_t FreeRTOS_CLIRegisterCommand( const CLI_Command_Definition_t * const pxCommandToRegister )\r
{\r
static CLI_Definition_List_Item_t *pxLastCommandInList = &xRegisteredCommands;\r
CLI_Definition_List_Item_t *pxNewListItem;\r
-portBASE_TYPE xReturn = pdFAIL;\r
+BaseType_t xReturn = pdFAIL;\r
\r
/* Check the parameter is not NULL. */\r
configASSERT( pxCommandToRegister );\r
}\r
/*-----------------------------------------------------------*/\r
\r
-portBASE_TYPE FreeRTOS_CLIProcessCommand( const char * const pcCommandInput, char * pcWriteBuffer, size_t xWriteBufferLen )\r
+BaseType_t FreeRTOS_CLIProcessCommand( const char * const pcCommandInput, char * pcWriteBuffer, size_t xWriteBufferLen )\r
{\r
static const CLI_Definition_List_Item_t *pxCommand = NULL;\r
-portBASE_TYPE xReturn = pdTRUE;\r
+BaseType_t xReturn = pdTRUE;\r
const char *pcRegisteredCommandString;\r
size_t xCommandStringLength;\r
\r
}\r
/*-----------------------------------------------------------*/\r
\r
-const char *FreeRTOS_CLIGetParameter( const char *pcCommandString, unsigned portBASE_TYPE uxWantedParameter, portBASE_TYPE *pxParameterStringLength )\r
+const char *FreeRTOS_CLIGetParameter( const char *pcCommandString, UBaseType_t uxWantedParameter, BaseType_t *pxParameterStringLength )\r
{\r
-unsigned portBASE_TYPE uxParametersFound = 0;\r
+UBaseType_t uxParametersFound = 0;\r
const char *pcReturn = NULL;\r
\r
*pxParameterStringLength = 0;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static portBASE_TYPE prvHelpCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
+static BaseType_t prvHelpCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )\r
{\r
static const CLI_Definition_List_Item_t * pxCommand = NULL;\r
-signed portBASE_TYPE xReturn;\r
+BaseType_t xReturn;\r
\r
( void ) pcCommandString;\r
\r
static int8_t prvGetNumberOfParameters( const char *pcCommandString )\r
{\r
int8_t cParameters = 0;\r
-portBASE_TYPE xLastCharacterWasSpace = pdFALSE;\r
+BaseType_t xLastCharacterWasSpace = pdFALSE;\r
\r
/* Count the number of space delimited words in pcCommandString. */\r
while( *pcCommandString != 0x00 )\r
executing the command can be written, xWriteBufferLen is the length, in bytes of\r
the pcWriteBuffer buffer, and pcCommandString is the entire string as input by\r
the user (from which parameters can be extracted).*/\r
-typedef portBASE_TYPE (*pdCOMMAND_LINE_CALLBACK)( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
+typedef BaseType_t (*pdCOMMAND_LINE_CALLBACK)( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );\r
\r
/* The structure that defines command line commands. A command line command\r
should be defined by declaring a const structure of this type. */\r
* handled by the command interpreter. Once a command has been registered it\r
* can be executed from the command line.\r
*/\r
-portBASE_TYPE FreeRTOS_CLIRegisterCommand( const CLI_Command_Definition_t * const pxCommandToRegister );\r
+BaseType_t FreeRTOS_CLIRegisterCommand( const CLI_Command_Definition_t * const pxCommandToRegister );\r
\r
/*\r
* Runs the command interpreter for the command string "pcCommandInput". Any\r
* pcCmdIntProcessCommand is not reentrant. It must not be called from more\r
* than one task - or at least - by more than one task at a time.\r
*/\r
-portBASE_TYPE FreeRTOS_CLIProcessCommand( const char * const pcCommandInput, char * pcWriteBuffer, size_t xWriteBufferLen );\r
+BaseType_t FreeRTOS_CLIProcessCommand( const char * const pcCommandInput, char * pcWriteBuffer, size_t xWriteBufferLen );\r
\r
/*-----------------------------------------------------------*/\r
\r
/*\r
* Return a pointer to the xParameterNumber'th word in pcCommandString.\r
*/\r
-const char *FreeRTOS_CLIGetParameter( const char *pcCommandString, unsigned portBASE_TYPE uxWantedParameter, portBASE_TYPE *pxParameterStringLength );\r
+const char *FreeRTOS_CLIGetParameter( const char *pcCommandString, UBaseType_t uxWantedParameter, BaseType_t *pxParameterStringLength );\r
\r
#endif /* COMMAND_INTERPRETER_H */\r
\r
/* Called on each OS tick. Will call uiPortGetTimestamp to make sure it is called at least once every OS tick. */\r
#undef traceTASK_INCREMENT_TICK\r
#define traceTASK_INCREMENT_TICK( xTickCount ) \\r
- if (uxSchedulerSuspended == ( unsigned portBASE_TYPE ) pdTRUE || uxPendedTicks == 0) { trcKERNEL_HOOKS_INCREMENT_TICK(); } \\r
- if (uxSchedulerSuspended == ( unsigned portBASE_TYPE ) pdFALSE) { trcKERNEL_HOOKS_NEW_TIME(DIV_NEW_TIME, xTickCount + 1); }\r
+ if (uxSchedulerSuspended == ( UBaseType_t ) pdTRUE || uxPendedTicks == 0) { trcKERNEL_HOOKS_INCREMENT_TICK(); } \\r
+ if (uxSchedulerSuspended == ( UBaseType_t ) pdFALSE) { trcKERNEL_HOOKS_NEW_TIME(DIV_NEW_TIME, xTickCount + 1); }\r
\r
/* Called on each task-switch */\r
#undef traceTASK_SWITCHED_IN\r
int uiInEventGroupSetBitsFromISR = 0;\r
\r
extern unsigned char ucQueueGetQueueType(void*);\r
-extern portBASE_TYPE uxQueueGetQueueNumber(void*);\r
+extern BaseType_t uxQueueGetQueueNumber(void*);\r
\r
objectHandleType prvTraceGetObjectNumber(void* handle)\r
{\r
/*\r
* Interpret message received on the DHCP socket.\r
*/\r
-static portBASE_TYPE prvProcessDHCPReplies( uint8_t ucExpectedMessageType, xMACAddress_t *pxMACAddress, xNetworkAddressingParameters_t *pxNetworkAddressing );\r
+static BaseType_t prvProcessDHCPReplies( uint8_t ucExpectedMessageType, xMACAddress_t *pxMACAddress, xNetworkAddressingParameters_t *pxNetworkAddressing );\r
\r
/*\r
* Generate a DHCP request packet, and send it on the DHCP socket.\r
static uint32_t ulTransactionId = 0UL, ulOfferedIPAddress = 0UL, ulDHCPServerAddress = 0UL, ulLeaseTime = 0;\r
\r
/* Hold information on the current timer state. */\r
-static portTickType xDHCPTxTime = 0x00, xDHCPTxPeriod = 0x00;\r
+static TickType_t xDHCPTxTime = 0x00, xDHCPTxPeriod = 0x00;\r
\r
/* Maintains the DHCP state machine state. */\r
static eDHCPState_t eDHCPState = eWaitingSendFirstDiscover;\r
\r
/*-----------------------------------------------------------*/\r
\r
-void vDHCPProcess( portBASE_TYPE xReset, xMACAddress_t *pxMACAddress, uint32_t *pulIPAddress, xNetworkAddressingParameters_t *pxNetworkAddressing )\r
+void vDHCPProcess( BaseType_t xReset, xMACAddress_t *pxMACAddress, uint32_t *pulIPAddress, xNetworkAddressingParameters_t *pxNetworkAddressing )\r
{\r
if( xReset != pdFALSE )\r
{\r
}\r
taskEXIT_CRITICAL();\r
eDHCPState = eNotUsingLeasedAddress;\r
- xTimerStop( xDHCPTimer, ( portTickType ) 0 );\r
+ xTimerStop( xDHCPTimer, ( TickType_t ) 0 );\r
\r
#if ipconfigUSE_NETWORK_EVENT_HOOK == 1\r
{\r
break;\r
\r
case eNotUsingLeasedAddress:\r
- xTimerStop( xDHCPTimer, ( portTickType ) 0 );\r
+ xTimerStop( xDHCPTimer, ( TickType_t ) 0 );\r
break;\r
}\r
}\r
static void prvCreateDHCPSocket( void )\r
{\r
struct freertos_sockaddr xAddress;\r
-portBASE_TYPE xReturn;\r
-portTickType xTimeoutTime = 0;\r
+BaseType_t xReturn;\r
+TickType_t xTimeoutTime = 0;\r
\r
/* Create the socket, if it has not already been created. */\r
if( xDHCPSocket == NULL )\r
\r
/* Ensure the Rx and Tx timeouts are zero as the DHCP executes in the\r
context of the IP task. */\r
- FreeRTOS_setsockopt( xDHCPSocket, 0, FREERTOS_SO_RCVTIMEO, ( void * ) &xTimeoutTime, sizeof( portTickType ) );\r
- FreeRTOS_setsockopt( xDHCPSocket, 0, FREERTOS_SO_SNDTIMEO, ( void * ) &xTimeoutTime, sizeof( portTickType ) );\r
+ FreeRTOS_setsockopt( xDHCPSocket, 0, FREERTOS_SO_RCVTIMEO, ( void * ) &xTimeoutTime, sizeof( TickType_t ) );\r
+ FreeRTOS_setsockopt( xDHCPSocket, 0, FREERTOS_SO_SNDTIMEO, ( void * ) &xTimeoutTime, sizeof( TickType_t ) );\r
\r
/* Bind to the standard DHCP client port. */\r
xAddress.sin_port = dhcpCLIENT_PORT;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static portBASE_TYPE prvProcessDHCPReplies( uint8_t ucExpectedMessageType, xMACAddress_t *pxMACAddress, xNetworkAddressingParameters_t *pxNetworkAddressing )\r
+static BaseType_t prvProcessDHCPReplies( uint8_t ucExpectedMessageType, xMACAddress_t *pxMACAddress, xNetworkAddressingParameters_t *pxNetworkAddressing )\r
{\r
uint8_t *pucUDPPayload, *pucLastByte;\r
struct freertos_sockaddr xClient;\r
xDHCPMessage_t *pxDHCPMessage;\r
uint8_t *pucByte, ucOptionCode, ucLength;\r
uint32_t ulProcessed;\r
-portBASE_TYPE xReturn = pdFALSE;\r
+BaseType_t xReturn = pdFALSE;\r
const uint32_t ulMandatoryOptions = 2; /* DHCP server address, and the correct DHCP message type must be present in the options. */\r
\r
lBytes = FreeRTOS_recvfrom( xDHCPSocket, ( void * ) &pucUDPPayload, 0, FREERTOS_ZERO_COPY, &xClient, &xClientLength );\r
uint32_t ulIPAddress = 0UL;\r
uint8_t *pucUDPPayloadBuffer;\r
static uint32_t ulAddressLength;\r
-portBASE_TYPE xAttempt;\r
+BaseType_t xAttempt;\r
int32_t lBytes;\r
size_t xPayloadLength;\r
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 */\r
{\r
static xSocket_t xSocket = NULL;\r
struct freertos_sockaddr xAddress;\r
-portBASE_TYPE xReturn;\r
-portTickType xTimeoutTime = 200 / portTICK_RATE_MS;\r
+BaseType_t xReturn;\r
+TickType_t xTimeoutTime = 200 / portTICK_RATE_MS;\r
\r
/* This must be the first time this function has been called. Create\r
the socket. */\r
else\r
{\r
/* Set the send and receive timeouts. */\r
- FreeRTOS_setsockopt( xSocket, 0, FREERTOS_SO_RCVTIMEO, ( void * ) &xTimeoutTime, sizeof( portTickType ) );\r
- FreeRTOS_setsockopt( xSocket, 0, FREERTOS_SO_SNDTIMEO, ( void * ) &xTimeoutTime, sizeof( portTickType ) );\r
+ FreeRTOS_setsockopt( xSocket, 0, FREERTOS_SO_RCVTIMEO, ( void * ) &xTimeoutTime, sizeof( TickType_t ) );\r
+ FreeRTOS_setsockopt( xSocket, 0, FREERTOS_SO_SNDTIMEO, ( void * ) &xTimeoutTime, sizeof( TickType_t ) );\r
}\r
\r
return xSocket;\r
\r
/* xWaitingPacketSemaphore is not created until the socket is bound, so can be\r
tested to see if bind() has been called. */\r
-#define socketSOCKET_IS_BOUND( pxSocket ) ( ( portBASE_TYPE ) pxSocket->xWaitingPacketSemaphore )\r
+#define socketSOCKET_IS_BOUND( pxSocket ) ( ( BaseType_t ) pxSocket->xWaitingPacketSemaphore )\r
\r
/* If FreeRTOS_sendto() is called on a socket that is not bound to a port\r
number then, depending on the FreeRTOSIPConfig.h settings, it might be that a\r
* Return the list itme from within pxList that has an item value of\r
* xWantedItemValue. If there is no such list item return NULL.\r
*/\r
-xListItem * pxListFindListItemWithValue( xList *pxList, portTickType xWantedItemValue );\r
+xListItem * pxListFindListItemWithValue( xList *pxList, TickType_t xWantedItemValue );\r
\r
/*-----------------------------------------------------------*/\r
\r
xSemaphoreHandle xWaitingPacketSemaphore;\r
xList xWaitingPacketsList;\r
xListItem xBoundSocketListItem; /* Used to reference the socket from a bound sockets list. */\r
- portTickType xReceiveBlockTime;\r
- portTickType xSendBlockTime;\r
+ TickType_t xReceiveBlockTime;\r
+ TickType_t xSendBlockTime;\r
uint8_t ucSocketOptions;\r
#if ipconfigSUPPORT_SELECT_FUNCTION == 1\r
xQueueHandle xSelectQueue;\r
\r
/*-----------------------------------------------------------*/\r
\r
-xSocket_t FreeRTOS_socket( portBASE_TYPE xDomain, portBASE_TYPE xType, portBASE_TYPE xProtocol )\r
+xSocket_t FreeRTOS_socket( BaseType_t xDomain, BaseType_t xType, BaseType_t xProtocol )\r
{\r
xFreeRTOS_Socket_t *pxSocket;\r
\r
vListInitialise( &( pxSocket->xWaitingPacketsList ) );\r
vListInitialiseItem( &( pxSocket->xBoundSocketListItem ) );\r
listSET_LIST_ITEM_OWNER( &( pxSocket->xBoundSocketListItem ), ( void * ) pxSocket );\r
- pxSocket->xSendBlockTime = ( portTickType ) 0;\r
+ pxSocket->xSendBlockTime = ( TickType_t ) 0;\r
pxSocket->xReceiveBlockTime = portMAX_DELAY;\r
pxSocket->ucSocketOptions = FREERTOS_SO_UDPCKSUM_OUT;\r
#if ipconfigSUPPORT_SELECT_FUNCTION == 1\r
\r
#if ipconfigSUPPORT_SELECT_FUNCTION == 1\r
\r
- xSocketSet_t FreeRTOS_CreateSocketSet( unsigned portBASE_TYPE uxEventQueueLength )\r
+ xSocketSet_t FreeRTOS_CreateSocketSet( UBaseType_t uxEventQueueLength )\r
{\r
xQueueHandle xSelectQueue;\r
\r
\r
#if ipconfigSUPPORT_SELECT_FUNCTION == 1\r
\r
- portBASE_TYPE FreeRTOS_FD_SET( xSocket_t xSocket, xSocketSet_t xSocketSet )\r
+ BaseType_t FreeRTOS_FD_SET( xSocket_t xSocket, xSocketSet_t xSocketSet )\r
{\r
xFreeRTOS_Socket_t *pxSocket = ( xFreeRTOS_Socket_t * ) xSocket;\r
- portBASE_TYPE xReturn = pdFALSE;\r
- unsigned portBASE_TYPE uxMessagesWaiting;\r
+ BaseType_t xReturn = pdFALSE;\r
+ UBaseType_t uxMessagesWaiting;\r
\r
configASSERT( xSocket );\r
\r
\r
#if ipconfigSUPPORT_SELECT_FUNCTION == 1\r
\r
- portBASE_TYPE FreeRTOS_FD_CLR( xSocket_t xSocket, xSocketSet_t xSocketSet )\r
+ BaseType_t FreeRTOS_FD_CLR( xSocket_t xSocket, xSocketSet_t xSocketSet )\r
{\r
xFreeRTOS_Socket_t *pxSocket = ( xFreeRTOS_Socket_t * ) xSocket;\r
- portBASE_TYPE xReturn;\r
+ BaseType_t xReturn;\r
\r
/* Is the socket a member of the select group? */\r
if( pxSocket->xSelectQueue == ( xQueueHandle ) xSocketSet )\r
\r
#if ipconfigSUPPORT_SELECT_FUNCTION == 1\r
\r
- xSocket_t FreeRTOS_select( xSocketSet_t xSocketSet, portTickType xBlockTimeTicks )\r
+ xSocket_t FreeRTOS_select( xSocketSet_t xSocketSet, TickType_t xBlockTimeTicks )\r
{\r
xFreeRTOS_Socket_t *pxSocket;\r
\r
extern xQueueHandle xNetworkEventQueue;\r
uint8_t *pucBuffer;\r
xTimeOutType xTimeOut;\r
- portTickType xTicksToWait;\r
+ TickType_t xTicksToWait;\r
uint16_t usFragmentOffset;\r
xFreeRTOS_Socket_t *pxSocket;\r
\r
xIPStackEvent_t xStackTxEvent = { eStackTxEvent, NULL };\r
extern xQueueHandle xNetworkEventQueue;\r
xTimeOutType xTimeOut;\r
- portTickType xTicksToWait;\r
+ TickType_t xTicksToWait;\r
int32_t lReturn = 0;\r
xFreeRTOS_Socket_t *pxSocket;\r
uint8_t *pucBuffer;\r
#endif /* ipconfigCAN_FRAGMENT_OUTGOING_PACKETS */\r
/*-----------------------------------------------------------*/\r
\r
-portBASE_TYPE FreeRTOS_bind( xSocket_t xSocket, struct freertos_sockaddr * pxAddress, socklen_t xAddressLength )\r
+BaseType_t FreeRTOS_bind( xSocket_t xSocket, struct freertos_sockaddr * pxAddress, socklen_t xAddressLength )\r
{\r
-portBASE_TYPE xReturn = 0; /* In Berkeley sockets, 0 means pass for bind(). */\r
+BaseType_t xReturn = 0; /* In Berkeley sockets, 0 means pass for bind(). */\r
xFreeRTOS_Socket_t *pxSocket;\r
#if ipconfigALLOW_SOCKET_SEND_WITHOUT_BIND == 1\r
struct freertos_sockaddr xAddress;\r
vTaskSuspendAll();\r
{\r
/* Check to ensure the port is not already in use. */\r
- if( pxListFindListItemWithValue( &xBoundSocketsList, ( portTickType ) pxAddress->sin_port ) != NULL )\r
+ if( pxListFindListItemWithValue( &xBoundSocketsList, ( TickType_t ) pxAddress->sin_port ) != NULL )\r
{\r
xReturn = FREERTOS_EADDRINUSE;\r
}\r
} /* Tested */\r
/*-----------------------------------------------------------*/\r
\r
-portBASE_TYPE FreeRTOS_closesocket( xSocket_t xSocket )\r
+BaseType_t FreeRTOS_closesocket( xSocket_t xSocket )\r
{\r
xNetworkBufferDescriptor_t *pxNetworkBuffer;\r
xFreeRTOS_Socket_t *pxSocket;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-portBASE_TYPE FreeRTOS_setsockopt( xSocket_t xSocket, int32_t lLevel, int32_t lOptionName, const void *pvOptionValue, size_t xOptionLength )\r
+BaseType_t FreeRTOS_setsockopt( xSocket_t xSocket, int32_t lLevel, int32_t lOptionName, const void *pvOptionValue, size_t xOptionLength )\r
{\r
/* The standard Berkeley function returns 0 for success. */\r
-portBASE_TYPE xReturn = 0;\r
-portBASE_TYPE lOptionValue;\r
+BaseType_t xReturn = 0;\r
+BaseType_t lOptionValue;\r
xFreeRTOS_Socket_t *pxSocket;\r
\r
pxSocket = ( xFreeRTOS_Socket_t * ) xSocket;\r
{\r
case FREERTOS_SO_RCVTIMEO :\r
/* Receive time out. */\r
- pxSocket->xReceiveBlockTime = *( ( portTickType * ) pvOptionValue );\r
+ pxSocket->xReceiveBlockTime = *( ( TickType_t * ) pvOptionValue );\r
break;\r
\r
case FREERTOS_SO_SNDTIMEO :\r
where ipconfigMAX_SEND_BLOCK_TIME_TICKS is defined in\r
FreeRTOSIPConfig.h (assuming an official configuration file is being\r
used. */\r
- pxSocket->xSendBlockTime = *( ( portTickType * ) pvOptionValue );\r
+ pxSocket->xSendBlockTime = *( ( TickType_t * ) pvOptionValue );\r
if( pxSocket->xSendBlockTime > ipconfigMAX_SEND_BLOCK_TIME_TICKS )\r
{\r
pxSocket->xSendBlockTime = ipconfigMAX_SEND_BLOCK_TIME_TICKS;\r
\r
case FREERTOS_SO_UDPCKSUM_OUT :\r
/* Turn calculating of the UDP checksum on/off for this socket. */\r
- lOptionValue = ( portBASE_TYPE ) pvOptionValue;\r
+ lOptionValue = ( BaseType_t ) pvOptionValue;\r
\r
if( lOptionValue == 0 )\r
{\r
} /* Tested */\r
/*-----------------------------------------------------------*/\r
\r
-portBASE_TYPE xProcessReceivedUDPPacket( xNetworkBufferDescriptor_t *pxNetworkBuffer, uint16_t usPort )\r
+BaseType_t xProcessReceivedUDPPacket( xNetworkBufferDescriptor_t *pxNetworkBuffer, uint16_t usPort )\r
{\r
xListItem *pxListItem;\r
-portBASE_TYPE xReturn = pdPASS;\r
+BaseType_t xReturn = pdPASS;\r
xFreeRTOS_Socket_t *pxSocket;\r
-portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;\r
+BaseType_t xHigherPriorityTaskWoken = pdFALSE;\r
\r
vTaskSuspendAll();\r
{\r
/* See if there is a list item associated with the port number on the\r
list of bound sockets. */\r
- pxListItem = pxListFindListItemWithValue( &xBoundSocketsList, ( portTickType ) usPort );\r
+ pxListItem = pxListFindListItemWithValue( &xBoundSocketsList, ( TickType_t ) usPort );\r
}\r
xTaskResumeAll();\r
\r
} /* Tested */\r
/*-----------------------------------------------------------*/\r
\r
-xListItem * pxListFindListItemWithValue( xList *pxList, portTickType xWantedItemValue )\r
+xListItem * pxListFindListItemWithValue( xList *pxList, TickType_t xWantedItemValue )\r
{\r
xListItem *pxIterator, *pxReturn;\r
\r
uint8_t ucOctet[ socketMAX_IP_ADDRESS_OCTETS ];\r
const char *pcPointerOnEntering;\r
uint32_t ulReturn = 0UL, ulOctetNumber, ulValue;\r
- portBASE_TYPE xResult = pdPASS;\r
+ BaseType_t xResult = pdPASS;\r
\r
for( ulOctetNumber = 0; ulOctetNumber < socketMAX_IP_ADDRESS_OCTETS; ulOctetNumber++ )\r
{\r
#define ipIP_VERSION_AND_HEADER_LENGTH_BYTE ( ( uint8_t ) 0x45 )\r
\r
/* Time delay between repeated attempts to initialise the network hardware. */\r
-#define ipINITIALISATION_RETRY_DELAY ( ( ( portTickType ) 3000 ) / portTICK_RATE_MS )\r
+#define ipINITIALISATION_RETRY_DELAY ( ( ( TickType_t ) 3000 ) / portTICK_RATE_MS )\r
\r
/* The local MAC address is accessed from within xDefaultPartUDPPacketHeader,\r
rather than duplicated in its own variable. */\r
/*\r
* Return the checksum generated over usDataLengthBytes from pucNextData.\r
*/\r
-static uint16_t prvGenerateChecksum( const uint8_t * const pucNextData, const uint16_t usDataLengthBytes, portBASE_TYPE xChecksumIsOffloaded );\r
+static uint16_t prvGenerateChecksum( const uint8_t * const pucNextData, const uint16_t usDataLengthBytes, BaseType_t xChecksumIsOffloaded );\r
\r
/*\r
* The callback function that is assigned to all periodic processing timers -\r
* Creates the pseudo header necessary then generate the checksum over the UDP\r
* packet. Returns the calculated checksum.\r
*/\r
-static uint16_t prvGenerateUDPChecksum( const xUDPPacket_t * const pxUDPPacket, portBASE_TYPE xChecksumIsOffloaded );\r
+static uint16_t prvGenerateUDPChecksum( const xUDPPacket_t * const pxUDPPacket, BaseType_t xChecksumIsOffloaded );\r
\r
/*\r
* Look for ulIPAddress in the ARP cache. If the IP address exists, copy the\r
* zero. Return pdPASS if the message was sent successfully, otherwise return\r
* pdFALSE.\r
*/\r
-static portBASE_TYPE prvSendEventToIPTask( eIPEvent_t eEvent );\r
+static BaseType_t prvSendEventToIPTask( eIPEvent_t eEvent );\r
\r
/*\r
* Generate and send an ARP request for the IP address passed in ulIPAddress.\r
/* Used to ensure network down events cannot be missed when they cannot be\r
posted to the network event queue because the network event queue is already\r
full. */\r
-static portBASE_TYPE xNetworkDownEventPending = pdFALSE;\r
+static BaseType_t xNetworkDownEventPending = pdFALSE;\r
\r
/* For convenience, a MAC address of all zeros and another of all 0xffs are\r
defined const for quick reference. */\r
void FreeRTOS_NetworkDown( void )\r
{\r
static const xIPStackEvent_t xNetworkDownEvent = { eNetworkDownEvent, NULL };\r
-const portTickType xDontBlock = 0;\r
+const TickType_t xDontBlock = 0;\r
\r
/* Simply send the network task the appropriate event. */\r
if( xQueueSendToBack( xNetworkEventQueue, &xNetworkDownEvent, xDontBlock ) != pdPASS )\r
}\r
/*-----------------------------------------------------------*/\r
\r
-portBASE_TYPE FreeRTOS_NetworkDownFromISR( void )\r
+BaseType_t FreeRTOS_NetworkDownFromISR( void )\r
{\r
static const xIPStackEvent_t xNetworkDownEvent = { eNetworkDownEvent, NULL };\r
-portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;\r
+BaseType_t xHigherPriorityTaskWoken = pdFALSE;\r
\r
/* Simply send the network task the appropriate event. */\r
if( xQueueSendToBackFromISR( xNetworkEventQueue, &xNetworkDownEvent, &xHigherPriorityTaskWoken ) != pdPASS )\r
}\r
/*-----------------------------------------------------------*/\r
\r
-void *FreeRTOS_GetUDPPayloadBuffer( size_t xRequestedSizeBytes, portTickType xBlockTimeTicks )\r
+void *FreeRTOS_GetUDPPayloadBuffer( size_t xRequestedSizeBytes, TickType_t xBlockTimeTicks )\r
{\r
xNetworkBufferDescriptor_t *pxNetworkBuffer;\r
void *pvReturn;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-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 ] )\r
+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 ] )\r
{\r
-static portBASE_TYPE xReturn = pdFALSE;\r
+static BaseType_t xReturn = pdFALSE;\r
\r
/* Only create the IP event queue if it has not already been created, in\r
case this function is called more than once. */\r
\r
#if ( ipconfigSUPPORT_OUTGOING_PINGS == 1 )\r
\r
- portBASE_TYPE FreeRTOS_SendPingRequest( uint32_t ulIPAddress, size_t xNumberOfBytesToSend, portTickType xBlockTimeTicks )\r
+ BaseType_t FreeRTOS_SendPingRequest( uint32_t ulIPAddress, size_t xNumberOfBytesToSend, TickType_t xBlockTimeTicks )\r
{\r
xNetworkBufferDescriptor_t *pxNetworkBuffer;\r
xICMPHeader_t *pxICMPHeader;\r
- portBASE_TYPE xReturn = pdFAIL;\r
+ BaseType_t xReturn = pdFAIL;\r
static uint16_t usSequenceNumber = 0;\r
uint8_t *pucChar;\r
xIPStackEvent_t xStackTxEvent = { eStackTxEvent, NULL };\r
\r
/*-----------------------------------------------------------*/\r
\r
-static portBASE_TYPE prvSendEventToIPTask( eIPEvent_t eEvent )\r
+static BaseType_t prvSendEventToIPTask( eIPEvent_t eEvent )\r
{\r
xIPStackEvent_t xEventMessage;\r
-const portTickType xDontBlock = 0;\r
-portBASE_TYPE xReturn;\r
+const TickType_t xDontBlock = 0;\r
+BaseType_t xReturn;\r
\r
xEventMessage.eEventType = eEvent;\r
xReturn = xQueueSendToBack( xNetworkEventQueue, &xEventMessage, xDontBlock );\r
/* This time can be used to send more than one type of message to the IP\r
task. The message ID is stored in the ID of the timer. The strange\r
casting is to avoid compiler warnings. */\r
- eMessage = ( eIPEvent_t ) ( ( portBASE_TYPE ) pvTimerGetTimerID( xTimer ) );\r
+ eMessage = ( eIPEvent_t ) ( ( BaseType_t ) pvTimerGetTimerID( xTimer ) );\r
\r
prvSendEventToIPTask( eMessage );\r
}\r
\r
static void prvAgeARPCache( void )\r
{\r
-portBASE_TYPE x;\r
+BaseType_t x;\r
\r
/* Loop through each entry in the ARP cache. */\r
for( x = 0; x < ipconfigARP_CACHE_ENTRIES; x++ )\r
\r
static eARPLookupResult_t prvGetARPCacheEntry( uint32_t *pulIPAddress, xMACAddress_t * const pxMACAddress )\r
{\r
-portBASE_TYPE x;\r
+BaseType_t x;\r
eARPLookupResult_t eReturn;\r
uint32_t ulAddressToLookup;\r
\r
\r
static void prvRefreshARPCacheEntry( const xMACAddress_t * const pxMACAddress, const uint32_t ulIPAddress )\r
{\r
-portBASE_TYPE x, xEntryFound = pdFALSE, xOldestEntry = 0;\r
+BaseType_t x, xEntryFound = pdFALSE, xOldestEntry = 0;\r
uint8_t ucMinAgeFound = 0U;\r
\r
/* Only process the IP address if it is on the local network. */\r
\r
#if ipconfigUSE_NETWORK_EVENT_HOOK == 1\r
{\r
- static portBASE_TYPE xCallEventHook = pdFALSE;\r
+ static BaseType_t xCallEventHook = pdFALSE;\r
\r
/* The first network down event is generated by the IP stack\r
itself to initialise the network hardware, so do not call the\r
eFrameProcessingResult_t eReturn = eReleaseBuffer;\r
const xIPHeader_t * pxIPHeader;\r
xUDPPacket_t *pxUDPPacket;\r
-portBASE_TYPE xChecksumIsCorrect;\r
+BaseType_t xChecksumIsCorrect;\r
\r
pxIPHeader = &( pxIPPacket->xIPHeader );\r
\r
}\r
/*-----------------------------------------------------------*/\r
\r
-static uint16_t prvGenerateUDPChecksum( const xUDPPacket_t * const pxUDPPacket, portBASE_TYPE xChecksumIsOffloaded )\r
+static uint16_t prvGenerateUDPChecksum( const xUDPPacket_t * const pxUDPPacket, BaseType_t xChecksumIsOffloaded )\r
{\r
xPseudoHeader_t *pxPseudoHeader;\r
uint16_t usLength, usReturn;\r
#endif /* ( ipconfigREPLY_TO_INCOMING_PINGS == 1 ) || ( ipconfigSUPPORT_OUTGOING_PINGS == 1 ) */\r
/*-----------------------------------------------------------*/\r
\r
-static uint16_t prvGenerateChecksum( const uint8_t * const pucNextData, const uint16_t usDataLengthBytes, portBASE_TYPE xChecksumIsOffloaded )\r
+static uint16_t prvGenerateChecksum( const uint8_t * const pucNextData, const uint16_t usDataLengthBytes, BaseType_t xChecksumIsOffloaded )\r
{\r
uint32_t ulChecksum = 0;\r
uint16_t us, usDataLength16BitWords, *pusNextData, usReturn;\r
/*\r
* NOT A PUBLIC API FUNCTION.\r
*/\r
-void vDHCPProcess( portBASE_TYPE xReset, xMACAddress_t *pxMACAddress, uint32_t *pulIPAddress, xNetworkAddressingParameters_t *pxNetworkAddressing );\r
+void vDHCPProcess( BaseType_t xReset, xMACAddress_t *pxMACAddress, uint32_t *pulIPAddress, xNetworkAddressingParameters_t *pxNetworkAddressing );\r
\r
#endif /* FREERTOS_DHCP_H */\r
\r
* interrupt. If a non zero value is returned, then the calling ISR should\r
* perform a context switch before exiting the ISR.\r
*/\r
-portBASE_TYPE FreeRTOS_ReleaseFreeNetworkBufferFromISR( void );\r
+BaseType_t FreeRTOS_ReleaseFreeNetworkBufferFromISR( void );\r
\r
/*\r
* Create a message that contains a command to initialise the network interface.\r
* the interrupt is exited.\r
*/\r
void FreeRTOS_NetworkDown( void );\r
-portBASE_TYPE FreeRTOS_NetworkDownFromISR( void );\r
+BaseType_t FreeRTOS_NetworkDownFromISR( void );\r
\r
/*\r
* Inspect an Ethernet frame to see if it contains data that the stack needs to\r
eFrameProcessingResult_t eConsiderFrameForProcessing( const uint8_t * const pucEthernetBuffer );\r
\r
#if( ipconfigINCLUDE_TEST_CODE == 1 )\r
- unsigned portBASE_TYPE uxGetNumberOfFreeNetworkBuffers( void );\r
+ UBaseType_t uxGetNumberOfFreeNetworkBuffers( void );\r
#endif /* ipconfigINCLUDE_TEST_CODE */\r
\r
/* Socket related private functions. */\r
-portBASE_TYPE xProcessReceivedUDPPacket( xNetworkBufferDescriptor_t *pxNetworkBuffer, uint16_t usPort );\r
+BaseType_t xProcessReceivedUDPPacket( xNetworkBufferDescriptor_t *pxNetworkBuffer, uint16_t usPort );\r
void FreeRTOS_SocketsInit( void );\r
\r
/* If FreeRTOS+NABTO is included then include the prototype of the function that\r
* FUNCTIONS IS AVAILABLE ON THE FOLLOWING URL:\r
* http://www.FreeRTOS.org/FreeRTOS-Plus/FreeRTOS_Plus_UDP/FreeRTOS_UDP_API_Functions.shtml\r
*/\r
-xSocket_t FreeRTOS_socket( portBASE_TYPE xDomain, portBASE_TYPE xType, portBASE_TYPE xProtocol );\r
+xSocket_t FreeRTOS_socket( BaseType_t xDomain, BaseType_t xType, BaseType_t xProtocol );\r
int32_t FreeRTOS_recvfrom( xSocket_t xSocket, void *pvBuffer, size_t xBufferLength, uint32_t ulFlags, struct freertos_sockaddr *pxSourceAddress, socklen_t *pxSourceAddressLength );\r
int32_t FreeRTOS_sendto( xSocket_t xSocket, const void *pvBuffer, size_t xTotalDataLength, uint32_t ulFlags, const struct freertos_sockaddr *pxDestinationAddress, socklen_t xDestinationAddressLength );\r
-portBASE_TYPE FreeRTOS_bind( xSocket_t xSocket, struct freertos_sockaddr *pxAddress, socklen_t xAddressLength );\r
-portBASE_TYPE FreeRTOS_setsockopt( xSocket_t xSocket, int32_t lLevel, int32_t lOptionName, const void *pvOptionValue, size_t xOptionLength );\r
-portBASE_TYPE FreeRTOS_closesocket( xSocket_t xSocket );\r
+BaseType_t FreeRTOS_bind( xSocket_t xSocket, struct freertos_sockaddr *pxAddress, socklen_t xAddressLength );\r
+BaseType_t FreeRTOS_setsockopt( xSocket_t xSocket, int32_t lLevel, int32_t lOptionName, const void *pvOptionValue, size_t xOptionLength );\r
+BaseType_t FreeRTOS_closesocket( xSocket_t xSocket );\r
uint32_t FreeRTOS_gethostbyname( const char *pcHostName );\r
uint32_t FreeRTOS_inet_addr( const char *pcIPAddress );\r
\r
#if ipconfigSUPPORT_SELECT_FUNCTION == 1\r
- xSocketSet_t FreeRTOS_CreateSocketSet( unsigned portBASE_TYPE uxEventQueueLength );\r
- portBASE_TYPE FreeRTOS_FD_SET( xSocket_t xSocket, xSocketSet_t xSocketSet );\r
- portBASE_TYPE FreeRTOS_FD_CLR( xSocket_t xSocket, xSocketSet_t xSocketSet );\r
- xSocket_t FreeRTOS_select( xSocketSet_t xSocketSet, portTickType xBlockTimeTicks );\r
+ xSocketSet_t FreeRTOS_CreateSocketSet( UBaseType_t uxEventQueueLength );\r
+ BaseType_t FreeRTOS_FD_SET( xSocket_t xSocket, xSocketSet_t xSocketSet );\r
+ BaseType_t FreeRTOS_FD_CLR( xSocket_t xSocket, xSocketSet_t xSocketSet );\r
+ xSocket_t FreeRTOS_select( xSocketSet_t xSocketSet, TickType_t xBlockTimeTicks );\r
#endif /* ipconfigSUPPORT_SELECT_FUNCTION */\r
\r
#endif /* FREERTOS_UDP_H */\r
* FUNCTIONS IS AVAILABLE ON THE FOLLOWING URL:\r
* http://www.FreeRTOS.org/FreeRTOS-Plus/FreeRTOS_Plus_UDP/FreeRTOS_UDP_API_Functions.shtml\r
*/\r
-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 ] );\r
-void * FreeRTOS_GetUDPPayloadBuffer( size_t xRequestedSizeBytes, portTickType xBlockTimeTicks );\r
+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 ] );\r
+void * FreeRTOS_GetUDPPayloadBuffer( size_t xRequestedSizeBytes, TickType_t xBlockTimeTicks );\r
void FreeRTOS_GetAddressConfiguration( uint32_t *pulIPAddress, uint32_t *pulNetMask, uint32_t *pulGatewayAddress, uint32_t *pulDNSServerAddress );\r
-portBASE_TYPE FreeRTOS_SendPingRequest( uint32_t ulIPAddress, size_t xNumberOfBytesToSend, portTickType xBlockTimeTicks );\r
+BaseType_t FreeRTOS_SendPingRequest( uint32_t ulIPAddress, size_t xNumberOfBytesToSend, TickType_t xBlockTimeTicks );\r
void vApplicationIPNetworkEventHook( eIPCallbackEvent_t eNetworkEvent );\r
void vApplicationPingReplyHook( ePingReplyStatus_t eStatus, uint16_t usIdentifier );\r
void FreeRTOS_ReleaseUDPPayloadBuffer( void *pvBuffer );\r
uint8_t * FreeRTOS_GetMACAddress( void );\r
\r
#if ( ipconfigFREERTOS_PLUS_NABTO == 1 )\r
- portBASE_TYPE xStartNabtoTask( void );\r
+ BaseType_t xStartNabtoTask( void );\r
#endif\r
\r
#endif /* FREERTOS_IP_H */\r
#define NETWORK_BUFFER_MANAGEMENT_H\r
\r
/* NOTE PUBLIC API FUNCTIONS. */\r
-portBASE_TYPE xNetworkBuffersInitialise( void );\r
-xNetworkBufferDescriptor_t *pxNetworkBufferGet( size_t xRequestedSizeBytes, portTickType xBlockTimeTicks );\r
+BaseType_t xNetworkBuffersInitialise( void );\r
+xNetworkBufferDescriptor_t *pxNetworkBufferGet( size_t xRequestedSizeBytes, TickType_t xBlockTimeTicks );\r
xNetworkBufferDescriptor_t *pxNetworkBufferGetFromISR( size_t xRequestedSizeBytes );\r
void vNetworkBufferRelease( xNetworkBufferDescriptor_t * const pxNetworkBuffer );\r
-portBASE_TYPE vNetworkBufferReleaseFromISR( xNetworkBufferDescriptor_t * const pxNetworkBuffer );\r
+BaseType_t vNetworkBufferReleaseFromISR( xNetworkBufferDescriptor_t * const pxNetworkBuffer );\r
uint8_t *pucEthernetBufferGet( size_t *pxRequestedSizeBytes );\r
void vEthernetBufferRelease( uint8_t *pucEthernetBuffer );\r
\r
#define NETWORK_INTERFACE_H\r
\r
/* NOTE PUBLIC API FUNCTIONS. */\r
-portBASE_TYPE xNetworkInterfaceInitialise( void );\r
-portBASE_TYPE xNetworkInterfaceOutput( xNetworkBufferDescriptor_t * const pxNetworkBuffer );\r
+BaseType_t xNetworkInterfaceInitialise( void );\r
+BaseType_t xNetworkInterfaceOutput( xNetworkBufferDescriptor_t * const pxNetworkBuffer );\r
void vNetworkInterfaceAllocateRAMToBuffers( xNetworkBufferDescriptor_t pxNetworkBuffers[ ipconfigNUM_NETWORK_BUFFERS ] );\r
\r
#endif /* NETWORK_INTERFACE_H */\r
\r
/*-----------------------------------------------------------*/\r
\r
-portBASE_TYPE xNetworkBuffersInitialise( void )\r
+BaseType_t xNetworkBuffersInitialise( void )\r
{\r
-portBASE_TYPE xReturn, x;\r
+BaseType_t xReturn, x;\r
\r
/* Only initialise the buffers and their associated kernel objects if they\r
have not been initialised before. */\r
}\r
/*-----------------------------------------------------------*/\r
\r
-xNetworkBufferDescriptor_t *pxNetworkBufferGet( size_t xRequestedSizeBytes, portTickType xBlockTimeTicks )\r
+xNetworkBufferDescriptor_t *pxNetworkBufferGet( size_t xRequestedSizeBytes, TickType_t xBlockTimeTicks )\r
{\r
xNetworkBufferDescriptor_t *pxReturn = NULL;\r
\r
xNetworkBufferDescriptor_t *pxNetworkBufferGetFromISR( size_t xRequestedSizeBytes )\r
{\r
xNetworkBufferDescriptor_t *pxReturn = NULL;\r
-unsigned portBASE_TYPE uxSavedInterruptStatus;\r
+UBaseType_t uxSavedInterruptStatus;\r
\r
/*_RB_ The current implementation only has a single size memory block, so\r
the requested size parameter is not used (yet). */\r
}\r
/*-----------------------------------------------------------*/\r
\r
-portBASE_TYPE vNetworkBufferReleaseFromISR( xNetworkBufferDescriptor_t * const pxNetworkBuffer )\r
+BaseType_t vNetworkBufferReleaseFromISR( xNetworkBufferDescriptor_t * const pxNetworkBuffer )\r
{\r
-unsigned portBASE_TYPE uxSavedInterruptStatus;\r
-portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;\r
+UBaseType_t uxSavedInterruptStatus;\r
+BaseType_t xHigherPriorityTaskWoken = pdFALSE;\r
\r
/* Ensure the buffer is returned to the list of free buffers before the\r
counting semaphore is 'given' to say a buffer is available. */\r
\r
void vNetworkBufferRelease( xNetworkBufferDescriptor_t * const pxNetworkBuffer )\r
{\r
-portBASE_TYPE xListItemAlreadyInFreeList;\r
+BaseType_t xListItemAlreadyInFreeList;\r
\r
/* Ensure the buffer is returned to the list of free buffers before the\r
counting semaphore is 'given' to say a buffer is available. */\r
\r
#if( ipconfigINCLUDE_TEST_CODE == 1 )\r
\r
-unsigned portBASE_TYPE uxGetNumberOfFreeNetworkBuffers( void )\r
+UBaseType_t uxGetNumberOfFreeNetworkBuffers( void )\r
{\r
return listCURRENT_LIST_LENGTH( &xFreeBuffersList );\r
}\r
\r
/*-----------------------------------------------------------*/\r
\r
-portBASE_TYPE xNetworkBuffersInitialise( void )\r
+BaseType_t xNetworkBuffersInitialise( void )\r
{\r
-portBASE_TYPE xReturn, x;\r
+BaseType_t xReturn, x;\r
\r
/* Only initialise the buffers and their associated kernel objects if they\r
have not been initialised before. */\r
}\r
/*-----------------------------------------------------------*/\r
\r
-xNetworkBufferDescriptor_t *pxNetworkBufferGet( size_t xRequestedSizeBytes, portTickType xBlockTimeTicks )\r
+xNetworkBufferDescriptor_t *pxNetworkBufferGet( size_t xRequestedSizeBytes, TickType_t xBlockTimeTicks )\r
{\r
xNetworkBufferDescriptor_t *pxReturn = NULL;\r
\r
\r
void vNetworkBufferRelease( xNetworkBufferDescriptor_t * const pxNetworkBuffer )\r
{\r
-portBASE_TYPE xListItemAlreadyInFreeList;\r
+BaseType_t xListItemAlreadyInFreeList;\r
\r
/* Ensure the buffer is returned to the list of free buffers before the\r
counting semaphore is 'given' to say a buffer is available. Release the\r
\r
#if( ipconfigINCLUDE_TEST_CODE == 1 )\r
\r
-unsigned portBASE_TYPE uxGetNumberOfFreeNetworkBuffers( void )\r
+UBaseType_t uxGetNumberOfFreeNetworkBuffers( void )\r
{\r
return listCURRENT_LIST_LENGTH( &xFreeBuffersList );\r
}\r
task performing the transmit will block for niTX_BUFFER_FREE_WAIT\r
milliseconds. It will do this a maximum of niMAX_TX_ATTEMPTS before giving\r
up. */\r
-#define niTX_BUFFER_FREE_WAIT ( ( portTickType ) 2UL / portTICK_RATE_MS )\r
+#define niTX_BUFFER_FREE_WAIT ( ( TickType_t ) 2UL / portTICK_RATE_MS )\r
#define niMAX_TX_ATTEMPTS ( 5 )\r
\r
/* The length of the queue used to send interrupt status words from the\r
static xSemaphoreHandle xEMACRxEventSemaphore = NULL;\r
/*-----------------------------------------------------------*/\r
\r
-portBASE_TYPE xNetworkInterfaceInitialise( void )\r
+BaseType_t xNetworkInterfaceInitialise( void )\r
{\r
EMAC_CFG_Type Emac_Config;\r
PINSEL_CFG_Type xPinConfig;\r
-portBASE_TYPE xStatus, xReturn;\r
+BaseType_t xStatus, xReturn;\r
extern uint8_t ucMACAddress[ 6 ];\r
\r
/* Enable Ethernet Pins */\r
}\r
/*-----------------------------------------------------------*/\r
\r
-portBASE_TYPE xNetworkInterfaceOutput( xNetworkBufferDescriptor_t * const pxNetworkBuffer )\r
+BaseType_t xNetworkInterfaceOutput( xNetworkBufferDescriptor_t * const pxNetworkBuffer )\r
{\r
-portBASE_TYPE xReturn = pdFAIL;\r
+BaseType_t xReturn = pdFAIL;\r
int32_t x;\r
extern void EMAC_StartTransmitNextBuffer( uint32_t ulLength );\r
extern void EMAC_SetNextPacketToSend( uint8_t * pucBuffer );\r
stack. No storage is required as the network buffer\r
will point directly to the buffer that already holds\r
the received data. */\r
- pxNetworkBuffer = pxNetworkBufferGet( 0, ( portTickType ) 0 );\r
+ pxNetworkBuffer = pxNetworkBufferGet( 0, ( TickType_t ) 0 );\r
\r
if( pxNetworkBuffer != NULL )\r
{\r
\r
/* Data was received and stored. Send a message to the IP\r
task to let it know. */\r
- if( xQueueSendToBack( xNetworkEventQueue, &xRxEvent, ( portTickType ) 0 ) == pdFALSE )\r
+ if( xQueueSendToBack( xNetworkEventQueue, &xRxEvent, ( TickType_t ) 0 ) == pdFALSE )\r
{\r
vNetworkBufferRelease( pxNetworkBuffer );\r
iptraceETHERNET_RX_EVENT_LOST();\r
operation will be held in the Blocked state (so other tasks can execute) for\r
niTX_BUFFER_FREE_WAIT ticks. It will do this a maximum of niMAX_TX_ATTEMPTS\r
before giving up. */\r
-#define niTX_BUFFER_FREE_WAIT ( ( portTickType ) 2UL / portTICK_RATE_MS )\r
+#define niTX_BUFFER_FREE_WAIT ( ( TickType_t ) 2UL / portTICK_RATE_MS )\r
#define niMAX_TX_ATTEMPTS ( 5 )\r
\r
/*-----------------------------------------------------------*/\r
\r
/*-----------------------------------------------------------*/\r
\r
-portBASE_TYPE xNetworkInterfaceInitialise( void )\r
+BaseType_t xNetworkInterfaceInitialise( void )\r
{\r
EMAC_CFG_Type Emac_Config;\r
-portBASE_TYPE xReturn;\r
+BaseType_t xReturn;\r
extern uint8_t ucMACAddress[ 6 ];\r
\r
Emac_Config.pbEMAC_Addr = ucMACAddress;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-portBASE_TYPE xNetworkInterfaceOutput( xNetworkBufferDescriptor_t * const pxNetworkBuffer )\r
+BaseType_t xNetworkInterfaceOutput( xNetworkBufferDescriptor_t * const pxNetworkBuffer )\r
{\r
-portBASE_TYPE xReturn = pdFAIL;\r
+BaseType_t xReturn = pdFAIL;\r
int32_t x;\r
\r
/* Attempt to obtain access to a Tx descriptor. */\r
{\r
/* The buffer filled by the DMA is going to be passed into the IP\r
stack. Allocate another buffer for the DMA descriptor. */\r
- pxNetworkBuffer = pxNetworkBufferGet( ipTOTAL_ETHERNET_FRAME_SIZE, ( portTickType ) 0 );\r
+ pxNetworkBuffer = pxNetworkBufferGet( ipTOTAL_ETHERNET_FRAME_SIZE, ( TickType_t ) 0 );\r
\r
if( pxNetworkBuffer != NULL )\r
{\r
/* Data was received and stored. Send it to the IP task\r
for processing. */\r
xRxEvent.pvData = ( void * ) pxNetworkBuffer;\r
- if( xQueueSendToBack( xNetworkEventQueue, &xRxEvent, ( portTickType ) 0 ) == pdFALSE )\r
+ if( xQueueSendToBack( xNetworkEventQueue, &xRxEvent, ( TickType_t ) 0 ) == pdFALSE )\r
{\r
/* The buffer could not be sent to the IP task so the\r
buffer must be released. */\r
* all remain interrupts are disabled\r
* (Ref. from LPC17xx UM)\r
**********************************************************************/\r
-portBASE_TYPE EMAC_Init(EMAC_CFG_Type *EMAC_ConfigStruct)\r
+BaseType_t EMAC_Init(EMAC_CFG_Type *EMAC_ConfigStruct)\r
{\r
int32_t id1, id2, regv, phy = 0;\r
int32_t phy_linkstatus_reg, phy_linkstatus_mask;\r
uint32_t x;\r
const uint32_t ulMaxAttempts = 250UL;\r
-portBASE_TYPE xReturn = pdPASS;\r
+BaseType_t xReturn = pdPASS;\r
\r
/* Enable Ethernet Pins (NGX LPC1830 Xplorer. */\r
scu_pinmux(0x2 ,0 , (MD_EHS | MD_PLN | MD_EZI | MD_ZI), FUNC7);\r
\r
/*********************************************************************//**\r
**********************************************************************/\r
-portBASE_TYPE EMAC_CheckTransmitIndex( void )\r
+BaseType_t EMAC_CheckTransmitIndex( void )\r
{\r
-portBASE_TYPE xReturn;\r
+BaseType_t xReturn;\r
\r
if( ( Tx_Desc[ TxDescIndex ].Status & OWN_BIT ) == 0 )\r
{\r
* it means there're available data has been received. They should be read\r
* out and released the Receive Data Buffer by updating the RxConsumeIndex value.\r
**********************************************************************/\r
-portBASE_TYPE EMAC_CheckReceiveIndex(void)\r
+BaseType_t EMAC_CheckReceiveIndex(void)\r
{\r
-portBASE_TYPE xReturn;\r
+BaseType_t xReturn;\r
\r
if( ( Rx_Desc[ RxDescIndex ].Status & OWN_BIT ) == 0 )\r
{\r
\r
\r
/* Prototypes */\r
-portBASE_TYPE EMAC_Init(EMAC_CFG_Type *EMAC_ConfigStruct);\r
+BaseType_t EMAC_Init(EMAC_CFG_Type *EMAC_ConfigStruct);\r
int32_t EMAC_UpdatePHYStatus(void);\r
uint32_t EMAC_GetReceiveDataSize(void);\r
void EMAC_StartTransmitNextBuffer( uint32_t ulLength );\r
void EMAC_SetNextPacketToSend( uint8_t * pucBuffer );\r
void EMAC_NextPacketToRead( xNetworkBufferDescriptor_t *pxNetworkBuffer );\r
void EMAC_UpdateRxConsumeIndex(void);\r
-portBASE_TYPE EMAC_CheckReceiveIndex(void);\r
-portBASE_TYPE EMAC_CheckTransmitIndex(void);\r
+BaseType_t EMAC_CheckReceiveIndex(void);\r
+BaseType_t EMAC_CheckTransmitIndex(void);\r
\r
#ifdef __cplusplus\r
}\r
operation will be held in the Blocked state (so other tasks can execute) for\r
niTX_BUFFER_FREE_WAIT ticks. It will do this a maximum of niMAX_TX_ATTEMPTS\r
before giving up. */\r
-#define niTX_BUFFER_FREE_WAIT ( ( portTickType ) 2UL / portTICK_RATE_MS )\r
+#define niTX_BUFFER_FREE_WAIT ( ( TickType_t ) 2UL / portTICK_RATE_MS )\r
#define niMAX_TX_ATTEMPTS ( 5 )\r
\r
/*-----------------------------------------------------------*/\r
\r
/*-----------------------------------------------------------*/\r
\r
-portBASE_TYPE xNetworkInterfaceInitialise( void )\r
+BaseType_t xNetworkInterfaceInitialise( void )\r
{\r
-portBASE_TYPE xReturn;\r
+BaseType_t xReturn;\r
extern uint8_t ucMACAddress[ 6 ];\r
\r
xReturn = xEMACInit( ucMACAddress );\r
}\r
/*-----------------------------------------------------------*/\r
\r
-portBASE_TYPE xNetworkInterfaceOutput( xNetworkBufferDescriptor_t * const pxNetworkBuffer )\r
+BaseType_t xNetworkInterfaceOutput( xNetworkBufferDescriptor_t * const pxNetworkBuffer )\r
{\r
-portBASE_TYPE xReturn = pdFAIL;\r
+BaseType_t xReturn = pdFAIL;\r
int32_t x;\r
\r
/* Attempt to obtain access to a Tx descriptor. */\r
{\r
/* The buffer filled by the DMA is going to be passed into the IP\r
stack. Allocate another buffer for the DMA descriptor. */\r
- pxNetworkBuffer = pxNetworkBufferGet( ipTOTAL_ETHERNET_FRAME_SIZE, ( portTickType ) 0 );\r
+ pxNetworkBuffer = pxNetworkBufferGet( ipTOTAL_ETHERNET_FRAME_SIZE, ( TickType_t ) 0 );\r
\r
if( pxNetworkBuffer != NULL )\r
{\r
/* Data was received and stored. Send it to the IP task\r
for processing. */\r
xRxEvent.pvData = ( void * ) pxNetworkBuffer;\r
- if( xQueueSendToBack( xNetworkEventQueue, &xRxEvent, ( portTickType ) 0 ) == pdFALSE )\r
+ if( xQueueSendToBack( xNetworkEventQueue, &xRxEvent, ( TickType_t ) 0 ) == pdFALSE )\r
{\r
/* The buffer could not be sent to the IP task so the\r
buffer must be released. */\r
\r
/*-----------------------------------------------------------*/\r
\r
-portBASE_TYPE xEMACInit( uint8_t ucMACAddress[ 6 ] )\r
+BaseType_t xEMACInit( uint8_t ucMACAddress[ 6 ] )\r
{\r
-portBASE_TYPE xReturn;\r
+BaseType_t xReturn;\r
uint32_t ulPHYStatus;\r
\r
/* Configure the hardware. */\r
}\r
/*-----------------------------------------------------------*/\r
\r
-portBASE_TYPE xEMACIsTxDescriptorAvailable( void )\r
+BaseType_t xEMACIsTxDescriptorAvailable( void )\r
{\r
-portBASE_TYPE xReturn;\r
+BaseType_t xReturn;\r
\r
if( ( xTxDescriptors[ xTxDescriptorIndex ].CTRLSTAT & RDES_OWN ) == 0 )\r
{\r
}\r
/*-----------------------------------------------------------*/\r
\r
-portBASE_TYPE xEMACRxDataAvailable( void )\r
+BaseType_t xEMACRxDataAvailable( void )\r
{\r
-portBASE_TYPE xReturn;\r
+BaseType_t xReturn;\r
\r
if( ( xRXDescriptors[ xRxDescriptorIndex ].STATUS & RDES_OWN ) == 0 )\r
{\r
/*\r
* Initialise the MAC and PHY.\r
*/\r
-portBASE_TYPE xEMACInit( uint8_t ucMACAddress[ 6 ] );\r
+BaseType_t xEMACInit( uint8_t ucMACAddress[ 6 ] );\r
\r
/*\r
* Return pdTRUE if there is a FreeRTOS Tx descriptor. Return pdFALSE if all\r
* Tx descriptors are already in use.\r
*/\r
-portBASE_TYPE xEMACIsTxDescriptorAvailable( void );\r
+BaseType_t xEMACIsTxDescriptorAvailable( void );\r
\r
/*\r
* Assign a buffer to a Tx descriptor so it is ready to be transmitted, but\r
* Returns pdTRUE if the next Rx descriptor contains received data. Returns\r
* pdFLASE fi the next Rx descriptor is still under the control of the DMA.\r
*/\r
-portBASE_TYPE xEMACRxDataAvailable( void );\r
+BaseType_t xEMACRxDataAvailable( void );\r
void vEMACSwapEmptyBufferForRxedData( xNetworkBufferDescriptor_t *pxNetworkBuffer );\r
\r
#endif /* LPC18xx_43xx_EMAC_H */\r
operation will be held in the Blocked state (so other tasks can execute) for\r
niTX_BUFFER_FREE_WAIT ticks. It will do this a maximum of niMAX_TX_ATTEMPTS\r
before giving up. */\r
-#define niTX_BUFFER_FREE_WAIT ( ( portTickType ) 2UL / portTICK_RATE_MS )\r
+#define niTX_BUFFER_FREE_WAIT ( ( TickType_t ) 2UL / portTICK_RATE_MS )\r
#define niMAX_TX_ATTEMPTS ( 5 )\r
\r
/*-----------------------------------------------------------*/\r
\r
/*-----------------------------------------------------------*/\r
\r
-portBASE_TYPE xNetworkInterfaceInitialise( void )\r
+BaseType_t xNetworkInterfaceInitialise( void )\r
{\r
gmac_options_t xGMACOptions;\r
extern uint8_t ucMACAddress[ 6 ];\r
-const portTickType xPHYDelay_400ms = 400UL;\r
-portBASE_TYPE xReturn = pdFALSE;\r
+const TickType_t xPHYDelay_400ms = 400UL;\r
+BaseType_t xReturn = pdFALSE;\r
\r
/* Ensure PHY is ready. */\r
vTaskDelay( xPHYDelay_400ms / portTICK_RATE_MS );\r
\r
static void prvGMACRxCallback( uint32_t ulStatus )\r
{\r
-portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;\r
+BaseType_t xHigherPriorityTaskWoken = pdFALSE;\r
\r
/* Unblock the deferred interrupt handler task if the event was an Rx. */\r
if( ulStatus == GMAC_RSR_REC )\r
}\r
/*-----------------------------------------------------------*/\r
\r
-portBASE_TYPE xNetworkInterfaceOutput( xNetworkBufferDescriptor_t * const pxNetworkBuffer )\r
+BaseType_t xNetworkInterfaceOutput( xNetworkBufferDescriptor_t * const pxNetworkBuffer )\r
{\r
-portBASE_TYPE xReturn = pdFAIL;\r
+BaseType_t xReturn = pdFAIL;\r
int32_t x;\r
\r
/* Attempt to obtain access to a Tx descriptor. */\r
{\r
xNetworkBufferDescriptor_t *pxNetworkBuffer;\r
xIPStackEvent_t xRxEvent = { eEthernetRxEvent, NULL };\r
-static const portTickType xBufferWaitDelay = 1500UL / portTICK_RATE_MS;\r
+static const TickType_t xBufferWaitDelay = 1500UL / portTICK_RATE_MS;\r
uint32_t ulReturned;\r
\r
( void ) pvParameters;\r
/* Data was received and stored. Send it to the IP task\r
for processing. */\r
xRxEvent.pvData = ( void * ) pxNetworkBuffer;\r
- if( xQueueSendToBack( xNetworkEventQueue, &xRxEvent, ( portTickType ) 0 ) == pdFALSE )\r
+ if( xQueueSendToBack( xNetworkEventQueue, &xRxEvent, ( TickType_t ) 0 ) == pdFALSE )\r
{\r
/* The buffer could not be sent to the IP task so the\r
buffer must be released. */\r
task performing the transmit will block for niTX_BUFFER_FREE_WAIT\r
milliseconds. It will do this a maximum of niMAX_TX_ATTEMPTS before giving\r
up. */\r
-#define niTX_BUFFER_FREE_WAIT ( ( portTickType ) 2UL / portTICK_RATE_MS )\r
+#define niTX_BUFFER_FREE_WAIT ( ( TickType_t ) 2UL / portTICK_RATE_MS )\r
#define niMAX_TX_ATTEMPTS ( 5 )\r
\r
/* The length of the queue used to send interrupt status words from the\r
xSemaphoreHandle xEMACRxEventSemaphore = NULL;\r
/*-----------------------------------------------------------*/\r
\r
-portBASE_TYPE xNetworkInterfaceInitialise( void )\r
+BaseType_t xNetworkInterfaceInitialise( void )\r
{\r
-portBASE_TYPE xStatus, xReturn;\r
+BaseType_t xStatus, xReturn;\r
extern uint8_t ucMACAddress[ 6 ];\r
\r
/* Initialise the MAC. */\r
}\r
/*-----------------------------------------------------------*/\r
\r
-portBASE_TYPE xNetworkInterfaceOutput( xNetworkBufferDescriptor_t * const pxNetworkBuffer )\r
+BaseType_t xNetworkInterfaceOutput( xNetworkBufferDescriptor_t * const pxNetworkBuffer )\r
{\r
extern void vEMACCopyWrite( uint8_t * pucBuffer, uint16_t usLength );\r
\r
\r
/*-----------------------------------------------------------*/\r
\r
-portBASE_TYPE xNetworkInterfaceInitialise( void )\r
+BaseType_t xNetworkInterfaceInitialise( void )\r
{\r
-portBASE_TYPE xReturn = pdFALSE;\r
+BaseType_t xReturn = pdFALSE;\r
pcap_if_t *pxAllNetworkInterfaces;\r
\r
if( xPCAPMutex == NULL )\r
\r
#if updconfigLOOPBACK_ETHERNET_PACKETS == 1\r
\r
- portBASE_TYPE xNetworkInterfaceOutput( xNetworkBufferDescriptor_t * const pxNetworkBuffer )\r
+ BaseType_t xNetworkInterfaceOutput( xNetworkBufferDescriptor_t * const pxNetworkBuffer )\r
{\r
xEthernetHeader_t *pxEthernetHeader;\r
xIPStackEvent_t xRxEvent = { eEthernetRxEvent, NULL };\r
extern uint8_t xDefaultPartUDPPacketHeader[];\r
static const xMACAddress_t xBroadcastMACAddress = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };\r
- portBASE_TYPE xCanLoopback;\r
+ BaseType_t xCanLoopback;\r
\r
pxEthernetHeader = ( xEthernetHeader_t * ) pxNetworkBuffer->pucEthernetBuffer;\r
\r
is sending a message to itself, so a block time cannot be used for\r
fear of deadlocking. */\r
xRxEvent.pvData = ( void * ) pxNetworkBuffer;\r
- if( xQueueSendToBack( xNetworkEventQueue, &xRxEvent, ( portTickType ) 0 ) == pdFALSE )\r
+ if( xQueueSendToBack( xNetworkEventQueue, &xRxEvent, ( TickType_t ) 0 ) == pdFALSE )\r
{\r
vNetworkBufferRelease( pxNetworkBuffer );\r
iptraceETHERNET_RX_EVENT_LOST();\r
\r
#else /* updconfigLOOPBACK_ETHERNET_PACKETS == 1 */\r
\r
- portBASE_TYPE xNetworkInterfaceOutput( xNetworkBufferDescriptor_t * const pxNetworkBuffer )\r
+ BaseType_t xNetworkInterfaceOutput( xNetworkBufferDescriptor_t * const pxNetworkBuffer )\r
{\r
xSemaphoreTake( xPCAPMutex, portMAX_DELAY );\r
{\r
\r
/* Data was received and stored. Send a message to the IP\r
task to let it know. */\r
- if( xQueueSendToBack( xNetworkEventQueue, &xRxEvent, ( portTickType ) 0 ) == pdFALSE )\r
+ if( xQueueSendToBack( xNetworkEventQueue, &xRxEvent, ( TickType_t ) 0 ) == pdFALSE )\r
{\r
/* The buffer could not be sent to the stack so\r
must be released again. This is only an interrupt\r
#if configUSE_STATIC_BUFFERS == 1\r
void vNetworkInterfaceAllocateRAMToBuffers( xNetworkBufferDescriptor_t pxNetworkBuffers[ ipconfigNUM_NETWORK_BUFFERS ] )\r
{\r
- portBASE_TYPE x;\r
+ BaseType_t x;\r
\r
for( x = 0; x < ipconfigNUM_NETWORK_BUFFERS; x++ )\r
{\r