--- /dev/null
+/*\r
+ FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd.\r
+ All rights reserved\r
+\r
+ VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
+\r
+ ***************************************************************************\r
+ * *\r
+ * FreeRTOS provides completely free yet professionally developed, *\r
+ * robust, strictly quality controlled, supported, and cross *\r
+ * platform software that has become a de facto standard. *\r
+ * *\r
+ * Help yourself get started quickly and support the FreeRTOS *\r
+ * project by purchasing a FreeRTOS tutorial book, reference *\r
+ * manual, or both from: http://www.FreeRTOS.org/Documentation *\r
+ * *\r
+ * Thank you! *\r
+ * *\r
+ ***************************************************************************\r
+\r
+ This file is part of the FreeRTOS distribution.\r
+\r
+ FreeRTOS is free software; you can redistribute it and/or modify it under\r
+ the terms of the GNU General Public License (version 2) as published by the\r
+ Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.\r
+\r
+ >>! NOTE: The modification to the GPL is included to allow you to distribute\r
+ >>! a combined work that includes FreeRTOS without being obliged to provide\r
+ >>! the source code for proprietary components outside of the FreeRTOS\r
+ >>! kernel.\r
+\r
+ FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY\r
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\r
+ FOR A PARTICULAR PURPOSE. Full license text is available from the following\r
+ link: http://www.freertos.org/a00114.html\r
+\r
+ 1 tab == 4 spaces!\r
+\r
+ ***************************************************************************\r
+ * *\r
+ * Having a problem? Start by reading the FAQ "My application does *\r
+ * not run, what could be wrong?" *\r
+ * *\r
+ * http://www.FreeRTOS.org/FAQHelp.html *\r
+ * *\r
+ ***************************************************************************\r
+\r
+ http://www.FreeRTOS.org - Documentation, books, training, latest versions,\r
+ license and Real Time Engineers Ltd. contact details.\r
+\r
+ http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,\r
+ including FreeRTOS+Trace - an indispensable productivity tool, a DOS\r
+ compatible FAT file system, and our tiny thread aware UDP/IP stack.\r
+\r
+ http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High\r
+ Integrity Systems to sell under the OpenRTOS brand. Low cost OpenRTOS\r
+ licenses offer ticketed support, indemnification and middleware.\r
+\r
+ http://www.SafeRTOS.com - High Integrity Systems also provide a safety\r
+ engineered and independently SIL3 certified version for use in safety and\r
+ mission critical applications that require provable dependability.\r
+\r
+ 1 tab == 4 spaces!\r
+*/\r
+\r
+\r
+/* FreeRTOS includes. */\r
+#include "FreeRTOS.h"\r
+#include "task.h"\r
+\r
+/* Standard includes. */\r
+#include <stdint.h>\r
+#include <stdio.h>\r
+#include <stdlib.h>\r
+#include <string.h>\r
+\r
+/* FreeRTOS+CLI includes. */\r
+#include "FreeRTOS_CLI.h"\r
+\r
+/* File system includes. */\r
+#include "fat_sl.h"\r
+#include "api_mdriver_ram.h"\r
+\r
+#ifdef _WINDOWS_\r
+ #define snprintf _snprintf\r
+#endif\r
+\r
+#define cliNEW_LINE "\r\n"\r
+\r
+/*******************************************************************************\r
+ * See the URL in the comments within main.c for the location of the online\r
+ * documentation.\r
+ ******************************************************************************/\r
+\r
+/*\r
+ * Print out information on a single file.\r
+ */\r
+static void prvCreateFileInfoString( int8_t *pcBuffer, F_FIND *pxFindStruct );\r
+\r
+/*\r
+ * Copies an existing file into a newly created file.\r
+ */\r
+static portBASE_TYPE prvPerformCopy( int8_t *pcSourceFile,\r
+ int32_t lSourceFileLength,\r
+ int8_t *pcDestinationFile,\r
+ int8_t *pxWriteBuffer,\r
+ size_t xWriteBufferLen );\r
+\r
+/*\r
+ * Implements the DIR command.\r
+ */\r
+static portBASE_TYPE prvDIRCommand( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString );\r
+\r
+/*\r
+ * Implements the CD command.\r
+ */\r
+static portBASE_TYPE prvCDCommand( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString );\r
+\r
+/*\r
+ * Implements the DEL command.\r
+ */\r
+static portBASE_TYPE prvDELCommand( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString );\r
+\r
+/*\r
+ * Implements the TYPE command.\r
+ */\r
+static portBASE_TYPE prvTYPECommand( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString );\r
+\r
+/*\r
+ * Implements the COPY command.\r
+ */\r
+static portBASE_TYPE prvCOPYCommand( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString );\r
+\r
+/* Structure that defines the DIR command line command, which lists all the\r
+files in the current directory. */\r
+static const CLI_Command_Definition_t xDIR =\r
+{\r
+ ( const int8_t * const ) "dir", /* The command string to type. */\r
+ ( const int8_t * const ) "\r\ndir:\r\n Lists the files in the current directory\r\n",\r
+ prvDIRCommand, /* The function to run. */\r
+ 0 /* No parameters are expected. */\r
+};\r
+\r
+/* Structure that defines the CD command line command, which changes the\r
+working directory. */\r
+static const CLI_Command_Definition_t xCD =\r
+{\r
+ ( const int8_t * const ) "cd", /* The command string to type. */\r
+ ( const int8_t * const ) "\r\ncd <dir name>:\r\n Changes the working directory\r\n",\r
+ prvCDCommand, /* The function to run. */\r
+ 1 /* One parameter is expected. */\r
+};\r
+\r
+/* Structure that defines the TYPE command line command, which prints the\r
+contents of a file to the console. */\r
+static const CLI_Command_Definition_t xTYPE =\r
+{\r
+ ( const int8_t * const ) "type", /* The command string to type. */\r
+ ( const int8_t * const ) "\r\ntype <filename>:\r\n Prints file contents to the terminal\r\n",\r
+ prvTYPECommand, /* The function to run. */\r
+ 1 /* One parameter is expected. */\r
+};\r
+\r
+/* Structure that defines the DEL command line command, which deletes a file. */\r
+static const CLI_Command_Definition_t xDEL =\r
+{\r
+ ( const int8_t * const ) "del", /* The command string to type. */\r
+ ( const int8_t * const ) "\r\ndel <filename>:\r\n deletes a file or directory\r\n",\r
+ prvDELCommand, /* The function to run. */\r
+ 1 /* One parameter is expected. */\r
+};\r
+\r
+/* Structure that defines the COPY command line command, which deletes a file. */\r
+static const CLI_Command_Definition_t xCOPY =\r
+{\r
+ ( const int8_t * const ) "copy", /* The command string to type. */\r
+ ( const int8_t * const ) "\r\ncopy <source file> <dest file>:\r\n Copies <source file> to <dest file>\r\n",\r
+ prvCOPYCommand, /* The function to run. */\r
+ 2 /* Two parameters are expected. */\r
+};\r
+\r
+\r
+/*-----------------------------------------------------------*/\r
+\r
+void vRegisterFileSystemCLICommands( void )\r
+{\r
+ /* Register all the command line commands defined immediately above. */\r
+ FreeRTOS_CLIRegisterCommand( &xDIR );\r
+ FreeRTOS_CLIRegisterCommand( &xCD );\r
+ FreeRTOS_CLIRegisterCommand( &xTYPE );\r
+ FreeRTOS_CLIRegisterCommand( &xDEL );\r
+ FreeRTOS_CLIRegisterCommand( &xCOPY );\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+static portBASE_TYPE prvTYPECommand( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString )\r
+{\r
+int8_t *pcParameter;\r
+portBASE_TYPE xParameterStringLength, xReturn = pdTRUE;\r
+static F_FILE *pxFile = NULL;\r
+int iChar;\r
+size_t xByte;\r
+size_t xColumns = 50U;\r
+\r
+ /* Ensure there is always a null terminator after each character written. */\r
+ memset( pcWriteBuffer, 0x00, xWriteBufferLen );\r
+\r
+ /* Ensure the buffer leaves space for the \r\n. */\r
+ configASSERT( xWriteBufferLen > ( strlen( cliNEW_LINE ) * 2 ) );\r
+ xWriteBufferLen -= strlen( cliNEW_LINE );\r
+\r
+ if( xWriteBufferLen < xColumns )\r
+ {\r
+ /* Ensure the loop that uses xColumns as an end condition does not\r
+ write off the end of the buffer. */\r
+ xColumns = xWriteBufferLen;\r
+ }\r
+\r
+ if( pxFile == NULL )\r
+ {\r
+ /* The file has not been opened yet. Find the file name. */\r
+ pcParameter = ( int8_t * ) FreeRTOS_CLIGetParameter\r
+ (\r
+ pcCommandString, /* The command string itself. */\r
+ 1, /* Return the first parameter. */\r
+ &xParameterStringLength /* Store the parameter string length. */\r
+ );\r
+\r
+ /* Sanity check something was returned. */\r
+ configASSERT( pcParameter );\r
+\r
+ /* Attempt to open the requested file. */\r
+ pxFile = f_open( ( const char * ) pcParameter, "r" );\r
+ }\r
+\r
+ if( pxFile != NULL )\r
+ {\r
+ /* Read the next chunk of data from the file. */\r
+ for( xByte = 0; xByte < xColumns; xByte++ )\r
+ {\r
+ iChar = f_getc( pxFile );\r
+\r
+ if( iChar == -1 )\r
+ {\r
+ /* No more characters to return. */\r
+ f_close( pxFile );\r
+ pxFile = NULL;\r
+ break;\r
+ }\r
+ else\r
+ {\r
+ pcWriteBuffer[ xByte ] = ( int8_t ) iChar;\r
+ }\r
+ }\r
+ }\r
+\r
+ if( pxFile == NULL )\r
+ {\r
+ /* Either the file was not opened, or all the data from the file has\r
+ been returned and the file is now closed. */\r
+ xReturn = pdFALSE;\r
+ }\r
+\r
+ strcat( ( char * ) pcWriteBuffer, cliNEW_LINE );\r
+\r
+ return xReturn;\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+static portBASE_TYPE prvCDCommand( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString )\r
+{\r
+int8_t *pcParameter;\r
+portBASE_TYPE xParameterStringLength;\r
+unsigned char ucReturned;\r
+size_t xStringLength;\r
+\r
+ /* Obtain the parameter string. */\r
+ pcParameter = ( int8_t * ) FreeRTOS_CLIGetParameter\r
+ (\r
+ pcCommandString, /* The command string itself. */\r
+ 1, /* Return the first parameter. */\r
+ &xParameterStringLength /* Store the parameter string length. */\r
+ );\r
+\r
+ /* Sanity check something was returned. */\r
+ configASSERT( pcParameter );\r
+\r
+ /* Attempt to move to the requested directory. */\r
+ ucReturned = f_chdir( ( char * ) pcParameter );\r
+\r
+ if( ucReturned == F_NO_ERROR )\r
+ {\r
+ sprintf( ( char * ) pcWriteBuffer, "In: " );\r
+ xStringLength = strlen( ( const char * ) pcWriteBuffer );\r
+ f_getcwd( ( char * ) &( pcWriteBuffer[ xStringLength ] ), ( unsigned char ) ( xWriteBufferLen - xStringLength ) );\r
+ }\r
+ else\r
+ {\r
+ sprintf( ( char * ) pcWriteBuffer, "Error" );\r
+ }\r
+\r
+ strcat( ( char * ) pcWriteBuffer, cliNEW_LINE );\r
+\r
+ return pdFALSE;\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+static portBASE_TYPE prvDIRCommand( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString )\r
+{\r
+static F_FIND *pxFindStruct = NULL;\r
+unsigned char ucReturned;\r
+portBASE_TYPE xReturn = pdFALSE;\r
+\r
+ /* This assumes pcWriteBuffer is long enough. */\r
+ ( void ) pcCommandString;\r
+\r
+ /* Ensure the buffer leaves space for the \r\n. */\r
+ configASSERT( xWriteBufferLen > ( strlen( cliNEW_LINE ) * 2 ) );\r
+ xWriteBufferLen -= strlen( cliNEW_LINE );\r
+\r
+ if( pxFindStruct == NULL )\r
+ {\r
+ /* This is the first time this function has been executed since the Dir\r
+ command was run. Create the find structure. */\r
+ pxFindStruct = ( F_FIND * ) pvPortMalloc( sizeof( F_FIND ) );\r
+\r
+ if( pxFindStruct != NULL )\r
+ {\r
+ ucReturned = f_findfirst( "*.*", pxFindStruct );\r
+\r
+ if( ucReturned == F_NO_ERROR )\r
+ {\r
+ prvCreateFileInfoString( pcWriteBuffer, pxFindStruct );\r
+ xReturn = pdPASS;\r
+ }\r
+ else\r
+ {\r
+ snprintf( ( char * ) pcWriteBuffer, xWriteBufferLen, "Error: f_findfirst() failed." );\r
+ }\r
+ }\r
+ else\r
+ {\r
+ snprintf( ( char * ) pcWriteBuffer, xWriteBufferLen, "Failed to allocate RAM (using heap_4.c will prevent fragmentation)." );\r
+ }\r
+ }\r
+ else\r
+ {\r
+ /* The find struct has already been created. Find the next file in\r
+ the directory. */\r
+ ucReturned = f_findnext( pxFindStruct );\r
+\r
+ if( ucReturned == F_NO_ERROR )\r
+ {\r
+ prvCreateFileInfoString( pcWriteBuffer, pxFindStruct );\r
+ xReturn = pdPASS;\r
+ }\r
+ else\r
+ {\r
+ /* There are no more files. Free the find structure. */\r
+ vPortFree( pxFindStruct );\r
+ pxFindStruct = NULL;\r
+\r
+ /* No string to return. */\r
+ pcWriteBuffer[ 0 ] = 0x00;\r
+ }\r
+ }\r
+\r
+ strcat( ( char * ) pcWriteBuffer, cliNEW_LINE );\r
+\r
+ return xReturn;\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+static portBASE_TYPE prvDELCommand( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString )\r
+{\r
+int8_t *pcParameter;\r
+portBASE_TYPE xParameterStringLength;\r
+unsigned char ucReturned;\r
+\r
+ /* This function assumes xWriteBufferLen is large enough! */\r
+ ( void ) xWriteBufferLen;\r
+\r
+ /* Obtain the parameter string. */\r
+ pcParameter = ( int8_t * ) FreeRTOS_CLIGetParameter\r
+ (\r
+ pcCommandString, /* The command string itself. */\r
+ 1, /* Return the first parameter. */\r
+ &xParameterStringLength /* Store the parameter string length. */\r
+ );\r
+\r
+ /* Sanity check something was returned. */\r
+ configASSERT( pcParameter );\r
+\r
+ /* Attempt to delete the file. */\r
+ ucReturned = f_delete( ( const char * ) pcParameter );\r
+\r
+ if( ucReturned == F_NO_ERROR )\r
+ {\r
+ sprintf( ( char * ) pcWriteBuffer, "%s was deleted", pcParameter );\r
+ }\r
+ else\r
+ {\r
+ sprintf( ( char * ) pcWriteBuffer, "Error" );\r
+ }\r
+\r
+ strcat( ( char * ) pcWriteBuffer, cliNEW_LINE );\r
+\r
+ return pdFALSE;\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+static portBASE_TYPE prvCOPYCommand( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString )\r
+{\r
+int8_t *pcSourceFile, *pcDestinationFile;\r
+portBASE_TYPE xParameterStringLength;\r
+long lSourceLength, lDestinationLength = 0;\r
+\r
+ /* Obtain the name of the destination file. */\r
+ pcDestinationFile = ( int8_t * ) FreeRTOS_CLIGetParameter\r
+ (\r
+ pcCommandString, /* The command string itself. */\r
+ 2, /* Return the second parameter. */\r
+ &xParameterStringLength /* Store the parameter string length. */\r
+ );\r
+\r
+ /* Sanity check something was returned. */\r
+ configASSERT( pcDestinationFile );\r
+\r
+ /* Obtain the name of the source file. */\r
+ pcSourceFile = ( int8_t * ) FreeRTOS_CLIGetParameter\r
+ (\r
+ pcCommandString, /* The command string itself. */\r
+ 1, /* Return the first parameter. */\r
+ &xParameterStringLength /* Store the parameter string length. */\r
+ );\r
+\r
+ /* Sanity check something was returned. */\r
+ configASSERT( pcSourceFile );\r
+\r
+ /* Terminate the string. */\r
+ pcSourceFile[ xParameterStringLength ] = 0x00;\r
+\r
+ /* See if the source file exists, obtain its length if it does. */\r
+ lSourceLength = f_filelength( ( const char * ) pcSourceFile );\r
+\r
+ if( lSourceLength == 0 )\r
+ {\r
+ sprintf( ( char * ) pcWriteBuffer, "Source file does not exist" );\r
+ }\r
+ else\r
+ {\r
+ /* See if the destination file exists. */\r
+ lDestinationLength = f_filelength( ( const char * ) pcDestinationFile );\r
+\r
+ if( lDestinationLength != 0 )\r
+ {\r
+ sprintf( ( char * ) pcWriteBuffer, "Error: Destination file already exists" );\r
+ }\r
+ }\r
+\r
+ /* Continue only if the source file exists and the destination file does\r
+ not exist. */\r
+ if( ( lSourceLength != 0 ) && ( lDestinationLength == 0 ) )\r
+ {\r
+ if( prvPerformCopy( pcSourceFile, lSourceLength, pcDestinationFile, pcWriteBuffer, xWriteBufferLen ) == pdPASS )\r
+ {\r
+ sprintf( ( char * ) pcWriteBuffer, "Copy made" );\r
+ }\r
+ else\r
+ {\r
+ sprintf( ( char * ) pcWriteBuffer, "Error during copy" );\r
+ }\r
+ }\r
+\r
+ strcat( ( char * ) pcWriteBuffer, cliNEW_LINE );\r
+\r
+ return pdFALSE;\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+static portBASE_TYPE prvPerformCopy( int8_t *pcSourceFile,\r
+ int32_t lSourceFileLength,\r
+ int8_t *pcDestinationFile,\r
+ int8_t *pxWriteBuffer,\r
+ size_t xWriteBufferLen )\r
+{\r
+int32_t lBytesRead = 0, lBytesToRead, lBytesRemaining;\r
+F_FILE *pxFile;\r
+portBASE_TYPE xReturn = pdPASS;\r
+\r
+ /* NOTE: Error handling has been omitted for clarity. */\r
+\r
+ while( lBytesRead < lSourceFileLength )\r
+ {\r
+ /* How many bytes are left? */\r
+ lBytesRemaining = lSourceFileLength - lBytesRead;\r
+\r
+ /* How many bytes should be read this time around the loop. Can't\r
+ read more bytes than will fit into the buffer. */\r
+ if( lBytesRemaining > ( long ) xWriteBufferLen )\r
+ {\r
+ lBytesToRead = ( long ) xWriteBufferLen;\r
+ }\r
+ else\r
+ {\r
+ lBytesToRead = lBytesRemaining;\r
+ }\r
+\r
+ /* Open the source file, seek past the data that has already been\r
+ read from the file, read the next block of data, then close the\r
+ file again so the destination file can be opened. */\r
+ pxFile = f_open( ( const char * ) pcSourceFile, "r" );\r
+ if( pxFile != NULL )\r
+ {\r
+ f_seek( pxFile, lBytesRead, F_SEEK_SET );\r
+ f_read( pxWriteBuffer, lBytesToRead, 1, pxFile );\r
+ f_close( pxFile );\r
+ }\r
+ else\r
+ {\r
+ xReturn = pdFAIL;\r
+ break;\r
+ }\r
+\r
+ /* Open the destination file and write the block of data to the end of\r
+ the file. */\r
+ pxFile = f_open( ( const char * ) pcDestinationFile, "a" );\r
+ if( pxFile != NULL )\r
+ {\r
+ f_write( pxWriteBuffer, lBytesToRead, 1, pxFile );\r
+ f_close( pxFile );\r
+ }\r
+ else\r
+ {\r
+ xReturn = pdFAIL;\r
+ break;\r
+ }\r
+\r
+ lBytesRead += lBytesToRead;\r
+ }\r
+\r
+ return xReturn;\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+static void prvCreateFileInfoString( int8_t *pcBuffer, F_FIND *pxFindStruct )\r
+{\r
+const char *pcWritableFile = "writable file", *pcReadOnlyFile = "read only file", *pcDirectory = "directory";\r
+const char * pcAttrib;\r
+\r
+ /* Point pcAttrib to a string that describes the file. */\r
+ if( ( pxFindStruct->attr & F_ATTR_DIR ) != 0 )\r
+ {\r
+ pcAttrib = pcDirectory;\r
+ }\r
+ else if( pxFindStruct->attr & F_ATTR_READONLY )\r
+ {\r
+ pcAttrib = pcReadOnlyFile;\r
+ }\r
+ else\r
+ {\r
+ pcAttrib = pcWritableFile;\r
+ }\r
+\r
+ /* Create a string that includes the file name, the file size and the\r
+ attributes string. */\r
+ sprintf( ( char * ) pcBuffer, "%s [%s] [size=%d]", pxFindStruct->filename, pcAttrib, ( int ) pxFindStruct->filesize );\r
+}\r
--- /dev/null
+/*\r
+ FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd.\r
+ All rights reserved\r
+\r
+ VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
+\r
+ ***************************************************************************\r
+ * *\r
+ * FreeRTOS provides completely free yet professionally developed, *\r
+ * robust, strictly quality controlled, supported, and cross *\r
+ * platform software that has become a de facto standard. *\r
+ * *\r
+ * Help yourself get started quickly and support the FreeRTOS *\r
+ * project by purchasing a FreeRTOS tutorial book, reference *\r
+ * manual, or both from: http://www.FreeRTOS.org/Documentation *\r
+ * *\r
+ * Thank you! *\r
+ * *\r
+ ***************************************************************************\r
+\r
+ This file is part of the FreeRTOS distribution.\r
+\r
+ FreeRTOS is free software; you can redistribute it and/or modify it under\r
+ the terms of the GNU General Public License (version 2) as published by the\r
+ Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.\r
+\r
+ >>! NOTE: The modification to the GPL is included to allow you to distribute\r
+ >>! a combined work that includes FreeRTOS without being obliged to provide\r
+ >>! the source code for proprietary components outside of the FreeRTOS\r
+ >>! kernel.\r
+\r
+ FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY\r
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\r
+ FOR A PARTICULAR PURPOSE. Full license text is available from the following\r
+ link: http://www.freertos.org/a00114.html\r
+\r
+ 1 tab == 4 spaces!\r
+\r
+ ***************************************************************************\r
+ * *\r
+ * Having a problem? Start by reading the FAQ "My application does *\r
+ * not run, what could be wrong?" *\r
+ * *\r
+ * http://www.FreeRTOS.org/FAQHelp.html *\r
+ * *\r
+ ***************************************************************************\r
+\r
+ http://www.FreeRTOS.org - Documentation, books, training, latest versions,\r
+ license and Real Time Engineers Ltd. contact details.\r
+\r
+ http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,\r
+ including FreeRTOS+Trace - an indispensable productivity tool, a DOS\r
+ compatible FAT file system, and our tiny thread aware UDP/IP stack.\r
+\r
+ http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High\r
+ Integrity Systems to sell under the OpenRTOS brand. Low cost OpenRTOS\r
+ licenses offer ticketed support, indemnification and middleware.\r
+\r
+ http://www.SafeRTOS.com - High Integrity Systems also provide a safety\r
+ engineered and independently SIL3 certified version for use in safety and\r
+ mission critical applications that require provable dependability.\r
+\r
+ 1 tab == 4 spaces!\r
+*/\r
+\r
+\r
+ /******************************************************************************\r
+ *\r
+ * See the following URL for information on the commands defined in this file:\r
+ * http://www.FreeRTOS.org/FreeRTOS-Plus/FreeRTOS_Plus_UDP/Embedded_Ethernet_Examples/Ethernet_Related_CLI_Commands.shtml\r
+ *\r
+ ******************************************************************************/\r
+\r
+\r
+/* FreeRTOS includes. */\r
+#include "FreeRTOS.h"\r
+#include "task.h"\r
+\r
+/* Standard includes. */\r
+#include <stdint.h>\r
+#include <stdio.h>\r
+#include <stdlib.h>\r
+#include <string.h>\r
+\r
+/* FreeRTOS+CLI includes. */\r
+#include "FreeRTOS_CLI.h"\r
+\r
+#ifndef configINCLUDE_TRACE_RELATED_CLI_COMMANDS\r
+ #define configINCLUDE_TRACE_RELATED_CLI_COMMANDS 0\r
+#endif\r
+\r
+\r
+/*\r
+ * Implements the task-stats command.\r
+ */\r
+static portBASE_TYPE prvTaskStatsCommand( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString );\r
+\r
+/*\r
+ * Implements the run-time-stats command.\r
+ */\r
+static portBASE_TYPE prvRunTimeStatsCommand( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString );\r
+\r
+/*\r
+ * Implements the echo-three-parameters command.\r
+ */\r
+static portBASE_TYPE prvThreeParameterEchoCommand( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString );\r
+\r
+/*\r
+ * Implements the echo-parameters command.\r
+ */\r
+static portBASE_TYPE prvParameterEchoCommand( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *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( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString );\r
+#endif\r
+\r
+/* Structure that defines the "run-time-stats" command line command. This\r
+generates a table that shows how much run time each task has */\r
+static const CLI_Command_Definition_t xRunTimeStats =\r
+{\r
+ ( const int8_t * const ) "run-time-stats", /* The command string to type. */\r
+ ( const int8_t * const ) "\r\nrun-time-stats:\r\n Displays a table showing how much processing time each FreeRTOS task has used\r\n",\r
+ prvRunTimeStatsCommand, /* The function to run. */\r
+ 0 /* No parameters are expected. */\r
+};\r
+\r
+/* Structure that defines the "task-stats" command line command. This generates\r
+a table that gives information on each task in the system. */\r
+static const CLI_Command_Definition_t xTaskStats =\r
+{\r
+ ( const int8_t * const ) "task-stats", /* The command string to type. */\r
+ ( const int8_t * const ) "\r\ntask-stats:\r\n Displays a table showing the state of each FreeRTOS task\r\n",\r
+ prvTaskStatsCommand, /* The function to run. */\r
+ 0 /* No parameters are expected. */\r
+};\r
+\r
+/* Structure that defines the "echo_3_parameters" command line command. This\r
+takes exactly three parameters that the command simply echos back one at a\r
+time. */\r
+static const CLI_Command_Definition_t xThreeParameterEcho =\r
+{\r
+ ( const int8_t * const ) "echo-3-parameters",\r
+ ( const int8_t * const ) "\r\necho-3-parameters <param1> <param2> <param3>:\r\n Expects three parameters, echos each in turn\r\n",\r
+ prvThreeParameterEchoCommand, /* The function to run. */\r
+ 3 /* Three parameters are expected, which can take any value. */\r
+};\r
+\r
+/* Structure that defines the "echo_parameters" command line command. This\r
+takes a variable number of parameters that the command simply echos back one at\r
+a time. */\r
+static const CLI_Command_Definition_t xParameterEcho =\r
+{\r
+ ( const int8_t * const ) "echo-parameters",\r
+ ( const int8_t * const ) "\r\necho-parameters <...>:\r\n Take variable number of parameters, echos each in turn\r\n",\r
+ prvParameterEchoCommand, /* The function to run. */\r
+ -1 /* The user can enter any number of commands. */\r
+};\r
+\r
+#if configINCLUDE_TRACE_RELATED_CLI_COMMANDS == 1\r
+ /* Structure that defines the "trace" command line command. This takes a single\r
+ parameter, which can be either "start" or "stop". */\r
+ static const CLI_Command_Definition_t xStartStopTrace =\r
+ {\r
+ ( const int8_t * const ) "trace",\r
+ ( const int8_t * const ) "\r\ntrace [start | stop]:\r\n Starts or stops a trace recording for viewing in FreeRTOS+Trace\r\n",\r
+ prvStartStopTraceCommand, /* The function to run. */\r
+ 1 /* One parameter is expected. Valid values are "start" and "stop". */\r
+ };\r
+#endif /* configINCLUDE_TRACE_RELATED_CLI_COMMANDS */\r
+\r
+/*-----------------------------------------------------------*/\r
+\r
+void vRegisterSampleCLICommands( void )\r
+{\r
+ /* Register all the command line commands defined immediately above. */\r
+ FreeRTOS_CLIRegisterCommand( &xTaskStats );\r
+ FreeRTOS_CLIRegisterCommand( &xRunTimeStats );\r
+ FreeRTOS_CLIRegisterCommand( &xThreeParameterEcho );\r
+ FreeRTOS_CLIRegisterCommand( &xParameterEcho );\r
+\r
+ #if( configINCLUDE_TRACE_RELATED_CLI_COMMANDS == 1 )\r
+ {\r
+ FreeRTOS_CLIRegisterCommand( & xStartStopTrace );\r
+ }\r
+ #endif\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+static portBASE_TYPE prvTaskStatsCommand( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString )\r
+{\r
+const int8_t *const pcHeader = ( int8_t * ) "Task State Priority Stack #\r\n************************************************\r\n";\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
+ write buffer length is adequate, so does not check for buffer overflows. */\r
+ ( void ) pcCommandString;\r
+ ( void ) xWriteBufferLen;\r
+ configASSERT( pcWriteBuffer );\r
+\r
+ /* Generate a table of task stats. */\r
+ strcpy( ( char * ) pcWriteBuffer, ( char * ) pcHeader );\r
+ vTaskList( pcWriteBuffer + strlen( ( char * ) pcHeader ) );\r
+\r
+ /* There is no more data to return after this single string, so return\r
+ pdFALSE. */\r
+ return pdFALSE;\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+static portBASE_TYPE prvRunTimeStatsCommand( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString )\r
+{\r
+const int8_t * const pcHeader = ( int8_t * ) "Task Abs Time % Time\r\n****************************************\r\n";\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
+ write buffer length is adequate, so does not check for buffer overflows. */\r
+ ( void ) pcCommandString;\r
+ ( void ) xWriteBufferLen;\r
+ configASSERT( pcWriteBuffer );\r
+\r
+ /* Generate a table of task stats. */\r
+ strcpy( ( char * ) pcWriteBuffer, ( char * ) pcHeader );\r
+ vTaskGetRunTimeStats( pcWriteBuffer + strlen( ( char * ) pcHeader ) );\r
+\r
+ /* There is no more data to return after this single string, so return\r
+ pdFALSE. */\r
+ return pdFALSE;\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+static portBASE_TYPE prvThreeParameterEchoCommand( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString )\r
+{\r
+int8_t *pcParameter;\r
+portBASE_TYPE xParameterStringLength, xReturn;\r
+static portBASE_TYPE 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
+ write buffer length is adequate, so does not check for buffer overflows. */\r
+ ( void ) pcCommandString;\r
+ ( void ) xWriteBufferLen;\r
+ configASSERT( pcWriteBuffer );\r
+\r
+ if( lParameterNumber == 0 )\r
+ {\r
+ /* The first time the function is called after the command has been\r
+ entered just a header string is returned. */\r
+ sprintf( ( char * ) pcWriteBuffer, "The three parameters were:\r\n" );\r
+\r
+ /* Next time the function is called the first parameter will be echoed\r
+ back. */\r
+ lParameterNumber = 1L;\r
+\r
+ /* There is more data to be returned as no parameters have been echoed\r
+ back yet. */\r
+ xReturn = pdPASS;\r
+ }\r
+ else\r
+ {\r
+ /* Obtain the parameter string. */\r
+ pcParameter = ( int8_t * ) FreeRTOS_CLIGetParameter\r
+ (\r
+ pcCommandString, /* The command string itself. */\r
+ lParameterNumber, /* Return the next parameter. */\r
+ &xParameterStringLength /* Store the parameter string length. */\r
+ );\r
+\r
+ /* Sanity check something was returned. */\r
+ configASSERT( pcParameter );\r
+\r
+ /* Return the parameter string. */\r
+ memset( pcWriteBuffer, 0x00, xWriteBufferLen );\r
+ sprintf( ( char * ) pcWriteBuffer, "%d: ", ( int ) lParameterNumber );\r
+ strncat( ( char * ) pcWriteBuffer, ( const char * ) pcParameter, xParameterStringLength );\r
+ strncat( ( char * ) pcWriteBuffer, "\r\n", strlen( "\r\n" ) );\r
+\r
+ /* If this is the last of the three parameters then there are no more\r
+ strings to return after this one. */\r
+ if( lParameterNumber == 3L )\r
+ {\r
+ /* If this is the last of the three parameters then there are no more\r
+ strings to return after this one. */\r
+ xReturn = pdFALSE;\r
+ lParameterNumber = 0L;\r
+ }\r
+ else\r
+ {\r
+ /* There are more parameters to return after this one. */\r
+ xReturn = pdTRUE;\r
+ lParameterNumber++;\r
+ }\r
+ }\r
+\r
+ return xReturn;\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+static portBASE_TYPE prvParameterEchoCommand( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString )\r
+{\r
+int8_t *pcParameter;\r
+portBASE_TYPE xParameterStringLength, xReturn;\r
+static portBASE_TYPE 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
+ write buffer length is adequate, so does not check for buffer overflows. */\r
+ ( void ) pcCommandString;\r
+ ( void ) xWriteBufferLen;\r
+ configASSERT( pcWriteBuffer );\r
+\r
+ if( lParameterNumber == 0 )\r
+ {\r
+ /* The first time the function is called after the command has been\r
+ entered just a header string is returned. */\r
+ sprintf( ( char * ) pcWriteBuffer, "The parameters were:\r\n" );\r
+\r
+ /* Next time the function is called the first parameter will be echoed\r
+ back. */\r
+ lParameterNumber = 1L;\r
+\r
+ /* There is more data to be returned as no parameters have been echoed\r
+ back yet. */\r
+ xReturn = pdPASS;\r
+ }\r
+ else\r
+ {\r
+ /* Obtain the parameter string. */\r
+ pcParameter = ( int8_t * ) FreeRTOS_CLIGetParameter\r
+ (\r
+ pcCommandString, /* The command string itself. */\r
+ lParameterNumber, /* Return the next parameter. */\r
+ &xParameterStringLength /* Store the parameter string length. */\r
+ );\r
+\r
+ if( pcParameter != NULL )\r
+ {\r
+ /* Return the parameter string. */\r
+ memset( pcWriteBuffer, 0x00, xWriteBufferLen );\r
+ sprintf( ( char * ) pcWriteBuffer, "%d: ", ( int ) lParameterNumber );\r
+ strncat( ( char * ) pcWriteBuffer, ( const char * ) pcParameter, xParameterStringLength );\r
+ strncat( ( char * ) pcWriteBuffer, "\r\n", strlen( "\r\n" ) );\r
+\r
+ /* There might be more parameters to return after this one. */\r
+ xReturn = pdTRUE;\r
+ lParameterNumber++;\r
+ }\r
+ else\r
+ {\r
+ /* No more parameters were found. Make sure the write buffer does\r
+ not contain a valid string. */\r
+ pcWriteBuffer[ 0 ] = 0x00;\r
+\r
+ /* No more data to return. */\r
+ xReturn = pdFALSE;\r
+\r
+ /* Start over the next time this command is executed. */\r
+ lParameterNumber = 0;\r
+ }\r
+ }\r
+\r
+ return xReturn;\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+#if configINCLUDE_TRACE_RELATED_CLI_COMMANDS == 1\r
+\r
+ static portBASE_TYPE prvStartStopTraceCommand( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString )\r
+ {\r
+ int8_t *pcParameter;\r
+ portBASE_TYPE 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
+ write buffer length is adequate, so does not check for buffer overflows. */\r
+ ( void ) pcCommandString;\r
+ ( void ) xWriteBufferLen;\r
+ configASSERT( pcWriteBuffer );\r
+\r
+ /* Obtain the parameter string. */\r
+ pcParameter = ( int8_t * ) FreeRTOS_CLIGetParameter\r
+ (\r
+ pcCommandString, /* The command string itself. */\r
+ 1, /* Return the first parameter. */\r
+ &lParameterStringLength /* Store the parameter string length. */\r
+ );\r
+\r
+ /* Sanity check something was returned. */\r
+ configASSERT( pcParameter );\r
+\r
+ /* There are only two valid parameter values. */\r
+ if( strncmp( ( const char * ) pcParameter, "start", strlen( "start" ) ) == 0 )\r
+ {\r
+ /* Start or restart the trace. */\r
+ vTraceStop();\r
+ vTraceClear();\r
+ vTraceStart();\r
+\r
+ sprintf( ( char * ) pcWriteBuffer, "Trace recording (re)started.\r\n" );\r
+ }\r
+ else if( strncmp( ( const char * ) pcParameter, "stop", strlen( "stop" ) ) == 0 )\r
+ {\r
+ /* End the trace, if one is running. */\r
+ vTraceStop();\r
+ sprintf( ( char * ) pcWriteBuffer, "Stopping trace recording.\r\n" );\r
+ }\r
+ else\r
+ {\r
+ sprintf( ( char * ) pcWriteBuffer, "Valid parameters are 'start' and 'stop'.\r\n" );\r
+ }\r
+\r
+ /* There is no more data to return after this single string, so return\r
+ pdFALSE. */\r
+ return pdFALSE;\r
+ }\r
+\r
+#endif /* configINCLUDE_TRACE_RELATED_CLI_COMMANDS */\r
--- /dev/null
+/*\r
+ FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd.\r
+ All rights reserved\r
+\r
+ VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
+\r
+ ***************************************************************************\r
+ * *\r
+ * FreeRTOS provides completely free yet professionally developed, *\r
+ * robust, strictly quality controlled, supported, and cross *\r
+ * platform software that has become a de facto standard. *\r
+ * *\r
+ * Help yourself get started quickly and support the FreeRTOS *\r
+ * project by purchasing a FreeRTOS tutorial book, reference *\r
+ * manual, or both from: http://www.FreeRTOS.org/Documentation *\r
+ * *\r
+ * Thank you! *\r
+ * *\r
+ ***************************************************************************\r
+\r
+ This file is part of the FreeRTOS distribution.\r
+\r
+ FreeRTOS is free software; you can redistribute it and/or modify it under\r
+ the terms of the GNU General Public License (version 2) as published by the\r
+ Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.\r
+\r
+ >>! NOTE: The modification to the GPL is included to allow you to distribute\r
+ >>! a combined work that includes FreeRTOS without being obliged to provide\r
+ >>! the source code for proprietary components outside of the FreeRTOS\r
+ >>! kernel.\r
+\r
+ FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY\r
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\r
+ FOR A PARTICULAR PURPOSE. Full license text is available from the following\r
+ link: http://www.freertos.org/a00114.html\r
+\r
+ 1 tab == 4 spaces!\r
+\r
+ ***************************************************************************\r
+ * *\r
+ * Having a problem? Start by reading the FAQ "My application does *\r
+ * not run, what could be wrong?" *\r
+ * *\r
+ * http://www.FreeRTOS.org/FAQHelp.html *\r
+ * *\r
+ ***************************************************************************\r
+\r
+ http://www.FreeRTOS.org - Documentation, books, training, latest versions,\r
+ license and Real Time Engineers Ltd. contact details.\r
+\r
+ http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,\r
+ including FreeRTOS+Trace - an indispensable productivity tool, a DOS\r
+ compatible FAT file system, and our tiny thread aware UDP/IP stack.\r
+\r
+ http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High\r
+ Integrity Systems to sell under the OpenRTOS brand. Low cost OpenRTOS\r
+ licenses offer ticketed support, indemnification and middleware.\r
+\r
+ http://www.SafeRTOS.com - High Integrity Systems also provide a safety\r
+ engineered and independently SIL3 certified version for use in safety and\r
+ mission critical applications that require provable dependability.\r
+\r
+ 1 tab == 4 spaces!\r
+*/\r
+\r
+ /******************************************************************************\r
+ *\r
+ * See the following URL for information on the commands defined in this file:\r
+ * http://www.FreeRTOS.org/FreeRTOS-Plus/FreeRTOS_Plus_UDP/Embedded_Ethernet_Examples/Ethernet_Related_CLI_Commands.shtml\r
+ *\r
+ ******************************************************************************/\r
+\r
+\r
+/* FreeRTOS includes. */\r
+#include "FreeRTOS.h"\r
+#include "task.h"\r
+\r
+/* Standard includes. */\r
+#include <stdint.h>\r
+#include <stdio.h>\r
+#include <stdlib.h>\r
+\r
+/* FreeRTOS+CLI includes. */\r
+#include "FreeRTOS_CLI.h"\r
+\r
+/* FreeRTOS+UDP includes, just to make the stats available to the CLI\r
+commands. */\r
+#include "FreeRTOS_UDP_IP.h"\r
+#include "FreeRTOS_Sockets.h"\r
+\r
+/*\r
+ * Defines a command that prints out IP address information.\r
+ */\r
+static portBASE_TYPE prvDisplayIPConfig( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString );\r
+\r
+/*\r
+ * Defines a command that prints out the gathered demo debug stats.\r
+ */\r
+static portBASE_TYPE prvDisplayIPDebugStats( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString );\r
+\r
+/*\r
+ * Defines a command that sends an ICMP ping request to an IP address.\r
+ */\r
+static portBASE_TYPE prvPingCommand( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString );\r
+\r
+/* Structure that defines the "ip-config" command line command. */\r
+static const CLI_Command_Definition_t xIPConfig =\r
+{\r
+ ( const int8_t * const ) "ip-config",\r
+ ( const int8_t * const ) "ip-config:\r\n Displays IP address configuration\r\n\r\n",\r
+ prvDisplayIPConfig,\r
+ 0\r
+};\r
+\r
+#if configINCLUDE_DEMO_DEBUG_STATS != 0\r
+ /* Structure that defines the "ip-debug-stats" command line command. */\r
+ static const CLI_Command_Definition_t xIPDebugStats =\r
+ {\r
+ ( const int8_t * const ) "ip-debug-stats", /* The command string to type. */\r
+ ( const int8_t * const ) "ip-debug-stats:\r\n Shows some IP stack stats useful for debug - an example only.\r\n\r\n",\r
+ prvDisplayIPDebugStats, /* The function to run. */\r
+ 0 /* No parameters are expected. */\r
+ };\r
+#endif /* configINCLUDE_DEMO_DEBUG_STATS */\r
+\r
+#if ipconfigSUPPORT_OUTGOING_PINGS == 1\r
+\r
+ /* Structure that defines the "ping" command line command. This takes an IP\r
+ address or host name and (optionally) the number of bytes to ping as\r
+ parameters. */\r
+ static const CLI_Command_Definition_t xPing =\r
+ {\r
+ ( const int8_t * const ) "ping",\r
+ ( const int8_t * const ) "ping <ipaddress> <optional:bytes to send>:\r\n for example, ping 192.168.0.3 8, or ping www.example.com\r\n\r\n",\r
+ prvPingCommand, /* The function to run. */\r
+ -1 /* Ping can take either one or two parameter, so the number of parameters has to be determined by the ping command implementation. */\r
+ };\r
+\r
+#endif /* ipconfigSUPPORT_OUTGOING_PINGS */\r
+\r
+\r
+/*-----------------------------------------------------------*/\r
+\r
+void vRegisterUDPCLICommands( void )\r
+{\r
+ /* Register all the command line commands defined immediately above. */\r
+ FreeRTOS_CLIRegisterCommand( &xIPConfig );\r
+\r
+ #if configINCLUDE_DEMO_DEBUG_STATS == 1\r
+ {\r
+ FreeRTOS_CLIRegisterCommand( &xIPDebugStats );\r
+ }\r
+ #endif /* configINCLUDE_DEMO_DEBUG_STATS */\r
+\r
+ #if ipconfigSUPPORT_OUTGOING_PINGS == 1\r
+ {\r
+ FreeRTOS_CLIRegisterCommand( &xPing );\r
+ }\r
+ #endif /* ipconfigSUPPORT_OUTGOING_PINGS */\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+#if ipconfigSUPPORT_OUTGOING_PINGS == 1\r
+\r
+ static portBASE_TYPE prvPingCommand( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString )\r
+ {\r
+ int8_t * pcParameter;\r
+ portBASE_TYPE lParameterStringLength, xReturn;\r
+ uint32_t ulIPAddress, ulBytesToPing;\r
+ const uint32_t ulDefaultBytesToPing = 8UL;\r
+ int8_t cBuffer[ 16 ];\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
+ write buffer length is adequate, so does not check for buffer overflows. */\r
+ ( void ) pcCommandString;\r
+ ( void ) xWriteBufferLen;\r
+ configASSERT( pcWriteBuffer );\r
+\r
+ /* Start with an empty string. */\r
+ pcWriteBuffer[ 0 ] = 0x00;\r
+\r
+ /* Obtain the number of bytes to ping. */\r
+ pcParameter = ( int8_t * ) FreeRTOS_CLIGetParameter\r
+ (\r
+ pcCommandString, /* The command string itself. */\r
+ 2, /* Return the second parameter. */\r
+ &lParameterStringLength /* Store the parameter string length. */\r
+ );\r
+\r
+ if( pcParameter == NULL )\r
+ {\r
+ /* The number of bytes was not specified, so default it. */\r
+ ulBytesToPing = ulDefaultBytesToPing;\r
+ }\r
+ else\r
+ {\r
+ ulBytesToPing = atol( ( const char * ) pcParameter );\r
+ }\r
+\r
+ /* Obtain the IP address string. */\r
+ pcParameter = ( int8_t * ) FreeRTOS_CLIGetParameter\r
+ (\r
+ pcCommandString, /* The command string itself. */\r
+ 1, /* Return the first parameter. */\r
+ &lParameterStringLength /* Store the parameter string length. */\r
+ );\r
+\r
+ /* Sanity check something was returned. */\r
+ configASSERT( pcParameter );\r
+\r
+ /* Attempt to obtain the IP address. If the first character is not a\r
+ digit, assume the host name has been passed in. */\r
+ if( ( *pcParameter >= '0' ) && ( *pcParameter <= '9' ) )\r
+ {\r
+ ulIPAddress = FreeRTOS_inet_addr( ( const uint8_t * ) pcParameter );\r
+ }\r
+ else\r
+ {\r
+ /* Terminate the host name. */\r
+ pcParameter[ lParameterStringLength ] = 0x00;\r
+\r
+ /* Attempt to resolve host. */\r
+ ulIPAddress = FreeRTOS_gethostbyname( ( uint8_t * ) pcParameter );\r
+ }\r
+\r
+ /* Convert IP address, which may have come from a DNS lookup, to string. */\r
+ FreeRTOS_inet_ntoa( ulIPAddress, ( char * ) cBuffer );\r
+\r
+ if( ulIPAddress != 0 )\r
+ {\r
+ xReturn = FreeRTOS_SendPingRequest( ulIPAddress, ( uint16_t ) ulBytesToPing, portMAX_DELAY );\r
+ }\r
+ else\r
+ {\r
+ xReturn = pdFALSE;\r
+ }\r
+\r
+ if( xReturn == pdFALSE )\r
+ {\r
+ sprintf( ( char * ) pcWriteBuffer, "%s", "Could not send ping request\r\n" );\r
+ }\r
+ else\r
+ {\r
+ sprintf( ( char * ) pcWriteBuffer, "Ping sent to %s with identifier %d\r\n", cBuffer, ( int ) xReturn );\r
+ }\r
+\r
+ return pdFALSE;\r
+ }\r
+ /*-----------------------------------------------------------*/\r
+\r
+#endif /* ipconfigSUPPORT_OUTGOING_PINGS */\r
+\r
+#if configINCLUDE_DEMO_DEBUG_STATS != 0\r
+\r
+ static portBASE_TYPE prvDisplayIPDebugStats( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString )\r
+ {\r
+ static portBASE_TYPE xIndex = -1;\r
+ extern xExampleDebugStatEntry_t xIPTraceValues[];\r
+ portBASE_TYPE 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
+ write buffer length is adequate, so does not check for buffer overflows. */\r
+ ( void ) pcCommandString;\r
+ ( void ) xWriteBufferLen;\r
+ configASSERT( pcWriteBuffer );\r
+\r
+ xIndex++;\r
+\r
+ if( xIndex < xExampleDebugStatEntries() )\r
+ {\r
+ sprintf( ( char * ) pcWriteBuffer, "%s %d\r\n", ( char * ) xIPTraceValues[ xIndex ].pucDescription, ( int ) xIPTraceValues[ xIndex ].ulData );\r
+ xReturn = pdPASS;\r
+ }\r
+ else\r
+ {\r
+ /* Reset the index for the next time it is called. */\r
+ xIndex = -1;\r
+\r
+ /* Ensure nothing remains in the write buffer. */\r
+ pcWriteBuffer[ 0 ] = 0x00;\r
+ xReturn = pdFALSE;\r
+ }\r
+\r
+ return xReturn;\r
+ }\r
+ /*-----------------------------------------------------------*/\r
+\r
+#endif /* configINCLUDE_DEMO_DEBUG_STATS */\r
+\r
+static portBASE_TYPE prvDisplayIPConfig( int8_t *pcWriteBuffer, size_t xWriteBufferLen, const int8_t *pcCommandString )\r
+{\r
+static portBASE_TYPE xIndex = 0;\r
+portBASE_TYPE xReturn;\r
+uint32_t ulAddress;\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
+ write buffer length is adequate, so does not check for buffer overflows. */\r
+ ( void ) pcCommandString;\r
+ ( void ) xWriteBufferLen;\r
+ configASSERT( pcWriteBuffer );\r
+\r
+ switch( xIndex )\r
+ {\r
+ case 0 :\r
+ FreeRTOS_GetAddressConfiguration( &ulAddress, NULL, NULL, NULL );\r
+ sprintf( ( char * ) pcWriteBuffer, "\r\nIP address " );\r
+ xReturn = pdTRUE;\r
+ xIndex++;\r
+ break;\r
+\r
+ case 1 :\r
+ FreeRTOS_GetAddressConfiguration( NULL, &ulAddress, NULL, NULL );\r
+ sprintf( ( char * ) pcWriteBuffer, "\r\nNet mask " );\r
+ xReturn = pdTRUE;\r
+ xIndex++;\r
+ break;\r
+\r
+ case 2 :\r
+ FreeRTOS_GetAddressConfiguration( NULL, NULL, &ulAddress, NULL );\r
+ sprintf( ( char * ) pcWriteBuffer, "\r\nGateway address " );\r
+ xReturn = pdTRUE;\r
+ xIndex++;\r
+ break;\r
+\r
+ case 3 :\r
+ FreeRTOS_GetAddressConfiguration( NULL, NULL, NULL, &ulAddress );\r
+ sprintf( ( char * ) pcWriteBuffer, "\r\nDNS server address " );\r
+ xReturn = pdTRUE;\r
+ xIndex++;\r
+ break;\r
+\r
+ default :\r
+ ulAddress = 0;\r
+ sprintf( ( char * ) pcWriteBuffer, "\r\n\r\n" );\r
+ xReturn = pdFALSE;\r
+ xIndex = 0;\r
+ break;\r
+ }\r
+\r
+ if( ulAddress != 0 )\r
+ {\r
+ FreeRTOS_inet_ntoa( ulAddress, ( ( char * ) &( pcWriteBuffer[ strlen( ( char * ) pcWriteBuffer ) ] ) ) );\r
+ }\r
+\r
+ return xReturn;\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
--- /dev/null
+/*\r
+ FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd.\r
+ All rights reserved\r
+\r
+ VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
+\r
+ ***************************************************************************\r
+ * *\r
+ * FreeRTOS provides completely free yet professionally developed, *\r
+ * robust, strictly quality controlled, supported, and cross *\r
+ * platform software that has become a de facto standard. *\r
+ * *\r
+ * Help yourself get started quickly and support the FreeRTOS *\r
+ * project by purchasing a FreeRTOS tutorial book, reference *\r
+ * manual, or both from: http://www.FreeRTOS.org/Documentation *\r
+ * *\r
+ * Thank you! *\r
+ * *\r
+ ***************************************************************************\r
+\r
+ This file is part of the FreeRTOS distribution.\r
+\r
+ FreeRTOS is free software; you can redistribute it and/or modify it under\r
+ the terms of the GNU General Public License (version 2) as published by the\r
+ Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.\r
+\r
+ >>! NOTE: The modification to the GPL is included to allow you to distribute\r
+ >>! a combined work that includes FreeRTOS without being obliged to provide\r
+ >>! the source code for proprietary components outside of the FreeRTOS\r
+ >>! kernel.\r
+\r
+ FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY\r
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\r
+ FOR A PARTICULAR PURPOSE. Full license text is available from the following\r
+ link: http://www.freertos.org/a00114.html\r
+\r
+ 1 tab == 4 spaces!\r
+\r
+ ***************************************************************************\r
+ * *\r
+ * Having a problem? Start by reading the FAQ "My application does *\r
+ * not run, what could be wrong?" *\r
+ * *\r
+ * http://www.FreeRTOS.org/FAQHelp.html *\r
+ * *\r
+ ***************************************************************************\r
+\r
+ http://www.FreeRTOS.org - Documentation, books, training, latest versions,\r
+ license and Real Time Engineers Ltd. contact details.\r
+\r
+ http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,\r
+ including FreeRTOS+Trace - an indispensable productivity tool, a DOS\r
+ compatible FAT file system, and our tiny thread aware UDP/IP stack.\r
+\r
+ http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High\r
+ Integrity Systems to sell under the OpenRTOS brand. Low cost OpenRTOS\r
+ licenses offer ticketed support, indemnification and middleware.\r
+\r
+ http://www.SafeRTOS.com - High Integrity Systems also provide a safety\r
+ engineered and independently SIL3 certified version for use in safety and\r
+ mission critical applications that require provable dependability.\r
+\r
+ 1 tab == 4 spaces!\r
+*/\r
+\r
+/*******************************************************************************\r
+ * See the URL in the comments within main.c for the location of the online\r
+ * documentation.\r
+ ******************************************************************************/\r
+\r
+/* Standard includes. */\r
+#include <stdio.h>\r
+#include <string.h>\r
+\r
+/* FreeRTOS includes. */\r
+#include "FreeRTOS.h"\r
+\r
+/* File system includes. */\r
+#include "fat_sl.h"\r
+#include "api_mdriver_ram.h"\r
+\r
+/* 8.3 format, plus null terminator. */\r
+#define fsMAX_FILE_NAME_LEN 13\r
+\r
+/* The number of bytes read/written to the example files at a time. */\r
+#define fsRAM_BUFFER_SIZE 200\r
+\r
+/* The number of bytes written to the file that uses f_putc() and f_getc(). */\r
+#define fsPUTC_FILE_SIZE 100\r
+\r
+/*-----------------------------------------------------------*/\r
+\r
+/*\r
+ * Creates and verifies different files on the volume, demonstrating the use of\r
+ * various different API functions.\r
+ */\r
+void vCreateAndVerifySampleFiles( void );\r
+\r
+/*\r
+ * Create a set of example files in the root directory of the volume using\r
+ * f_write().\r
+ */\r
+static void prvCreateDemoFilesUsing_f_write( void );\r
+\r
+/*\r
+ * Use f_read() to read back and verify the files that were created by\r
+ * prvCreateDemoFilesUsing_f_write().\r
+ */\r
+static void prvVerifyDemoFileUsing_f_read( void );\r
+\r
+/*\r
+ * Create an example file in a sub-directory using f_putc().\r
+ */\r
+static void prvCreateDemoFileUsing_f_putc( void );\r
+\r
+/*\r
+ * Use f_getc() to read back and verify the file that was created by\r
+ * prvCreateDemoFileUsing_f_putc().\r
+ */\r
+static void prvVerifyDemoFileUsing_f_getc( void );\r
+\r
+/*-----------------------------------------------------------*/\r
+\r
+/* A buffer used to both create content to write to disk, and read content back\r
+from a disk. Note there is no mutual exclusion on this buffer. */\r
+static char cRAMBuffer[ fsRAM_BUFFER_SIZE ];\r
+\r
+/* Names of directories that are created. */\r
+static const char *pcRoot = "/", *pcDirectory1 = "SUB1", *pcDirectory2 = "SUB2", *pcFullPath = "/SUB1/SUB2";\r
+\r
+/*-----------------------------------------------------------*/\r
+\r
+void vCreateAndVerifySampleFiles( void )\r
+{\r
+unsigned char ucStatus;\r
+\r
+ /* First create the volume. */\r
+ ucStatus = f_initvolume( ram_initfunc );\r
+\r
+ /* It is expected that the volume is not formatted. */\r
+ if( ucStatus == F_ERR_NOTFORMATTED )\r
+ {\r
+ /* Format the created volume. */\r
+ ucStatus = f_format( F_FAT12_MEDIA );\r
+ }\r
+\r
+ if( ucStatus == F_NO_ERROR )\r
+ {\r
+ /* Create a set of files using f_write(). */\r
+ prvCreateDemoFilesUsing_f_write();\r
+\r
+ /* Read back and verify the files that were created using f_write(). */\r
+ prvVerifyDemoFileUsing_f_read();\r
+\r
+ /* Create sub directories two deep then create a file using putc. */\r
+ prvCreateDemoFileUsing_f_putc();\r
+\r
+ /* Read back and verify the file created by\r
+ prvCreateDemoFileUsing_f_putc(). */\r
+ prvVerifyDemoFileUsing_f_getc();\r
+ }\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+static void prvCreateDemoFilesUsing_f_write( void )\r
+{\r
+portBASE_TYPE xFileNumber, xWriteNumber;\r
+char cFileName[ fsMAX_FILE_NAME_LEN ];\r
+const portBASE_TYPE xMaxFiles = 5;\r
+long lItemsWritten;\r
+F_FILE *pxFile;\r
+\r
+ /* Create xMaxFiles files. Each created file will be\r
+ ( xFileNumber * fsRAM_BUFFER_SIZE ) bytes in length, and filled\r
+ with a different repeating character. */\r
+ for( xFileNumber = 1; xFileNumber <= xMaxFiles; xFileNumber++ )\r
+ {\r
+ /* Generate a file name. */\r
+ sprintf( cFileName, "root%03d.txt", ( int ) xFileNumber );\r
+\r
+ /* Obtain the current working directory and print out the file name and\r
+ the directory into which the file is being written. */\r
+ f_getcwd( cRAMBuffer, fsRAM_BUFFER_SIZE );\r
+\r
+ /* Open the file, creating the file if it does not already exist. */\r
+ pxFile = f_open( cFileName, "w" );\r
+ configASSERT( pxFile );\r
+\r
+ /* Fill the RAM buffer with data that will be written to the file. This\r
+ is just a repeating ascii character that indicates the file number. */\r
+ memset( cRAMBuffer, ( int ) ( '0' + xFileNumber ), fsRAM_BUFFER_SIZE );\r
+\r
+ /* Write the RAM buffer to the opened file a number of times. The\r
+ number of times the RAM buffer is written to the file depends on the\r
+ file number, so the length of each created file will be different. */\r
+ for( xWriteNumber = 0; xWriteNumber < xFileNumber; xWriteNumber++ )\r
+ {\r
+ lItemsWritten = f_write( cRAMBuffer, fsRAM_BUFFER_SIZE, 1, pxFile );\r
+ configASSERT( lItemsWritten == 1 );\r
+ }\r
+\r
+ /* Close the file so another file can be created. */\r
+ f_close( pxFile );\r
+ }\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+static void prvVerifyDemoFileUsing_f_read( void )\r
+{\r
+portBASE_TYPE xFileNumber, xReadNumber;\r
+char cFileName[ fsMAX_FILE_NAME_LEN ];\r
+const portBASE_TYPE xMaxFiles = 5;\r
+long lItemsRead, lChar;\r
+F_FILE *pxFile;\r
+\r
+ /* Read back the files that were created by\r
+ prvCreateDemoFilesUsing_f_write(). */\r
+ for( xFileNumber = 1; xFileNumber <= xMaxFiles; xFileNumber++ )\r
+ {\r
+ /* Generate the file name. */\r
+ sprintf( cFileName, "root%03d.txt", ( int ) xFileNumber );\r
+\r
+ /* Obtain the current working directory and print out the file name and\r
+ the directory from which the file is being read. */\r
+ f_getcwd( cRAMBuffer, fsRAM_BUFFER_SIZE );\r
+\r
+ /* Open the file for reading. */\r
+ pxFile = f_open( cFileName, "r" );\r
+ configASSERT( pxFile );\r
+\r
+ /* Read the file into the RAM buffer, checking the file contents are as\r
+ expected. The size of the file depends on the file number. */\r
+ for( xReadNumber = 0; xReadNumber < xFileNumber; xReadNumber++ )\r
+ {\r
+ /* Start with the RAM buffer clear. */\r
+ memset( cRAMBuffer, 0x00, fsRAM_BUFFER_SIZE );\r
+\r
+ lItemsRead = f_read( cRAMBuffer, fsRAM_BUFFER_SIZE, 1, pxFile );\r
+ configASSERT( lItemsRead == 1 );\r
+\r
+ /* Check the RAM buffer is filled with the expected data. Each\r
+ file contains a different repeating ascii character that indicates\r
+ the number of the file. */\r
+ for( lChar = 0; lChar < fsRAM_BUFFER_SIZE; lChar++ )\r
+ {\r
+ configASSERT( cRAMBuffer[ lChar ] == ( '0' + ( char ) xFileNumber ) );\r
+ }\r
+ }\r
+\r
+ /* Close the file. */\r
+ f_close( pxFile );\r
+ }\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+static void prvCreateDemoFileUsing_f_putc( void )\r
+{\r
+unsigned char ucReturn;\r
+int iByte, iReturned;\r
+F_FILE *pxFile;\r
+char cFileName[ fsMAX_FILE_NAME_LEN ];\r
+\r
+ /* Obtain and print out the working directory. */\r
+ f_getcwd( cRAMBuffer, fsRAM_BUFFER_SIZE );\r
+\r
+ /* Create a sub directory. */\r
+ ucReturn = f_mkdir( pcDirectory1 );\r
+ configASSERT( ucReturn == F_NO_ERROR );\r
+\r
+ /* Move into the created sub-directory. */\r
+ ucReturn = f_chdir( pcDirectory1 );\r
+ configASSERT( ucReturn == F_NO_ERROR );\r
+\r
+ /* Obtain and print out the working directory. */\r
+ f_getcwd( cRAMBuffer, fsRAM_BUFFER_SIZE );\r
+\r
+ /* Create a subdirectory in the new directory. */\r
+ ucReturn = f_mkdir( pcDirectory2 );\r
+ configASSERT( ucReturn == F_NO_ERROR );\r
+\r
+ /* Move into the directory just created - now two directories down from\r
+ the root. */\r
+ ucReturn = f_chdir( pcDirectory2 );\r
+ configASSERT( ucReturn == F_NO_ERROR );\r
+\r
+ /* Obtain and print out the working directory. */\r
+ f_getcwd( cRAMBuffer, fsRAM_BUFFER_SIZE );\r
+ configASSERT( strcmp( ( const char * ) cRAMBuffer, pcFullPath ) == 0 );\r
+\r
+ /* Generate the file name. */\r
+ sprintf( cFileName, "%s.txt", pcDirectory2 );\r
+\r
+ /* Print out the file name and the directory into which the file is being\r
+ written. */\r
+ pxFile = f_open( cFileName, "w" );\r
+\r
+ /* Create a file 1 byte at a time. The file is filled with incrementing\r
+ ascii characters starting from '0'. */\r
+ for( iByte = 0; iByte < fsPUTC_FILE_SIZE; iByte++ )\r
+ {\r
+ iReturned = f_putc( ( ( int ) '0' + iByte ), pxFile );\r
+ configASSERT( iReturned == ( ( int ) '0' + iByte ) );\r
+ }\r
+\r
+ /* Finished so close the file. */\r
+ f_close( pxFile );\r
+\r
+ /* Move back to the root directory. */\r
+ ucReturn = f_chdir( "../.." );\r
+ configASSERT( ucReturn == F_NO_ERROR );\r
+\r
+ /* Obtain and print out the working directory. */\r
+ f_getcwd( cRAMBuffer, fsRAM_BUFFER_SIZE );\r
+ configASSERT( strcmp( ( const char * ) cRAMBuffer, pcRoot ) == 0 );\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+static void prvVerifyDemoFileUsing_f_getc( void )\r
+{\r
+unsigned char ucReturn;\r
+int iByte, iReturned;\r
+F_FILE *pxFile;\r
+char cFileName[ fsMAX_FILE_NAME_LEN ];\r
+\r
+ /* Move into the directory in which the file was created. */\r
+ ucReturn = f_chdir( pcFullPath );\r
+ configASSERT( ucReturn == F_NO_ERROR );\r
+\r
+ /* Obtain and print out the working directory. */\r
+ f_getcwd( cRAMBuffer, fsRAM_BUFFER_SIZE );\r
+ configASSERT( strcmp( ( const char * ) cRAMBuffer, pcFullPath ) == 0 );\r
+\r
+ /* Generate the file name. */\r
+ sprintf( cFileName, "%s.txt", pcDirectory2 );\r
+\r
+ /* This time the file is opened for reading. */\r
+ pxFile = f_open( cFileName, "r" );\r
+\r
+ /* Read the file 1 byte at a time. */\r
+ for( iByte = 0; iByte < fsPUTC_FILE_SIZE; iByte++ )\r
+ {\r
+ iReturned = f_getc( pxFile );\r
+ configASSERT( iReturned == ( ( int ) '0' + iByte ) );\r
+ }\r
+\r
+ /* Finished so close the file. */\r
+ f_close( pxFile );\r
+\r
+ /* Move back to the root directory. */\r
+ ucReturn = f_chdir( "../.." );\r
+ configASSERT( ucReturn == F_NO_ERROR );\r
+\r
+ /* Obtain and print out the working directory. */\r
+ f_getcwd( cRAMBuffer, fsRAM_BUFFER_SIZE );\r
+}\r
+\r
+\r
+\r
+\r
/*\r
- FreeRTOS V7.5.3 - Copyright (C) 2013 Real Time Engineers Ltd. \r
+ FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. \r
All rights reserved\r
\r
VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
--- /dev/null
+/*\r
+ FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. \r
+ All rights reserved\r
+\r
+ VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
+\r
+ ***************************************************************************\r
+ * *\r
+ * FreeRTOS provides completely free yet professionally developed, *\r
+ * robust, strictly quality controlled, supported, and cross *\r
+ * platform software that has become a de facto standard. *\r
+ * *\r
+ * Help yourself get started quickly and support the FreeRTOS *\r
+ * project by purchasing a FreeRTOS tutorial book, reference *\r
+ * manual, or both from: http://www.FreeRTOS.org/Documentation *\r
+ * *\r
+ * Thank you! *\r
+ * *\r
+ ***************************************************************************\r
+\r
+ This file is part of the FreeRTOS distribution.\r
+\r
+ FreeRTOS is free software; you can redistribute it and/or modify it under\r
+ the terms of the GNU General Public License (version 2) as published by the\r
+ Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.\r
+\r
+ >>! NOTE: The modification to the GPL is included to allow you to distribute\r
+ >>! a combined work that includes FreeRTOS without being obliged to provide\r
+ >>! the source code for proprietary components outside of the FreeRTOS\r
+ >>! kernel.\r
+\r
+ FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY\r
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\r
+ FOR A PARTICULAR PURPOSE. Full license text is available from the following\r
+ link: http://www.freertos.org/a00114.html\r
+\r
+ 1 tab == 4 spaces!\r
+\r
+ ***************************************************************************\r
+ * *\r
+ * Having a problem? Start by reading the FAQ "My application does *\r
+ * not run, what could be wrong?" *\r
+ * *\r
+ * http://www.FreeRTOS.org/FAQHelp.html *\r
+ * *\r
+ ***************************************************************************\r
+\r
+ http://www.FreeRTOS.org - Documentation, books, training, latest versions,\r
+ license and Real Time Engineers Ltd. contact details.\r
+\r
+ http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,\r
+ including FreeRTOS+Trace - an indispensable productivity tool, a DOS\r
+ compatible FAT file system, and our tiny thread aware UDP/IP stack.\r
+\r
+ http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High\r
+ Integrity Systems to sell under the OpenRTOS brand. Low cost OpenRTOS\r
+ licenses offer ticketed support, indemnification and middleware.\r
+\r
+ http://www.SafeRTOS.com - High Integrity Systems also provide a safety\r
+ engineered and independently SIL3 certified version for use in safety and\r
+ mission critical applications that require provable dependability.\r
+\r
+ 1 tab == 4 spaces!\r
+*/\r
+\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
+\r
+#endif /* UDP_COMMAND_INTERPRETER_H */\r
--- /dev/null
+/*\r
+ FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. \r
+ All rights reserved\r
+\r
+ VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
+\r
+ ***************************************************************************\r
+ * *\r
+ * FreeRTOS provides completely free yet professionally developed, *\r
+ * robust, strictly quality controlled, supported, and cross *\r
+ * platform software that has become a de facto standard. *\r
+ * *\r
+ * Help yourself get started quickly and support the FreeRTOS *\r
+ * project by purchasing a FreeRTOS tutorial book, reference *\r
+ * manual, or both from: http://www.FreeRTOS.org/Documentation *\r
+ * *\r
+ * Thank you! *\r
+ * *\r
+ ***************************************************************************\r
+\r
+ This file is part of the FreeRTOS distribution.\r
+\r
+ FreeRTOS is free software; you can redistribute it and/or modify it under\r
+ the terms of the GNU General Public License (version 2) as published by the\r
+ Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.\r
+\r
+ >>! NOTE: The modification to the GPL is included to allow you to distribute\r
+ >>! a combined work that includes FreeRTOS without being obliged to provide\r
+ >>! the source code for proprietary components outside of the FreeRTOS\r
+ >>! kernel.\r
+\r
+ FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY\r
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\r
+ FOR A PARTICULAR PURPOSE. Full license text is available from the following\r
+ link: http://www.freertos.org/a00114.html\r
+\r
+ 1 tab == 4 spaces!\r
+\r
+ ***************************************************************************\r
+ * *\r
+ * Having a problem? Start by reading the FAQ "My application does *\r
+ * not run, what could be wrong?" *\r
+ * *\r
+ * http://www.FreeRTOS.org/FAQHelp.html *\r
+ * *\r
+ ***************************************************************************\r
+\r
+ http://www.FreeRTOS.org - Documentation, books, training, latest versions,\r
+ license and Real Time Engineers Ltd. contact details.\r
+\r
+ http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,\r
+ including FreeRTOS+Trace - an indispensable productivity tool, a DOS\r
+ compatible FAT file system, and our tiny thread aware UDP/IP stack.\r
+\r
+ http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High\r
+ Integrity Systems to sell under the OpenRTOS brand. Low cost OpenRTOS\r
+ licenses offer ticketed support, indemnification and middleware.\r
+\r
+ http://www.SafeRTOS.com - High Integrity Systems also provide a safety\r
+ engineered and independently SIL3 certified version for use in safety and\r
+ mission critical applications that require provable dependability.\r
+\r
+ 1 tab == 4 spaces!\r
+*/\r
+\r
+/* Standard includes. */\r
+#include <stdint.h>\r
+#include <stdio.h>\r
+\r
+/* FreeRTOS includes. */\r
+#include "FreeRTOS.h"\r
+#include "task.h"\r
+\r
+/* FreeRTOS+CLI includes. */\r
+#include "FreeRTOS_CLI.h"\r
+\r
+/* FreeRTOS+UDP includes. */\r
+#include "FreeRTOS_UDP_IP.h"\r
+#include "FreeRTOS_Sockets.h"\r
+\r
+/* Demo app includes. */\r
+#include "UDPCommandInterpreter.h"\r
+\r
+/* Dimensions the buffer into which input characters are placed. */\r
+#define cmdMAX_INPUT_SIZE 60\r
+\r
+/* Dimensions the buffer into which string outputs can be placed. */\r
+#define cmdMAX_OUTPUT_SIZE 1024\r
+\r
+/* Dimensions the buffer passed to the recvfrom() call. */\r
+#define cmdSOCKET_INPUT_BUFFER_SIZE 60\r
+\r
+/*\r
+ * The task that runs FreeRTOS+CLI.\r
+ */\r
+void vUDPCommandInterpreterTask( void *pvParameters );\r
+\r
+/*\r
+ * Open and configure the UDP socket.\r
+ */\r
+static xSocket_t prvOpenUDPServerSocket( uint16_t usPort );\r
+\r
+/*-----------------------------------------------------------*/\r
+\r
+void vStartUDPCommandInterpreterTask( uint16_t usStackSize, uint32_t ulPort, unsigned portBASE_TYPE uxPriority )\r
+{\r
+ xTaskCreate( vUDPCommandInterpreterTask, ( signed char * ) "CLI", usStackSize, ( void * ) ulPort, uxPriority, NULL );\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+/* \r
+ * Task that provides the input and output for the FreeRTOS+CLI command\r
+ * interpreter. In this case a UDP port is used. See the URL in the comments\r
+ * within main.c for the location of the online documentation.\r
+ */\r
+void vUDPCommandInterpreterTask( void *pvParameters )\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
+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
+\r
+ /* Just to prevent compiler warnings. */\r
+ ( void ) pvParameters;\r
+\r
+ /* Attempt to open the socket. The port number is passed in the task\r
+ parameter. The strange casting is to remove compiler warnings on 32-bit\r
+ machines. */\r
+ xSocket = prvOpenUDPServerSocket( ( uint16_t ) ( ( uint32_t ) pvParameters ) & 0xffffUL );\r
+\r
+ if( xSocket != FREERTOS_INVALID_SOCKET )\r
+ {\r
+ for( ;; )\r
+ {\r
+ /* Wait for incoming data on the opened socket. */\r
+ lBytes = FreeRTOS_recvfrom( xSocket, ( void * ) cLocalBuffer, sizeof( cLocalBuffer ), 0, &xClient, &xClientAddressLength );\r
+\r
+ if( lBytes != FREERTOS_SOCKET_ERROR )\r
+ {\r
+ /* Process each received byte in turn. */\r
+ lByte = 0;\r
+ while( lByte < lBytes )\r
+ {\r
+ /* The next character in the input buffer. */\r
+ cInChar = cLocalBuffer[ lByte ];\r
+ lByte++;\r
+\r
+ /* Newline characters are taken as the end of the command\r
+ string. */\r
+ if( cInChar == '\n' )\r
+ {\r
+ /* Process the input string received prior to the \r
+ newline. */\r
+ do\r
+ {\r
+ /* Pass the string to FreeRTOS+CLI. */\r
+ xMoreDataToFollow = FreeRTOS_CLIProcessCommand( cInputString, cOutputString, cmdMAX_OUTPUT_SIZE );\r
+ \r
+ /* Send the output generated by the command's\r
+ implementation. */\r
+ FreeRTOS_sendto( xSocket, cOutputString, strlen( ( const char * ) cOutputString ), 0, &xClient, xClientAddressLength );\r
+\r
+ } while( xMoreDataToFollow != pdFALSE ); /* Until the command does not generate any more output. */\r
+\r
+ /* All the strings generated by the command processing \r
+ have been sent. Clear the input string ready to receive \r
+ the next command. */\r
+ cInputIndex = 0;\r
+ memset( cInputString, 0x00, cmdMAX_INPUT_SIZE );\r
+ \r
+ /* Transmit a spacer, just to make the command console\r
+ easier to read. */\r
+ FreeRTOS_sendto( xSocket, "\r\n", strlen( "\r\n" ), 0, &xClient, xClientAddressLength );\r
+ }\r
+ else\r
+ {\r
+ if( cInChar == '\r' )\r
+ {\r
+ /* Ignore the character. Newlines are used to \r
+ detect the end of the input string. */\r
+ }\r
+ else if( cInChar == '\b' )\r
+ {\r
+ /* Backspace was pressed. Erase the last character \r
+ in the string - if any. */\r
+ if( cInputIndex > 0 )\r
+ {\r
+ cInputIndex--;\r
+ cInputString[ cInputIndex ] = '\0';\r
+ }\r
+ }\r
+ else\r
+ {\r
+ /* A character was entered. Add it to the string\r
+ entered so far. When a \n is entered the complete\r
+ string will be passed to the command interpreter. */\r
+ if( cInputIndex < cmdMAX_INPUT_SIZE )\r
+ {\r
+ cInputString[ cInputIndex ] = cInChar;\r
+ cInputIndex++;\r
+ }\r
+ }\r
+ }\r
+ }\r
+ }\r
+ } \r
+ }\r
+ else\r
+ {\r
+ /* The socket could not be opened. */\r
+ vTaskDelete( NULL );\r
+ }\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
+static xSocket_t prvOpenUDPServerSocket( uint16_t usPort )\r
+{\r
+struct freertos_sockaddr xServer;\r
+xSocket_t xSocket = FREERTOS_INVALID_SOCKET;\r
+\r
+ xSocket = FreeRTOS_socket( FREERTOS_AF_INET, FREERTOS_SOCK_DGRAM, FREERTOS_IPPROTO_UDP );\r
+ if( xSocket != FREERTOS_INVALID_SOCKET)\r
+ {\r
+ /* Zero out the server structure. */\r
+ memset( ( void * ) &xServer, 0x00, sizeof( xServer ) );\r
+\r
+ /* Set family and port. */\r
+ xServer.sin_port = FreeRTOS_htons( usPort );\r
+\r
+ /* Bind the address to the socket. */\r
+ if( FreeRTOS_bind( xSocket, &xServer, sizeof( xServer ) ) == -1 )\r
+ { \r
+ FreeRTOS_closesocket( xSocket );\r
+ xSocket = FREERTOS_INVALID_SOCKET;\r
+ }\r
+ }\r
+\r
+ return xSocket;\r
+}\r
+\r
+\r
/*\r
- FreeRTOS V7.5.3 - Copyright (C) 2013 Real Time Engineers Ltd. \r
+ FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. \r
All rights reserved\r
\r
VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\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. The delay is shorter when the Windows\r
-simulator is used because simulated time is slower than real time. */\r
-#ifdef _WINDOWS_\r
- #define echoLOOP_DELAY ( ( portTickType ) 10 / portTICK_RATE_MS )\r
-#else\r
- #define echoLOOP_DELAY ( ( portTickType ) 150 / portTICK_RATE_MS )\r
-#endif /* _WINDOWS_ */\r
+network does not get too congested. */\r
+#define echoLOOP_DELAY ( ( portTickType ) 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
for( lLoopCount = 0; lLoopCount < lMaxLoopCount; lLoopCount++ )\r
{\r
/* Create the string that is sent to the echo server. */\r
- sprintf( ( char * ) cTxString, "Message number %u\r\n", ulTxCount );\r
+ sprintf( ( char * ) cTxString, "Message number %u\r\n", ( unsigned int ) ulTxCount );\r
\r
/* Send the string to the socket. ulFlags is set to 0, so the zero\r
copy interface is not used. That means the data from cTxString is\r
/* A buffer was successfully obtained. Create the string that is\r
sent to the echo server. Note the string is written directly\r
into the buffer obtained from the IP stack. */\r
- sprintf( ( char * ) pucUDPPayloadBuffer, "%s %u\r\n", ( const char * ) "Zero copy message number", ulTxCount );\r
+ sprintf( ( char * ) pucUDPPayloadBuffer, "%s %u\r\n", ( const char * ) "Zero copy message number", ( unsigned int ) ulTxCount );\r
\r
/* Also copy the string into a local buffer so it can be compared\r
with the string that is later received back from the echo server. */\r
/*\r
- FreeRTOS V7.5.3 - Copyright (C) 2013 Real Time Engineers Ltd. \r
+ FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. \r
All rights reserved\r
\r
VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
/*\r
- FreeRTOS V7.5.3 - Copyright (C) 2013 Real Time Engineers Ltd. \r
+ FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. \r
All rights reserved\r
\r
VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
/*\r
- FreeRTOS V7.5.3 - Copyright (C) 2013 Real Time Engineers Ltd. \r
+ FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. \r
All rights reserved\r
\r
VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
/*\r
- FreeRTOS V7.5.3 - Copyright (C) 2013 Real Time Engineers Ltd. \r
+ FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. \r
All rights reserved\r
\r
VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
/*\r
- FreeRTOS V7.5.3 - Copyright (C) 2013 Real Time Engineers Ltd. \r
+ FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. \r
All rights reserved\r
\r
VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
/*\r
- FreeRTOS V7.5.3 - Copyright (C) 2013 Real Time Engineers Ltd. \r
+ FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. \r
All rights reserved\r
\r
VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
/*\r
- FreeRTOS V7.5.3 - Copyright (C) 2013 Real Time Engineers Ltd. \r
+ FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. \r
All rights reserved\r
\r
VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
/*\r
- FreeRTOS V7.5.3 - Copyright (C) 2013 Real Time Engineers Ltd. \r
+ FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. \r
All rights reserved\r
\r
VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
/*\r
- FreeRTOS V7.5.3 - Copyright (C) 2013 Real Time Engineers Ltd. \r
+ FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. \r
All rights reserved\r
\r
VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
/*\r
- FreeRTOS V7.5.3 - Copyright (C) 2013 Real Time Engineers Ltd. \r
+ FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. \r
All rights reserved\r
\r
VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
/*\r
- FreeRTOS V7.5.3 - Copyright (C) 2013 Real Time Engineers Ltd. \r
+ FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. \r
All rights reserved\r
\r
VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
/*\r
- FreeRTOS V7.5.3 - Copyright (C) 2013 Real Time Engineers Ltd. \r
+ FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. \r
All rights reserved\r
\r
VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
/*\r
- FreeRTOS V7.5.3 - Copyright (C) 2013 Real Time Engineers Ltd. \r
+ FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. \r
All rights reserved\r
\r
- FEATURES AND PORTS ARE ADDED TO FREERTOS ALL THE TIME. PLEASE VISIT\r
- http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
+ VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
\r
***************************************************************************\r
* *\r
- * FreeRTOS tutorial books are available in pdf and paperback. *\r
- * Complete, revised, and edited pdf reference manuals are also *\r
- * available. *\r
+ * FreeRTOS provides completely free yet professionally developed, *\r
+ * robust, strictly quality controlled, supported, and cross *\r
+ * platform software that has become a de facto standard. *\r
* *\r
- * Purchasing FreeRTOS documentation will not only help you, by *\r
- * ensuring you get running as quickly as possible and with an *\r
- * in-depth knowledge of how to use FreeRTOS, it will also help *\r
- * the FreeRTOS project to continue with its mission of providing *\r
- * professional grade, cross platform, de facto standard solutions *\r
- * for microcontrollers - completely free of charge! *\r
+ * Help yourself get started quickly and support the FreeRTOS *\r
+ * project by purchasing a FreeRTOS tutorial book, reference *\r
+ * manual, or both from: http://www.FreeRTOS.org/Documentation *\r
* *\r
- * >>> See http://www.FreeRTOS.org/Documentation for details. <<< *\r
- * *\r
- * Thank you for using FreeRTOS, and thank you for your support! *\r
+ * Thank you! *\r
* *\r
***************************************************************************\r
\r
-\r
This file is part of the FreeRTOS distribution.\r
\r
FreeRTOS is free software; you can redistribute it and/or modify it under\r
the terms of the GNU General Public License (version 2) as published by the\r
- Free Software Foundation AND MODIFIED BY the FreeRTOS exception.\r
+ Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.\r
\r
- >>>>>>NOTE<<<<<< The modification to the GPL is included to allow you to\r
- distribute a combined work that includes FreeRTOS without being obliged to\r
- provide the source code for proprietary components outside of the FreeRTOS\r
- kernel.\r
+ >>! NOTE: The modification to the GPL is included to allow you to distribute\r
+ >>! a combined work that includes FreeRTOS without being obliged to provide\r
+ >>! the source code for proprietary components outside of the FreeRTOS\r
+ >>! kernel.\r
\r
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY\r
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\r
- FOR A PARTICULAR PURPOSE. See the GNU General Public License for more\r
- details. You should have received a copy of the GNU General Public License\r
- and the FreeRTOS license exception along with FreeRTOS; if not itcan be\r
- viewed here: http://www.freertos.org/a00114.html and also obtained by\r
- writing to Real Time Engineers Ltd., contact details for whom are available\r
- on the FreeRTOS WEB site.\r
+ FOR A PARTICULAR PURPOSE. Full license text is available from the following\r
+ link: http://www.freertos.org/a00114.html\r
\r
1 tab == 4 spaces!\r
\r
* *\r
***************************************************************************\r
\r
-\r
- http://www.FreeRTOS.org - Documentation, books, training, latest versions, \r
+ http://www.FreeRTOS.org - Documentation, books, training, latest versions,\r
license and Real Time Engineers Ltd. contact details.\r
\r
http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,\r
- including FreeRTOS+Trace - an indispensable productivity tool, and our new\r
- fully thread aware and reentrant UDP/IP stack.\r
-\r
- http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High \r
- Integrity Systems, who sell the code with commercial support, \r
- indemnification and middleware, under the OpenRTOS brand.\r
- \r
- http://www.SafeRTOS.com - High Integrity Systems also provide a safety \r
- engineered and independently SIL3 certified version for use in safety and \r
+ including FreeRTOS+Trace - an indispensable productivity tool, a DOS\r
+ compatible FAT file system, and our tiny thread aware UDP/IP stack.\r
+\r
+ http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High\r
+ Integrity Systems to sell under the OpenRTOS brand. Low cost OpenRTOS\r
+ licenses offer ticketed support, indemnification and middleware.\r
+\r
+ http://www.SafeRTOS.com - High Integrity Systems also provide a safety\r
+ engineered and independently SIL3 certified version for use in safety and\r
mission critical applications that require provable dependability.\r
+\r
+ 1 tab == 4 spaces!\r
*/\r
\r
#ifndef FREERTOS_CONFIG_H\r
/*\r
- FreeRTOS V7.5.3 - Copyright (C) 2013 Real Time Engineers Ltd. \r
+ FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. \r
All rights reserved\r
\r
- FEATURES AND PORTS ARE ADDED TO FREERTOS ALL THE TIME. PLEASE VISIT\r
- http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
+ VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
\r
***************************************************************************\r
* *\r
- * FreeRTOS tutorial books are available in pdf and paperback. *\r
- * Complete, revised, and edited pdf reference manuals are also *\r
- * available. *\r
+ * FreeRTOS provides completely free yet professionally developed, *\r
+ * robust, strictly quality controlled, supported, and cross *\r
+ * platform software that has become a de facto standard. *\r
* *\r
- * Purchasing FreeRTOS documentation will not only help you, by *\r
- * ensuring you get running as quickly as possible and with an *\r
- * in-depth knowledge of how to use FreeRTOS, it will also help *\r
- * the FreeRTOS project to continue with its mission of providing *\r
- * professional grade, cross platform, de facto standard solutions *\r
- * for microcontrollers - completely free of charge! *\r
+ * Help yourself get started quickly and support the FreeRTOS *\r
+ * project by purchasing a FreeRTOS tutorial book, reference *\r
+ * manual, or both from: http://www.FreeRTOS.org/Documentation *\r
* *\r
- * >>> See http://www.FreeRTOS.org/Documentation for details. <<< *\r
- * *\r
- * Thank you for using FreeRTOS, and thank you for your support! *\r
+ * Thank you! *\r
* *\r
***************************************************************************\r
\r
-\r
This file is part of the FreeRTOS distribution.\r
\r
FreeRTOS is free software; you can redistribute it and/or modify it under\r
the terms of the GNU General Public License (version 2) as published by the\r
- Free Software Foundation AND MODIFIED BY the FreeRTOS exception.\r
+ Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.\r
\r
- >>>>>>NOTE<<<<<< The modification to the GPL is included to allow you to\r
- distribute a combined work that includes FreeRTOS without being obliged to\r
- provide the source code for proprietary components outside of the FreeRTOS\r
- kernel.\r
+ >>! NOTE: The modification to the GPL is included to allow you to distribute\r
+ >>! a combined work that includes FreeRTOS without being obliged to provide\r
+ >>! the source code for proprietary components outside of the FreeRTOS\r
+ >>! kernel.\r
\r
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY\r
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\r
- FOR A PARTICULAR PURPOSE. See the GNU General Public License for more\r
- details. You should have received a copy of the GNU General Public License\r
- and the FreeRTOS license exception along with FreeRTOS; if not itcan be\r
- viewed here: http://www.freertos.org/a00114.html and also obtained by\r
- writing to Real Time Engineers Ltd., contact details for whom are available\r
- on the FreeRTOS WEB site.\r
+ FOR A PARTICULAR PURPOSE. Full license text is available from the following\r
+ link: http://www.freertos.org/a00114.html\r
\r
1 tab == 4 spaces!\r
\r
* *\r
***************************************************************************\r
\r
-\r
http://www.FreeRTOS.org - Documentation, books, training, latest versions,\r
license and Real Time Engineers Ltd. contact details.\r
\r
http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,\r
- including FreeRTOS+Trace - an indispensable productivity tool, and our new\r
- fully thread aware and reentrant UDP/IP stack.\r
+ including FreeRTOS+Trace - an indispensable productivity tool, a DOS\r
+ compatible FAT file system, and our tiny thread aware UDP/IP stack.\r
\r
http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High\r
- Integrity Systems, who sell the code with commercial support,\r
- indemnification and middleware, under the OpenRTOS brand.\r
+ Integrity Systems to sell under the OpenRTOS brand. Low cost OpenRTOS\r
+ licenses offer ticketed support, indemnification and middleware.\r
\r
http://www.SafeRTOS.com - High Integrity Systems also provide a safety\r
engineered and independently SIL3 certified version for use in safety and\r
mission critical applications that require provable dependability.\r
+\r
+ 1 tab == 4 spaces!\r
*/\r
\r
/* FreeRTOS includes. */\r
/*\r
- FreeRTOS V7.5.3 - Copyright (C) 2013 Real Time Engineers Ltd. \r
+ FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. \r
All rights reserved\r
\r
- FEATURES AND PORTS ARE ADDED TO FREERTOS ALL THE TIME. PLEASE VISIT\r
- http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
+ VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
\r
***************************************************************************\r
* *\r
- * FreeRTOS tutorial books are available in pdf and paperback. *\r
- * Complete, revised, and edited pdf reference manuals are also *\r
- * available. *\r
+ * FreeRTOS provides completely free yet professionally developed, *\r
+ * robust, strictly quality controlled, supported, and cross *\r
+ * platform software that has become a de facto standard. *\r
* *\r
- * Purchasing FreeRTOS documentation will not only help you, by *\r
- * ensuring you get running as quickly as possible and with an *\r
- * in-depth knowledge of how to use FreeRTOS, it will also help *\r
- * the FreeRTOS project to continue with its mission of providing *\r
- * professional grade, cross platform, de facto standard solutions *\r
- * for microcontrollers - completely free of charge! *\r
+ * Help yourself get started quickly and support the FreeRTOS *\r
+ * project by purchasing a FreeRTOS tutorial book, reference *\r
+ * manual, or both from: http://www.FreeRTOS.org/Documentation *\r
* *\r
- * >>> See http://www.FreeRTOS.org/Documentation for details. <<< *\r
- * *\r
- * Thank you for using FreeRTOS, and thank you for your support! *\r
+ * Thank you! *\r
* *\r
***************************************************************************\r
\r
-\r
This file is part of the FreeRTOS distribution.\r
\r
FreeRTOS is free software; you can redistribute it and/or modify it under\r
the terms of the GNU General Public License (version 2) as published by the\r
- Free Software Foundation AND MODIFIED BY the FreeRTOS exception.\r
+ Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.\r
\r
- >>>>>>NOTE<<<<<< The modification to the GPL is included to allow you to\r
- distribute a combined work that includes FreeRTOS without being obliged to\r
- provide the source code for proprietary components outside of the FreeRTOS\r
- kernel.\r
+ >>! NOTE: The modification to the GPL is included to allow you to distribute\r
+ >>! a combined work that includes FreeRTOS without being obliged to provide\r
+ >>! the source code for proprietary components outside of the FreeRTOS\r
+ >>! kernel.\r
\r
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY\r
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\r
- FOR A PARTICULAR PURPOSE. See the GNU General Public License for more\r
- details. You should have received a copy of the GNU General Public License\r
- and the FreeRTOS license exception along with FreeRTOS; if not itcan be\r
- viewed here: http://www.freertos.org/a00114.html and also obtained by\r
- writing to Real Time Engineers Ltd., contact details for whom are available\r
- on the FreeRTOS WEB site.\r
+ FOR A PARTICULAR PURPOSE. Full license text is available from the following\r
+ link: http://www.freertos.org/a00114.html\r
\r
1 tab == 4 spaces!\r
\r
* *\r
***************************************************************************\r
\r
-\r
http://www.FreeRTOS.org - Documentation, books, training, latest versions,\r
license and Real Time Engineers Ltd. contact details.\r
\r
http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,\r
- including FreeRTOS+Trace - an indispensable productivity tool, and our new\r
- fully thread aware and reentrant UDP/IP stack.\r
+ including FreeRTOS+Trace - an indispensable productivity tool, a DOS\r
+ compatible FAT file system, and our tiny thread aware UDP/IP stack.\r
\r
http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High\r
- Integrity Systems, who sell the code with commercial support,\r
- indemnification and middleware, under the OpenRTOS brand.\r
+ Integrity Systems to sell under the OpenRTOS brand. Low cost OpenRTOS\r
+ licenses offer ticketed support, indemnification and middleware.\r
\r
http://www.SafeRTOS.com - High Integrity Systems also provide a safety\r
engineered and independently SIL3 certified version for use in safety and\r
mission critical applications that require provable dependability.\r
+\r
+ 1 tab == 4 spaces!\r
*/\r
\r
/*******************************************************************************\r
/*\r
- FreeRTOS V7.5.3 - Copyright (C) 2013 Real Time Engineers Ltd. \r
+ FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. \r
All rights reserved\r
\r
- FEATURES AND PORTS ARE ADDED TO FREERTOS ALL THE TIME. PLEASE VISIT\r
- http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
+ VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
\r
***************************************************************************\r
* *\r
- * FreeRTOS tutorial books are available in pdf and paperback. *\r
- * Complete, revised, and edited pdf reference manuals are also *\r
- * available. *\r
+ * FreeRTOS provides completely free yet professionally developed, *\r
+ * robust, strictly quality controlled, supported, and cross *\r
+ * platform software that has become a de facto standard. *\r
* *\r
- * Purchasing FreeRTOS documentation will not only help you, by *\r
- * ensuring you get running as quickly as possible and with an *\r
- * in-depth knowledge of how to use FreeRTOS, it will also help *\r
- * the FreeRTOS project to continue with its mission of providing *\r
- * professional grade, cross platform, de facto standard solutions *\r
- * for microcontrollers - completely free of charge! *\r
+ * Help yourself get started quickly and support the FreeRTOS *\r
+ * project by purchasing a FreeRTOS tutorial book, reference *\r
+ * manual, or both from: http://www.FreeRTOS.org/Documentation *\r
* *\r
- * >>> See http://www.FreeRTOS.org/Documentation for details. <<< *\r
- * *\r
- * Thank you for using FreeRTOS, and thank you for your support! *\r
+ * Thank you! *\r
* *\r
***************************************************************************\r
\r
-\r
This file is part of the FreeRTOS distribution.\r
\r
FreeRTOS is free software; you can redistribute it and/or modify it under\r
the terms of the GNU General Public License (version 2) as published by the\r
- Free Software Foundation AND MODIFIED BY the FreeRTOS exception.\r
+ Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.\r
\r
- >>>>>>NOTE<<<<<< The modification to the GPL is included to allow you to\r
- distribute a combined work that includes FreeRTOS without being obliged to\r
- provide the source code for proprietary components outside of the FreeRTOS\r
- kernel.\r
+ >>! NOTE: The modification to the GPL is included to allow you to distribute\r
+ >>! a combined work that includes FreeRTOS without being obliged to provide\r
+ >>! the source code for proprietary components outside of the FreeRTOS\r
+ >>! kernel.\r
\r
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY\r
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\r
- FOR A PARTICULAR PURPOSE. See the GNU General Public License for more\r
- details. You should have received a copy of the GNU General Public License\r
- and the FreeRTOS license exception along with FreeRTOS; if not itcan be\r
- viewed here: http://www.freertos.org/a00114.html and also obtained by\r
- writing to Real Time Engineers Ltd., contact details for whom are available\r
- on the FreeRTOS WEB site.\r
+ FOR A PARTICULAR PURPOSE. Full license text is available from the following\r
+ link: http://www.freertos.org/a00114.html\r
\r
1 tab == 4 spaces!\r
\r
* *\r
***************************************************************************\r
\r
-\r
- http://www.FreeRTOS.org - Documentation, books, training, latest versions, \r
+ http://www.FreeRTOS.org - Documentation, books, training, latest versions,\r
license and Real Time Engineers Ltd. contact details.\r
\r
http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,\r
- including FreeRTOS+Trace - an indispensable productivity tool, and our new\r
- fully thread aware and reentrant UDP/IP stack.\r
-\r
- http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High \r
- Integrity Systems, who sell the code with commercial support, \r
- indemnification and middleware, under the OpenRTOS brand.\r
- \r
- http://www.SafeRTOS.com - High Integrity Systems also provide a safety \r
- engineered and independently SIL3 certified version for use in safety and \r
+ including FreeRTOS+Trace - an indispensable productivity tool, a DOS\r
+ compatible FAT file system, and our tiny thread aware UDP/IP stack.\r
+\r
+ http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High\r
+ Integrity Systems to sell under the OpenRTOS brand. Low cost OpenRTOS\r
+ licenses offer ticketed support, indemnification and middleware.\r
+\r
+ http://www.SafeRTOS.com - High Integrity Systems also provide a safety\r
+ engineered and independently SIL3 certified version for use in safety and\r
mission critical applications that require provable dependability.\r
+\r
+ 1 tab == 4 spaces!\r
*/\r
\r
/*\r
/*\r
- FreeRTOS V7.5.3 - Copyright (C) 2013 Real Time Engineers Ltd. \r
+ FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. \r
All rights reserved\r
\r
- FEATURES AND PORTS ARE ADDED TO FREERTOS ALL THE TIME. PLEASE VISIT\r
- http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
+ VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
\r
***************************************************************************\r
* *\r
- * FreeRTOS tutorial books are available in pdf and paperback. *\r
- * Complete, revised, and edited pdf reference manuals are also *\r
- * available. *\r
+ * FreeRTOS provides completely free yet professionally developed, *\r
+ * robust, strictly quality controlled, supported, and cross *\r
+ * platform software that has become a de facto standard. *\r
* *\r
- * Purchasing FreeRTOS documentation will not only help you, by *\r
- * ensuring you get running as quickly as possible and with an *\r
- * in-depth knowledge of how to use FreeRTOS, it will also help *\r
- * the FreeRTOS project to continue with its mission of providing *\r
- * professional grade, cross platform, de facto standard solutions *\r
- * for microcontrollers - completely free of charge! *\r
+ * Help yourself get started quickly and support the FreeRTOS *\r
+ * project by purchasing a FreeRTOS tutorial book, reference *\r
+ * manual, or both from: http://www.FreeRTOS.org/Documentation *\r
* *\r
- * >>> See http://www.FreeRTOS.org/Documentation for details. <<< *\r
- * *\r
- * Thank you for using FreeRTOS, and thank you for your support! *\r
+ * Thank you! *\r
* *\r
***************************************************************************\r
\r
-\r
This file is part of the FreeRTOS distribution.\r
\r
FreeRTOS is free software; you can redistribute it and/or modify it under\r
the terms of the GNU General Public License (version 2) as published by the\r
- Free Software Foundation AND MODIFIED BY the FreeRTOS exception.\r
+ Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.\r
\r
- >>>>>>NOTE<<<<<< The modification to the GPL is included to allow you to\r
- distribute a combined work that includes FreeRTOS without being obliged to\r
- provide the source code for proprietary components outside of the FreeRTOS\r
- kernel.\r
+ >>! NOTE: The modification to the GPL is included to allow you to distribute\r
+ >>! a combined work that includes FreeRTOS without being obliged to provide\r
+ >>! the source code for proprietary components outside of the FreeRTOS\r
+ >>! kernel.\r
\r
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY\r
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\r
- FOR A PARTICULAR PURPOSE. See the GNU General Public License for more\r
- details. You should have received a copy of the GNU General Public License\r
- and the FreeRTOS license exception along with FreeRTOS; if not itcan be\r
- viewed here: http://www.freertos.org/a00114.html and also obtained by\r
- writing to Real Time Engineers Ltd., contact details for whom are available\r
- on the FreeRTOS WEB site.\r
+ FOR A PARTICULAR PURPOSE. Full license text is available from the following\r
+ link: http://www.freertos.org/a00114.html\r
\r
1 tab == 4 spaces!\r
\r
* *\r
***************************************************************************\r
\r
-\r
- http://www.FreeRTOS.org - Documentation, books, training, latest versions, \r
+ http://www.FreeRTOS.org - Documentation, books, training, latest versions,\r
license and Real Time Engineers Ltd. contact details.\r
\r
http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,\r
- including FreeRTOS+Trace - an indispensable productivity tool, and our new\r
- fully thread aware and reentrant UDP/IP stack.\r
-\r
- http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High \r
- Integrity Systems, who sell the code with commercial support, \r
- indemnification and middleware, under the OpenRTOS brand.\r
- \r
- http://www.SafeRTOS.com - High Integrity Systems also provide a safety \r
- engineered and independently SIL3 certified version for use in safety and \r
+ including FreeRTOS+Trace - an indispensable productivity tool, a DOS\r
+ compatible FAT file system, and our tiny thread aware UDP/IP stack.\r
+\r
+ http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High\r
+ Integrity Systems to sell under the OpenRTOS brand. Low cost OpenRTOS\r
+ licenses offer ticketed support, indemnification and middleware.\r
+\r
+ http://www.SafeRTOS.com - High Integrity Systems also provide a safety\r
+ engineered and independently SIL3 certified version for use in safety and\r
mission critical applications that require provable dependability.\r
+\r
+ 1 tab == 4 spaces!\r
*/\r
\r
/******************************************************************************\r
/*\r
- FreeRTOS V7.5.3 - Copyright (C) 2013 Real Time Engineers Ltd. \r
+ FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. \r
All rights reserved\r
\r
- FEATURES AND PORTS ARE ADDED TO FREERTOS ALL THE TIME. PLEASE VISIT\r
- http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
+ VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
\r
***************************************************************************\r
* *\r
- * FreeRTOS tutorial books are available in pdf and paperback. *\r
- * Complete, revised, and edited pdf reference manuals are also *\r
- * available. *\r
+ * FreeRTOS provides completely free yet professionally developed, *\r
+ * robust, strictly quality controlled, supported, and cross *\r
+ * platform software that has become a de facto standard. *\r
* *\r
- * Purchasing FreeRTOS documentation will not only help you, by *\r
- * ensuring you get running as quickly as possible and with an *\r
- * in-depth knowledge of how to use FreeRTOS, it will also help *\r
- * the FreeRTOS project to continue with its mission of providing *\r
- * professional grade, cross platform, de facto standard solutions *\r
- * for microcontrollers - completely free of charge! *\r
+ * Help yourself get started quickly and support the FreeRTOS *\r
+ * project by purchasing a FreeRTOS tutorial book, reference *\r
+ * manual, or both from: http://www.FreeRTOS.org/Documentation *\r
* *\r
- * >>> See http://www.FreeRTOS.org/Documentation for details. <<< *\r
- * *\r
- * Thank you for using FreeRTOS, and thank you for your support! *\r
+ * Thank you! *\r
* *\r
***************************************************************************\r
\r
-\r
This file is part of the FreeRTOS distribution.\r
\r
FreeRTOS is free software; you can redistribute it and/or modify it under\r
the terms of the GNU General Public License (version 2) as published by the\r
- Free Software Foundation AND MODIFIED BY the FreeRTOS exception.\r
+ Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.\r
\r
- >>>>>>NOTE<<<<<< The modification to the GPL is included to allow you to\r
- distribute a combined work that includes FreeRTOS without being obliged to\r
- provide the source code for proprietary components outside of the FreeRTOS\r
- kernel.\r
+ >>! NOTE: The modification to the GPL is included to allow you to distribute\r
+ >>! a combined work that includes FreeRTOS without being obliged to provide\r
+ >>! the source code for proprietary components outside of the FreeRTOS\r
+ >>! kernel.\r
\r
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY\r
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\r
- FOR A PARTICULAR PURPOSE. See the GNU General Public License for more\r
- details. You should have received a copy of the GNU General Public License\r
- and the FreeRTOS license exception along with FreeRTOS; if not itcan be\r
- viewed here: http://www.freertos.org/a00114.html and also obtained by\r
- writing to Real Time Engineers Ltd., contact details for whom are available\r
- on the FreeRTOS WEB site.\r
+ FOR A PARTICULAR PURPOSE. Full license text is available from the following\r
+ link: http://www.freertos.org/a00114.html\r
\r
1 tab == 4 spaces!\r
\r
* *\r
***************************************************************************\r
\r
-\r
http://www.FreeRTOS.org - Documentation, books, training, latest versions,\r
license and Real Time Engineers Ltd. contact details.\r
\r
http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,\r
- including FreeRTOS+Trace - an indispensable productivity tool, and our new\r
- fully thread aware and reentrant UDP/IP stack.\r
+ including FreeRTOS+Trace - an indispensable productivity tool, a DOS\r
+ compatible FAT file system, and our tiny thread aware UDP/IP stack.\r
\r
http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High\r
- Integrity Systems, who sell the code with commercial support,\r
- indemnification and middleware, under the OpenRTOS brand.\r
+ Integrity Systems to sell under the OpenRTOS brand. Low cost OpenRTOS\r
+ licenses offer ticketed support, indemnification and middleware.\r
\r
http://www.SafeRTOS.com - High Integrity Systems also provide a safety\r
engineered and independently SIL3 certified version for use in safety and\r
mission critical applications that require provable dependability.\r
+\r
+ 1 tab == 4 spaces!\r
*/\r
\r
\r
/*\r
- FreeRTOS V7.5.3 - Copyright (C) 2013 Real Time Engineers Ltd. \r
+ FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. \r
All rights reserved\r
\r
- FEATURES AND PORTS ARE ADDED TO FREERTOS ALL THE TIME. PLEASE VISIT\r
- http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
+ VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
\r
***************************************************************************\r
* *\r
- * FreeRTOS tutorial books are available in pdf and paperback. *\r
- * Complete, revised, and edited pdf reference manuals are also *\r
- * available. *\r
+ * FreeRTOS provides completely free yet professionally developed, *\r
+ * robust, strictly quality controlled, supported, and cross *\r
+ * platform software that has become a de facto standard. *\r
* *\r
- * Purchasing FreeRTOS documentation will not only help you, by *\r
- * ensuring you get running as quickly as possible and with an *\r
- * in-depth knowledge of how to use FreeRTOS, it will also help *\r
- * the FreeRTOS project to continue with its mission of providing *\r
- * professional grade, cross platform, de facto standard solutions *\r
- * for microcontrollers - completely free of charge! *\r
+ * Help yourself get started quickly and support the FreeRTOS *\r
+ * project by purchasing a FreeRTOS tutorial book, reference *\r
+ * manual, or both from: http://www.FreeRTOS.org/Documentation *\r
* *\r
- * >>> See http://www.FreeRTOS.org/Documentation for details. <<< *\r
- * *\r
- * Thank you for using FreeRTOS, and thank you for your support! *\r
+ * Thank you! *\r
* *\r
***************************************************************************\r
\r
-\r
This file is part of the FreeRTOS distribution.\r
\r
FreeRTOS is free software; you can redistribute it and/or modify it under\r
the terms of the GNU General Public License (version 2) as published by the\r
- Free Software Foundation AND MODIFIED BY the FreeRTOS exception.\r
+ Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception.\r
\r
- >>>>>>NOTE<<<<<< The modification to the GPL is included to allow you to\r
- distribute a combined work that includes FreeRTOS without being obliged to\r
- provide the source code for proprietary components outside of the FreeRTOS\r
- kernel.\r
+ >>! NOTE: The modification to the GPL is included to allow you to distribute\r
+ >>! a combined work that includes FreeRTOS without being obliged to provide\r
+ >>! the source code for proprietary components outside of the FreeRTOS\r
+ >>! kernel.\r
\r
FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY\r
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\r
- FOR A PARTICULAR PURPOSE. See the GNU General Public License for more\r
- details. You should have received a copy of the GNU General Public License\r
- and the FreeRTOS license exception along with FreeRTOS; if not itcan be\r
- viewed here: http://www.freertos.org/a00114.html and also obtained by\r
- writing to Real Time Engineers Ltd., contact details for whom are available\r
- on the FreeRTOS WEB site.\r
+ FOR A PARTICULAR PURPOSE. Full license text is available from the following\r
+ link: http://www.freertos.org/a00114.html\r
\r
1 tab == 4 spaces!\r
\r
* *\r
***************************************************************************\r
\r
-\r
http://www.FreeRTOS.org - Documentation, books, training, latest versions,\r
license and Real Time Engineers Ltd. contact details.\r
\r
http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products,\r
- including FreeRTOS+Trace - an indispensable productivity tool, and our new\r
- fully thread aware and reentrant UDP/IP stack.\r
+ including FreeRTOS+Trace - an indispensable productivity tool, a DOS\r
+ compatible FAT file system, and our tiny thread aware UDP/IP stack.\r
\r
http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High\r
- Integrity Systems, who sell the code with commercial support,\r
- indemnification and middleware, under the OpenRTOS brand.\r
+ Integrity Systems to sell under the OpenRTOS brand. Low cost OpenRTOS\r
+ licenses offer ticketed support, indemnification and middleware.\r
\r
http://www.SafeRTOS.com - High Integrity Systems also provide a safety\r
engineered and independently SIL3 certified version for use in safety and\r
mission critical applications that require provable dependability.\r
+\r
+ 1 tab == 4 spaces!\r
*/\r
\r
/******************************************************************************\r
--- /dev/null
+[InternetShortcut]\r
+URL=http://www.freertos.org/Atmel_SAM4E_RTOS_Demo.html\r
+IDList=\r
+[{000214A0-0000-0000-C000-000000000046}]\r
+Prop3=19,2\r
/*\r
- FreeRTOS V7.5.3 - Copyright (C) 2013 Real Time Engineers Ltd. \r
+ FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. \r
All rights reserved\r
\r
VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
/*\r
- FreeRTOS V7.5.3 - Copyright (C) 2013 Real Time Engineers Ltd. \r
+ FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. \r
All rights reserved\r
\r
VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
/*\r
- FreeRTOS V7.5.3 - Copyright (C) 2013 Real Time Engineers Ltd. \r
+ FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. \r
All rights reserved\r
\r
VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
/*\r
- FreeRTOS V7.5.3 - Copyright (C) 2013 Real Time Engineers Ltd. \r
+ FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. \r
All rights reserved\r
\r
VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
/*\r
- FreeRTOS V7.5.3 - Copyright (C) 2013 Real Time Engineers Ltd. \r
+ FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. \r
All rights reserved\r
\r
VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
/*\r
- FreeRTOS V7.5.3 - Copyright (C) 2013 Real Time Engineers Ltd. \r
+ FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. \r
All rights reserved\r
\r
VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
/*\r
- FreeRTOS V7.5.3 - Copyright (C) 2013 Real Time Engineers Ltd. \r
+ FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. \r
All rights reserved\r
\r
VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
/*\r
- FreeRTOS V7.5.3 - Copyright (C) 2013 Real Time Engineers Ltd. \r
+ FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. \r
All rights reserved\r
\r
VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
/*\r
- FreeRTOS V7.5.3 - Copyright (C) 2013 Real Time Engineers Ltd. \r
+ FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. \r
All rights reserved\r
\r
VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
/*\r
- FreeRTOS V7.5.3 - Copyright (C) 2013 Real Time Engineers Ltd. \r
+ FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. \r
All rights reserved\r
\r
VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
/*\r
- FreeRTOS V7.5.3 - Copyright (C) 2013 Real Time Engineers Ltd. \r
+ FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. \r
All rights reserved\r
\r
VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
/*\r
- FreeRTOS V7.5.3 - Copyright (C) 2013 Real Time Engineers Ltd. \r
+ FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. \r
All rights reserved\r
\r
VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
/*\r
- FreeRTOS V7.5.3 - Copyright (C) 2013 Real Time Engineers Ltd. \r
+ FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. \r
All rights reserved\r
\r
VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
/*\r
- FreeRTOS V7.5.3 - Copyright (C) 2013 Real Time Engineers Ltd. \r
+ FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. \r
All rights reserved\r
\r
VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
/*\r
- FreeRTOS V7.5.3 - Copyright (C) 2013 Real Time Engineers Ltd. \r
+ FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. \r
All rights reserved\r
\r
VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
/*\r
- FreeRTOS V7.5.3 - Copyright (C) 2013 Real Time Engineers Ltd. \r
+ FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. \r
All rights reserved\r
\r
VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
/*\r
- FreeRTOS V7.5.3 - Copyright (C) 2013 Real Time Engineers Ltd. \r
+ FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. \r
All rights reserved\r
\r
VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r
/*\r
- FreeRTOS V7.5.3 - Copyright (C) 2013 Real Time Engineers Ltd. \r
+ FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. \r
All rights reserved\r
\r
VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.\r