felHR85 / UsbSerial

Usb serial controller for Android
MIT License
1.82k stars 597 forks source link

Populate USB control index with interface number for CDC implementation. #374

Open satur9nine opened 3 months ago

satur9nine commented 3 months ago

This is necessary for dual UART devices like the Prolific PL2523.

For details see wIndex at https://www.beyondlogic.org/usbnutshell/usb6.shtml#SetupPacket and compare to the Linux cdc-acm.c function acm_ctrl_msg.

Tested on PL2523 and STLink V3 board. Hopefully does not break others. If so might consider ability for developer to programmatically set the index to be used.