Allow mutex type semaphores to be given from an interrupt (not a normal thing to do - use a binary semaphore!).

Allow FreeRTOS+CLI commands to have spaces at the end without it being taken as a parameter.
This commit is contained in:
Richard Barry 2012-09-05 14:02:16 +00:00
parent c0de8c984c
commit 48a307ff5f
3 changed files with 31 additions and 21 deletions

View file

@ -152,7 +152,7 @@ size_t xCommandStringLength;
pcRegisteredCommandString = pxCommand->pxCommandLineDefinition->pcCommand;
xCommandStringLength = strlen( ( const char * ) pcRegisteredCommandString );
/* To ensure the string lengths match exactly, so as not to pick up
/* To ensure the string lengths match exactly, so as not to pick up
a sub-string of a longer command, check the byte after the expected
end of the string is either the end of the string or a space before
a parameter. */
@ -253,6 +253,11 @@ const int8_t *pcReturn = NULL;
pcCommandString++;
}
if( *pxParameterStringLength == 0 )
{
pcReturn = NULL;
}
break;
}
}