Frage

I just switched from a serial port connection to a usb connection. I'm using WinUSB to access the device and can sucessfully write and read data in bulk mode. My question now, is there something comparable to the serialport receivedata event? I want to listen to a uController and perform actions whenever it sends something. What is the common way to do that?

War es hilfreich?

Lösung

Since USB is all host driven you will need to ask for any data that you want to received. You will want to have a thread that does nothing but as for the bulk IN transactions from the device and buffers them up in your application. Then as data comes in you can signal your own event in the application for whoever needs to know when data has arrived and they can pull from that buffer to process the data.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top