X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=FreeRTOS-Plus%2FDemo%2FFreeRTOS_Plus_FAT_SL_and_CLI_Windows_Simulator%2FFile-Releated-CLI-commands.c;h=56af1d384c7dbf49d65c42a4908163397b54c663;hb=48e98aaea6c09bdfdf2c260f1d54069df69cccaa;hp=7a6445ab381a653b75d8740286567b1342e93e90;hpb=c834d9e46782961951dad8bd60fd8256e7ea3147;p=freertos diff --git a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_FAT_SL_and_CLI_Windows_Simulator/File-Releated-CLI-commands.c b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_FAT_SL_and_CLI_Windows_Simulator/File-Releated-CLI-commands.c index 7a6445ab3..56af1d384 100644 --- a/FreeRTOS-Plus/Demo/FreeRTOS_Plus_FAT_SL_and_CLI_Windows_Simulator/File-Releated-CLI-commands.c +++ b/FreeRTOS-Plus/Demo/FreeRTOS_Plus_FAT_SL_and_CLI_Windows_Simulator/File-Releated-CLI-commands.c @@ -1,60 +1,64 @@ /* - FreeRTOS V7.6.0 - Copyright (C) 2013 Real Time Engineers Ltd. + FreeRTOS V8.2.0 - Copyright (C) 2015 Real Time Engineers Ltd. All rights reserved VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION. - *************************************************************************** - * * - * FreeRTOS provides completely free yet professionally developed, * - * robust, strictly quality controlled, supported, and cross * - * platform software that has become a de facto standard. * - * * - * Help yourself get started quickly and support the FreeRTOS * - * project by purchasing a FreeRTOS tutorial book, reference * - * manual, or both from: http://www.FreeRTOS.org/Documentation * - * * - * Thank you! * - * * - *************************************************************************** - This file is part of the FreeRTOS distribution. FreeRTOS is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License (version 2) as published by the Free Software Foundation >>!AND MODIFIED BY!<< the FreeRTOS exception. - >>! NOTE: The modification to the GPL is included to allow you to distribute - >>! a combined work that includes FreeRTOS without being obliged to provide - >>! the source code for proprietary components outside of the FreeRTOS - >>! kernel. + *************************************************************************** + >>! NOTE: The modification to the GPL is included to allow you to !<< + >>! distribute a combined work that includes FreeRTOS without being !<< + >>! obliged to provide the source code for proprietary components !<< + >>! outside of the FreeRTOS kernel. !<< + *************************************************************************** FreeRTOS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - FOR A PARTICULAR PURPOSE. Full license text is available from the following + FOR A PARTICULAR PURPOSE. Full license text is available on the following link: http://www.freertos.org/a00114.html - 1 tab == 4 spaces! - *************************************************************************** * * - * Having a problem? Start by reading the FAQ "My application does * - * not run, what could be wrong?" * + * FreeRTOS provides completely free yet professionally developed, * + * robust, strictly quality controlled, supported, and cross * + * platform software that is more than just the market leader, it * + * is the industry's de facto standard. * * * - * http://www.FreeRTOS.org/FAQHelp.html * + * Help yourself get started quickly while simultaneously helping * + * to support the FreeRTOS project by purchasing a FreeRTOS * + * tutorial book, reference manual, or both: * + * http://www.FreeRTOS.org/Documentation * * * *************************************************************************** - http://www.FreeRTOS.org - Documentation, books, training, latest versions, - license and Real Time Engineers Ltd. contact details. + http://www.FreeRTOS.org/FAQHelp.html - Having a problem? Start by reading + the FAQ page "My application does not run, what could be wrong?". Have you + defined configASSERT()? + + http://www.FreeRTOS.org/support - In return for receiving this top quality + embedded software for free we request you assist our global community by + participating in the support forum. + + http://www.FreeRTOS.org/training - Investing in training allows your team to + be as productive as possible as early as possible. Now you can receive + FreeRTOS training directly from Richard Barry, CEO of Real Time Engineers + Ltd, and the world's leading authority on the world's leading RTOS. http://www.FreeRTOS.org/plus - A selection of FreeRTOS ecosystem products, including FreeRTOS+Trace - an indispensable productivity tool, a DOS compatible FAT file system, and our tiny thread aware UDP/IP stack. - http://www.OpenRTOS.com - Real Time Engineers ltd license FreeRTOS to High - Integrity Systems to sell under the OpenRTOS brand. Low cost OpenRTOS - licenses offer ticketed support, indemnification and middleware. + http://www.FreeRTOS.org/labs - Where new FreeRTOS products go to incubate. + Come and try FreeRTOS+TCP, our new open source TCP/IP stack for FreeRTOS. + + http://www.OpenRTOS.com - Real Time Engineers ltd. license FreeRTOS to High + Integrity Systems ltd. to sell under the OpenRTOS brand. Low cost OpenRTOS + licenses offer ticketed support, indemnification and commercial middleware. http://www.SafeRTOS.com - High Integrity Systems also provide a safety engineered and independently SIL3 certified version for use in safety and @@ -99,7 +103,7 @@ static void prvCreateFileInfoString( char *pcBuffer, F_FIND *pxFindStruct ); /* * Copies an existing file into a newly created file. */ -static portBASE_TYPE prvPerformCopy( const char *pcSourceFile, +static BaseType_t prvPerformCopy( const char *pcSourceFile, int32_t lSourceFileLength, const char *pcDestinationFile, char *pxWriteBuffer, @@ -108,32 +112,32 @@ static portBASE_TYPE prvPerformCopy( const char *pcSourceFile, /* * Implements the DIR command. */ -static portBASE_TYPE prvDIRCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ); +static BaseType_t prvDIRCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ); /* * Implements the CD command. */ -static portBASE_TYPE prvCDCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ); +static BaseType_t prvCDCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ); /* * Implements the DEL command. */ -static portBASE_TYPE prvDELCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ); +static BaseType_t prvDELCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ); /* * Implements the TYPE command. */ -static portBASE_TYPE prvTYPECommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ); +static BaseType_t prvTYPECommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ); /* * Implements the COPY command. */ -static portBASE_TYPE prvCOPYCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ); +static BaseType_t prvCOPYCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ); /* * Implements the TEST command. */ -static portBASE_TYPE prvTESTFSCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ); +static BaseType_t prvTESTFSCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ); /* Structure that defines the DIR command line command, which lists all the files in the current directory. */ @@ -207,10 +211,10 @@ void vRegisterFileSystemCLICommands( void ) } /*-----------------------------------------------------------*/ -static portBASE_TYPE prvTYPECommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ) +static BaseType_t prvTYPECommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ) { const char *pcParameter; -portBASE_TYPE xParameterStringLength, xReturn = pdTRUE; +BaseType_t xParameterStringLength, xReturn = pdTRUE; static F_FILE *pxFile = NULL; int iChar; size_t xByte; @@ -281,10 +285,10 @@ size_t xColumns = 50U; } /*-----------------------------------------------------------*/ -static portBASE_TYPE prvCDCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ) +static BaseType_t prvCDCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ) { const char *pcParameter; -portBASE_TYPE xParameterStringLength; +BaseType_t xParameterStringLength; unsigned char ucReturned; size_t xStringLength; @@ -319,11 +323,11 @@ size_t xStringLength; } /*-----------------------------------------------------------*/ -static portBASE_TYPE prvDIRCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ) +static BaseType_t prvDIRCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ) { static F_FIND *pxFindStruct = NULL; unsigned char ucReturned; -portBASE_TYPE xReturn = pdFALSE; +BaseType_t xReturn = pdFALSE; /* This assumes pcWriteBuffer is long enough. */ ( void ) pcCommandString; @@ -385,10 +389,10 @@ portBASE_TYPE xReturn = pdFALSE; } /*-----------------------------------------------------------*/ -static portBASE_TYPE prvDELCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ) +static BaseType_t prvDELCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ) { const char *pcParameter; -portBASE_TYPE xParameterStringLength; +BaseType_t xParameterStringLength; unsigned char ucReturned; /* This function assumes xWriteBufferLen is large enough! */ @@ -423,9 +427,9 @@ unsigned char ucReturned; } /*-----------------------------------------------------------*/ -static portBASE_TYPE prvTESTFSCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ) +static BaseType_t prvTESTFSCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ) { -unsigned portBASE_TYPE uxOriginalPriority; +UBaseType_t uxOriginalPriority; /* Avoid compiler warnings. */ ( void ) xWriteBufferLen; @@ -450,11 +454,11 @@ unsigned portBASE_TYPE uxOriginalPriority; } /*-----------------------------------------------------------*/ -static portBASE_TYPE prvCOPYCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ) +static BaseType_t prvCOPYCommand( char *pcWriteBuffer, size_t xWriteBufferLen, const char *pcCommandString ) { char *pcSourceFile; const char *pcDestinationFile; -portBASE_TYPE xParameterStringLength; +BaseType_t xParameterStringLength; long lSourceLength, lDestinationLength = 0; /* Obtain the name of the destination file. */ @@ -520,7 +524,7 @@ long lSourceLength, lDestinationLength = 0; } /*-----------------------------------------------------------*/ -static portBASE_TYPE prvPerformCopy( const char *pcSourceFile, +static BaseType_t prvPerformCopy( const char *pcSourceFile, int32_t lSourceFileLength, const char *pcDestinationFile, char *pxWriteBuffer, @@ -528,7 +532,7 @@ static portBASE_TYPE prvPerformCopy( const char *pcSourceFile, { int32_t lBytesRead = 0, lBytesToRead, lBytesRemaining; F_FILE *pxFile; -portBASE_TYPE xReturn = pdPASS; +BaseType_t xReturn = pdPASS; /* NOTE: Error handling has been omitted for clarity. */