Writing on the same console as the CLI

Hi,
I use FreeRTOS-CLI with success (channel is serial line). Now I want to write on the output from one of my task.
Is it possible? Or CLI has the exclusivity of the channel? Regards, Olivier

Writing on the same console as the CLI

If you can guarantee that only one thing will try and access the serial line at the same time then you can do it.  Otherwise you will need to guard the serial port with a mutex. Look at the file FreeRTOS-PlusDemoFreeRTOS_Plus_UDP_and_CLI_LPC1830_GCCExamplesUSB_CDCCDCCommandConsole.c for an example. In that file you will see xCDCMutex being used to ensure the command console has access to the (in this case) virtual COM port when it want to send, and a function called vOutputString() that can be called by other tasks to write to the same COM, again protected by the same xCDCMutex mutex. Regards.

Writing on the same console as the CLI

Thank you Richard.
Olivier