Non-blocking reading from USB over a virtual serial port

Status
Not open for further replies.

Syrer

New member
Hi,

I'm working on a project with Teensy 2.0. In Summery, One µC need to Monitor an Application ( 4 other Teensy's + communication protocol ) and give feedback to the User on the PC via USB, This works pretty fine using the Code library: http://www.pjrc.com/teensy/usb_serial.html

Additionally, the µC mentioned above needs to read commands (+ some parameters) from the User (again via USB) and process them, but without interrupting the monitoring Task, i.e. it should be able to read commands whenever the user send some, and not waiting for commands without monitoring the Application. Is this possible using the Code library on the main page?

Best regards,
Syrer

EDIT1: I think i should have posted this in the Project Guidance Forum :rolleyes:, sorry about that
 
Last edited:
From that page:

The next byte is returned (0 to 255), or -1 if an error or timeout occurs. If you wish to avoid waiting, usb_serial_available() should be called to verify at least 1 character is buffered so this function will return immediately.
 
Ouch, that was somehow a hurried thoughtlessly question :eek:
Thank you for your answer, and many many thanks for the GREAT Support in general :)

Best regards,
Syrer
 
Status
Not open for further replies.
Back
Top