File tree Expand file tree Collapse file tree
UsbSerialForAndroid/driver Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -28,7 +28,21 @@ public STM32SerialDriver(UsbDevice device)
2828 mPort = new STM32SerialPort ( mDevice , 0 , this ) ;
2929 }
3030
31- public class STM32SerialPort : CommonUsbSerialPort
31+ public static Dictionary < int , int [ ] > GetSupportedDevices ( )
32+ {
33+ return new Dictionary < int , int [ ] >
34+ {
35+ {
36+ UsbId . VENDOR_STM , new int [ ]
37+ {
38+ UsbId . STM32_STLINK ,
39+ UsbId . STM32_VCOM
40+ }
41+ }
42+ } ;
43+ }
44+
45+ public class STM32SerialPort : CommonUsbSerialPort
3246 {
3347 readonly string TAG = nameof ( STM32SerialDriver ) ;
3448
@@ -292,20 +306,6 @@ void SetDtrRts()
292306 int value = ( mRts ? 0x2 : 0 ) | ( mDtr ? 0x1 : 0 ) ;
293307 SendAcmControlMessage ( SET_CONTROL_LINE_STATE , value , null ) ;
294308 }
295-
296- public static Dictionary < int , int [ ] > GetSupportedDevices ( )
297- {
298- return new Dictionary < int , int [ ] >
299- {
300- {
301- UsbId . VENDOR_STM , new int [ ]
302- {
303- UsbId . STM32_STLINK ,
304- UsbId . STM32_VCOM
305- }
306- }
307- } ;
308- }
309309 }
310310 }
311311}
Original file line number Diff line number Diff line change @@ -46,6 +46,7 @@ public static ProbeTable GetDefaultProbeTable()
4646 probeTable . AddDriver ( typeof ( FtdiSerialDriver ) ) ;
4747 probeTable . AddDriver ( typeof ( ProlificSerialDriver ) ) ;
4848 probeTable . AddDriver ( typeof ( Ch34xSerialDriver ) ) ;
49+ probeTable . AddDriver ( typeof ( STM32SerialDriver ) ) ;
4950 return probeTable ;
5051 }
5152
You can’t perform that action at this time.
0 commit comments