mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-08-20 18:18:32 -04:00
Add an optional global buffer to the command interpreter that can be used for command interpreter output. This removes the need for multiple output buffers to be allocated when more than one command interpreter is implemented.
This commit is contained in:
parent
cc61126025
commit
42fa20daec
2 changed files with 43 additions and 0 deletions
|
@ -91,6 +91,25 @@ portBASE_TYPE xCmdIntRegisterCommand( const xCommandLineInput * const pxCommandT
|
|||
*/
|
||||
portBASE_TYPE xCmdIntProcessCommand( const signed char * const pcCommandInput, signed char * pcWriteBuffer, size_t xWriteBufferLen );
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/*
|
||||
* A buffer into which command outputs can be written is declared in the
|
||||
* main command interpreter, rather than in the command console implementation,
|
||||
* to allow application that provide access to the command console via multiple
|
||||
* interfaces to share a buffer, and therefore save RAM. Note, however, that
|
||||
* the command interpreter itself is not re-entrant, so only one command
|
||||
* console interface can be used at any one time. For that reason, no attempt
|
||||
* is made to provide any mutual exclusion mechanism on the output buffer.
|
||||
*
|
||||
* pcCmdIntGetOutputBuffer() returns the address of the output buffer.
|
||||
*
|
||||
* uxCmdIntGetOutputBufferSizeBytes() returns the size, in bytes, of the output
|
||||
* buffer returned by pcCmdIntGetOutputBuffer();
|
||||
*/
|
||||
signed char *pcCmdIntGetOutputBuffer( void );
|
||||
unsigned portBASE_TYPE uxCmdIntGetOutputBufferSizeBytes( void );
|
||||
|
||||
#endif /* COMMAND_INTERPRETER_H */
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue