This page describes the optional FreeRTOS_CLIGetOutputBuffer() function.
Command interpreter implementations require an output buffer that is used
to hold any output generated by running a command.
If FreeRTOS+CLI is
used to implement a single command interpreter interface, the output
buffer can be defined locally to the task or file that that executes
If FreeRTOS+CLI is used to implement a command interpreter on multiple
interfaces, a UART and a TCP/IP socket for example, then both interfaces
could provide their own output buffers in the same manner.
However, if only one of the interfaces
is going to be used at a time, then RAM can be saved by having both
interfaces share a single output buffer. FreeRTOS_CLIGetOutputBuffer()
is provided to make this easier.
FreeRTOS_CLIGetOutputBuffer() does nothing more than return the address
of an output buffer that is declared within the FreeRTOS+CLI code - removing the
need for command interface implementations to declare their own.
The size of the buffer is defined by the configCOMMAND_INT_MAX_OUTPUT_SIZE
constant, which should be defined in FreeRTOSConfig.h whenever FreeRTOS+CLI
configCOMMAND_INT_MAX_OUTPUT_SIZE should be set to 1 to minimise RAM usage
if all command interpreter interfaces use their own locally defined buffers,
and the FreeRTOS_CLIGetOutputBuffer() API function is not used.