I am trying to use the CIO console as a debug port. I can use printf to get messages to the console and I can read from the console, but any call to getchar() results in a block until a line is read from the CIO console. Is there a way to do a non-blocking read from stdin? Or is there a non-blocking way to tell if there is anything to be read (like kbhit for the old Borland compliers)?
I have not used the CIO console in CCS, but my first suggestion would be to try the "feof(stdin)" function to determine if the end of file has been reached. I suspect that for stdin, this may not work, but it might be worth a quick try.
Othewise, I would suggest reposting this question in the Development Tools forum, either in the CCS section, or in the Compiler section.
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.