mik3y / usb-serial-for-android

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

Add read(dest, length, timeout) and write(src, length, timeout) #544

Closed wh201906 closed 8 months ago

wh201906 commented 8 months ago

Sometimes the users might need to receive or send bytes with specified length in a big buffer. I think read(dest, length, timeout) and write(src, length, timeout) are very helpful for this case because they don't need to do extra trim/copy work, which saves the time and memory.

kai-morich commented 8 months ago

looks good, I will run the integration tests against this change.

wh201906 commented 8 months ago

Thanks