mirror of
https://github.com/FreeRTOS/FreeRTOS.git
synced 2025-06-20 15:20:40 +08:00
Update FreeRTOS+ components and demos to use typedef names introduced in FreeRTOS V8.
This commit is contained in:
@ -96,43 +96,43 @@ commands. */
|
||||
/*
|
||||
* Implements the run-time-stats command.
|
||||
*/
|
||||
static portBASE_TYPE prvTaskStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );
|
||||
static BaseType_t prvTaskStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );
|
||||
|
||||
/*
|
||||
* Implements the task-stats command.
|
||||
*/
|
||||
static portBASE_TYPE prvRunTimeStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );
|
||||
static BaseType_t prvRunTimeStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );
|
||||
|
||||
/*
|
||||
* Implements the echo-three-parameters command.
|
||||
*/
|
||||
static portBASE_TYPE prvThreeParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );
|
||||
static BaseType_t prvThreeParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );
|
||||
|
||||
/*
|
||||
* Implements the echo-parameters command.
|
||||
*/
|
||||
static portBASE_TYPE prvParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );
|
||||
static BaseType_t prvParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );
|
||||
|
||||
/*
|
||||
* Defines a command that prints out IP address information.
|
||||
*/
|
||||
static portBASE_TYPE prvDisplayIPConfig( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );
|
||||
static BaseType_t prvDisplayIPConfig( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );
|
||||
|
||||
/*
|
||||
* Defines a command that prints out the gathered demo debug stats.
|
||||
*/
|
||||
static portBASE_TYPE prvDisplayIPDebugStats( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );
|
||||
static BaseType_t prvDisplayIPDebugStats( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );
|
||||
|
||||
/*
|
||||
* Defines a command that sends an ICMP ping request to an IP address.
|
||||
*/
|
||||
static portBASE_TYPE prvPingCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );
|
||||
static BaseType_t prvPingCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );
|
||||
|
||||
/*
|
||||
* Implements the "trace start" and "trace stop" commands;
|
||||
*/
|
||||
#if configINCLUDE_TRACE_RELATED_CLI_COMMANDS == 1
|
||||
static portBASE_TYPE prvStartStopTraceCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );
|
||||
static BaseType_t prvStartStopTraceCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString );
|
||||
#endif
|
||||
|
||||
/* Structure that defines the "ip-config" command line command. */
|
||||
@ -248,7 +248,7 @@ void vRegisterCLICommands( void )
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static portBASE_TYPE prvTaskStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )
|
||||
static BaseType_t prvTaskStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )
|
||||
{
|
||||
const char *const pcHeader = "Task State Priority Stack #\r\n************************************************\r\n";
|
||||
|
||||
@ -269,7 +269,7 @@ const char *const pcHeader = "Task State Priority Stack #\r\n********
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static portBASE_TYPE prvRunTimeStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )
|
||||
static BaseType_t prvRunTimeStatsCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )
|
||||
{
|
||||
const char * const pcHeader = "Task Abs Time % Time\r\n****************************************\r\n";
|
||||
|
||||
@ -290,11 +290,11 @@ const char * const pcHeader = "Task Abs Time % Time\r\n*********
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static portBASE_TYPE prvThreeParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )
|
||||
static BaseType_t prvThreeParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )
|
||||
{
|
||||
const char *pcParameter;
|
||||
portBASE_TYPE xParameterStringLength, xReturn;
|
||||
static portBASE_TYPE lParameterNumber = 0;
|
||||
BaseType_t xParameterStringLength, xReturn;
|
||||
static BaseType_t lParameterNumber = 0;
|
||||
|
||||
/* Remove compile time warnings about unused parameters, and check the
|
||||
write buffer is not NULL. NOTE - for simplicity, this example assumes the
|
||||
@ -357,11 +357,11 @@ static portBASE_TYPE lParameterNumber = 0;
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
static portBASE_TYPE prvParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )
|
||||
static BaseType_t prvParameterEchoCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )
|
||||
{
|
||||
const char *pcParameter;
|
||||
portBASE_TYPE xParameterStringLength, xReturn;
|
||||
static portBASE_TYPE lParameterNumber = 0;
|
||||
BaseType_t xParameterStringLength, xReturn;
|
||||
static BaseType_t lParameterNumber = 0;
|
||||
|
||||
/* Remove compile time warnings about unused parameters, and check the
|
||||
write buffer is not NULL. NOTE - for simplicity, this example assumes the
|
||||
@ -426,10 +426,10 @@ static portBASE_TYPE lParameterNumber = 0;
|
||||
|
||||
#if ipconfigSUPPORT_OUTGOING_PINGS == 1
|
||||
|
||||
static portBASE_TYPE prvPingCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )
|
||||
static BaseType_t prvPingCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )
|
||||
{
|
||||
char * pcParameter;
|
||||
portBASE_TYPE lParameterStringLength, xReturn;
|
||||
BaseType_t lParameterStringLength, xReturn;
|
||||
uint32_t ulIPAddress, ulBytesToPing;
|
||||
const uint32_t ulDefaultBytesToPing = 8UL;
|
||||
char cBuffer[ 16 ];
|
||||
@ -517,11 +517,11 @@ static portBASE_TYPE lParameterNumber = 0;
|
||||
|
||||
#if configINCLUDE_DEMO_DEBUG_STATS != 0
|
||||
|
||||
static portBASE_TYPE prvDisplayIPDebugStats( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )
|
||||
static BaseType_t prvDisplayIPDebugStats( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )
|
||||
{
|
||||
static portBASE_TYPE xIndex = -1;
|
||||
static BaseType_t xIndex = -1;
|
||||
extern xExampleDebugStatEntry_t xIPTraceValues[];
|
||||
portBASE_TYPE xReturn;
|
||||
BaseType_t xReturn;
|
||||
|
||||
/* Remove compile time warnings about unused parameters, and check the
|
||||
write buffer is not NULL. NOTE - for simplicity, this example assumes the
|
||||
@ -553,10 +553,10 @@ static portBASE_TYPE lParameterNumber = 0;
|
||||
|
||||
#endif /* configINCLUDE_DEMO_DEBUG_STATS */
|
||||
|
||||
static portBASE_TYPE prvDisplayIPConfig( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )
|
||||
static BaseType_t prvDisplayIPConfig( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )
|
||||
{
|
||||
static portBASE_TYPE xIndex = 0;
|
||||
portBASE_TYPE xReturn;
|
||||
static BaseType_t xIndex = 0;
|
||||
BaseType_t xReturn;
|
||||
uint32_t ulAddress;
|
||||
|
||||
/* Remove compile time warnings about unused parameters, and check the
|
||||
@ -615,10 +615,10 @@ uint32_t ulAddress;
|
||||
|
||||
#if configINCLUDE_TRACE_RELATED_CLI_COMMANDS == 1
|
||||
|
||||
static portBASE_TYPE prvStartStopTraceCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )
|
||||
static BaseType_t prvStartStopTraceCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString )
|
||||
{
|
||||
const char *pcParameter;
|
||||
portBASE_TYPE lParameterStringLength;
|
||||
BaseType_t lParameterStringLength;
|
||||
|
||||
/* Remove compile time warnings about unused parameters, and check the
|
||||
write buffer is not NULL. NOTE - for simplicity, this example assumes the
|
||||
|
@ -66,6 +66,6 @@
|
||||
#ifndef UDP_COMMAND_INTERPRETER_H
|
||||
#define UDP_COMMAND_INTERPRETER_H
|
||||
|
||||
void vStartUDPCommandInterpreterTask( uint16_t usStackSize, uint32_t ulPort, unsigned portBASE_TYPE uxPriority );
|
||||
void vStartUDPCommandInterpreterTask( uint16_t usStackSize, uint32_t ulPort, UBaseType_t uxPriority );
|
||||
|
||||
#endif /* UDP_COMMAND_INTERPRETER_H */
|
||||
|
@ -102,7 +102,7 @@ static xSocket_t prvOpenUDPServerSocket( uint16_t usPort );
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vStartUDPCommandInterpreterTask( uint16_t usStackSize, uint32_t ulPort, unsigned portBASE_TYPE uxPriority )
|
||||
void vStartUDPCommandInterpreterTask( uint16_t usStackSize, uint32_t ulPort, UBaseType_t uxPriority )
|
||||
{
|
||||
xTaskCreate( vUDPCommandInterpreterTask, "CLI", usStackSize, ( void * ) ulPort, uxPriority, NULL );
|
||||
}
|
||||
@ -118,7 +118,7 @@ void vUDPCommandInterpreterTask( void *pvParameters )
|
||||
long lBytes, lByte;
|
||||
signed char cInChar, cInputIndex = 0;
|
||||
static char cInputString[ cmdMAX_INPUT_SIZE ], cOutputString[ cmdMAX_OUTPUT_SIZE ], cLocalBuffer[ cmdSOCKET_INPUT_BUFFER_SIZE ];
|
||||
portBASE_TYPE xMoreDataToFollow;
|
||||
BaseType_t xMoreDataToFollow;
|
||||
struct freertos_sockaddr xClient;
|
||||
socklen_t xClientAddressLength = 0; /* This is required as a parameter to maintain the sendto() Berkeley sockets API - but it is not actually used so can take any value. */
|
||||
xSocket_t xSocket;
|
||||
|
@ -87,13 +87,13 @@
|
||||
#include "FreeRTOS_Sockets.h"
|
||||
|
||||
/* Small delay used between attempts to obtain a zero copy buffer. */
|
||||
#define echoTINY_DELAY ( ( portTickType ) 2 )
|
||||
#define echoTINY_DELAY ( ( TickType_t ) 2 )
|
||||
|
||||
/* The echo tasks create a socket, send out a number of echo requests
|
||||
(listening for each echo reply), then close the socket again before
|
||||
starting over. This delay is used between each iteration to ensure the
|
||||
network does not get too congested. */
|
||||
#define echoLOOP_DELAY ( ( portTickType ) 250 / portTICK_RATE_MS )
|
||||
#define echoLOOP_DELAY ( ( TickType_t ) 250 / portTICK_RATE_MS )
|
||||
|
||||
#if ipconfigINCLUDE_EXAMPLE_FREERTOS_PLUS_TRACE_CALLS == 1
|
||||
/* When the trace recorder code is included user events are generated to
|
||||
@ -125,14 +125,14 @@ static void prvZeroCopyEchoClientTask( void *pvParameters );
|
||||
/* The receive timeout is set shorter when the windows simulator is used
|
||||
because simulated time is slower than real time. */
|
||||
#ifdef _WINDOWS_
|
||||
const portTickType xReceiveTimeOut = 50 / portTICK_RATE_MS;
|
||||
const TickType_t xReceiveTimeOut = 50 / portTICK_RATE_MS;
|
||||
#else
|
||||
const portTickType xReceiveTimeOut = 500 / portTICK_RATE_MS;
|
||||
const TickType_t xReceiveTimeOut = 500 / portTICK_RATE_MS;
|
||||
#endif
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vStartEchoClientTasks( uint16_t usTaskStackSize, unsigned portBASE_TYPE uxTaskPriority )
|
||||
void vStartEchoClientTasks( uint16_t usTaskStackSize, UBaseType_t uxTaskPriority )
|
||||
{
|
||||
/* Create the echo client task that does not use the zero copy interface. */
|
||||
xTaskCreate( prvEchoClientTask, /* The function that implements the task. */
|
||||
|
@ -71,6 +71,6 @@
|
||||
* to send to and receive from an echo server. The other task uses the zero
|
||||
* copy interface to send to and receive from an echo server.
|
||||
*/
|
||||
void vStartEchoClientTasks( uint16_t usTaskStackSize, unsigned portBASE_TYPE uxTaskPriority );
|
||||
void vStartEchoClientTasks( uint16_t usTaskStackSize, UBaseType_t uxTaskPriority );
|
||||
|
||||
#endif /* TWO_ECHO_CLIENTS_H */
|
||||
|
@ -128,17 +128,17 @@ xExampleDebugStatEntry_t xIPTraceValues[] =
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
portBASE_TYPE xExampleDebugStatEntries( void )
|
||||
BaseType_t xExampleDebugStatEntries( void )
|
||||
{
|
||||
/* Return the number of entries in the xIPTraceValues[] table. */
|
||||
return ( portBASE_TYPE ) ( sizeof( xIPTraceValues ) / sizeof( xExampleDebugStatEntry_t ) );
|
||||
return ( BaseType_t ) ( sizeof( xIPTraceValues ) / sizeof( xExampleDebugStatEntry_t ) );
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
void vExampleDebugStatUpdate( uint8_t ucIdentifier, uint32_t ulValue )
|
||||
{
|
||||
portBASE_TYPE xIndex;
|
||||
const portBASE_TYPE xEntries = sizeof( xIPTraceValues ) / sizeof( xExampleDebugStatEntry_t );
|
||||
BaseType_t xIndex;
|
||||
const BaseType_t xEntries = sizeof( xIPTraceValues ) / sizeof( xExampleDebugStatEntry_t );
|
||||
|
||||
/* Update an entry in the xIPTraceValues[] table. Each row in the table
|
||||
includes a pointer to a function that performs the actual update. This
|
||||
|
@ -150,7 +150,7 @@ configINCLUDE_DEMO_DEBUG_STATS setting in FreeRTOSIPConfig.h. */
|
||||
/*
|
||||
* Returns the number of entries in the xIPTraceValues table.
|
||||
*/
|
||||
portBASE_TYPE xExampleDebugStatEntries( void );
|
||||
BaseType_t xExampleDebugStatEntries( void );
|
||||
|
||||
#endif /* configINCLUDE_DEMO_DEBUG_STATS == 1 */
|
||||
|
||||
|
Reference in New Issue
Block a user