mik3y / usb-serial-for-android

Android USB host serial driver library for CDC, FTDI, Arduino and other devices.
MIT License
4.81k stars 1.58k forks source link

purgeHwBuffers #501

Closed mistermax80 closed 1 year ago

mistermax80 commented 1 year ago

I use the UsbDriver (Arduino I think CDC device), and so I would like to use the purgeHwBuffers, in order to clean the buffer and resync the data flow. Could you send me an advice to use the purgeHwBuffers?

Thanks so much.

kai-morich commented 1 year ago

With this function you can discard data in send/receive buffers in your serial device, but some data could already be received by your Android device, so you have to try if it really works for your purpose.

mistermax80 commented 1 year ago

Ho @kai-morich , Thanks for your job, this library It saved my Life :) Anyway I tried to use but I think this Is a Operation not supporto exeption... In driver It Is not implemented...

Do you agree?

kai-morich commented 1 year ago

Yep, not supported by CDC devices