mirror of
https://github.com/mik3y/usb-serial-for-android.git
synced 2026-08-11 08:22:52 +00:00
probe CDC devices by USB interface types instead of fixed VID+PID
- no more custom prober required for standard CDC devices - legacy (singleInterface) CDC devices still have to be added by VID+PID - for autostart VID+PID still have to be added to device_filter.xml
This commit is contained in:
+3
-2
@@ -1,6 +1,6 @@
|
||||
package com.hoho.android.usbserial.examples;
|
||||
|
||||
import com.hoho.android.usbserial.driver.CdcAcmSerialDriver;
|
||||
import com.hoho.android.usbserial.driver.FtdiSerialDriver;
|
||||
import com.hoho.android.usbserial.driver.ProbeTable;
|
||||
import com.hoho.android.usbserial.driver.UsbSerialProber;
|
||||
|
||||
@@ -14,7 +14,8 @@ class CustomProber {
|
||||
|
||||
static UsbSerialProber getCustomProber() {
|
||||
ProbeTable customTable = new ProbeTable();
|
||||
customTable.addProduct(0x16d0, 0x087e, CdcAcmSerialDriver.class); // e.g. Digispark CDC
|
||||
customTable.addProduct(0x1234, 0x0001, FtdiSerialDriver.class); // e.g. device with custom VID+PID
|
||||
customTable.addProduct(0x1234, 0x0002, FtdiSerialDriver.class); // e.g. device with custom VID+PID
|
||||
return new UsbSerialProber(customTable);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user