FreeRTOS Support Archive
The FreeRTOS support forum is used to obtain active support directly from Real
Time Engineers Ltd. In return for using our top quality software and services for
free, we request you play fair and do your bit to help others too! Sign up
to receive notifications of new support topics then help where you can.
This is a read only archive of threads posted to the FreeRTOS support forum.
The archive is updated every week, so will not always contain the very latest posts.
Use these archive pages to search previous posts. Use the Live FreeRTOS Forum
link to reply to a post, or start a new support thread.
[FreeRTOS Home] [Live FreeRTOS Forum] [FAQ] [Archive Top] [June 2013 Threads] Writing on the same console as the CLIPosted by Olivier Monnom on June 19, 2013 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
RE: Writing on the same console as the CLIPosted by Richard on June 19, 2013 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-Plus\Demo\FreeRTOS_Plus_UDP_and_CLI_LPC1830_GCC\Examples\USB_CDC\CDCCommandConsole.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.
RE: Writing on the same console as the CLIPosted by Olivier Monnom on July 5, 2013 Thank you Richard. Olivier
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|