38
38
39
39
40
40
MAX_COMPOSITE_DEVICE_SUBDEVICES = 5
41
- MBED_STORAGE_DEVICE_VENDOR_STRINGS = ['ven_mbed' , 'ven_segger' , 'ven_arm_v2m' ]
41
+ MBED_STORAGE_DEVICE_VENDOR_STRINGS = ['ven_mbed' , 'ven_segger' , 'ven_arm_v2m' , 'ven_nxp' ]
42
42
43
43
44
44
def _get_values_with_numeric_keys (reg_key ):
@@ -54,7 +54,6 @@ def _get_values_with_numeric_keys(reg_key):
54
54
continue
55
55
except OSError :
56
56
logger .debug ('Failed to iterate over all keys' )
57
- pass
58
57
59
58
return result
60
59
@@ -89,7 +88,7 @@ def _get_cached_mounted_points():
89
88
mount_point_match = re .match ('.*\\ \\ (.:)$' , v [0 ])
90
89
91
90
if not mount_point_match :
92
- logger .debug ('Invalid disk pattern for entry %s, skipping' % v [0 ])
91
+ logger .debug ('Invalid disk pattern for entry %s, skipping' , v [0 ])
93
92
continue
94
93
95
94
mount_point = mount_point_match .group (1 )
@@ -163,7 +162,6 @@ def _determine_valid_non_composite_devices(devices, target_id_usb_id_mount_point
163
162
164
163
return candidates
165
164
166
-
167
165
def _determine_subdevice_capability (key ):
168
166
try :
169
167
type = None
@@ -178,14 +176,10 @@ def _determine_subdevice_capability(key):
178
176
return 'msd'
179
177
elif 'usb\\ class_02' in compatible_ids :
180
178
return 'serial'
181
- elif 'usb\\ class_03' in compatible_ids or 'usb\\ class_ff' in compatible_ids :
182
- return 'debug'
183
179
else :
184
180
logger .debug ('Unknown capabilities from the following ids: %s' , compatible_ids )
185
181
return None
186
182
187
-
188
-
189
183
# =============================== Start Registry Functions ====================================
190
184
191
185
def _iter_keys_as_str (key ):
@@ -194,14 +188,12 @@ def _iter_keys_as_str(key):
194
188
for i in range (winreg .QueryInfoKey (key )[0 ]):
195
189
yield winreg .EnumKey (key , i )
196
190
197
-
198
191
def _iter_keys (key ):
199
192
"""! Iterate over subkeys of a key
200
193
"""
201
194
for i in range (winreg .QueryInfoKey (key )[0 ]):
202
195
yield winreg .OpenKey (key , winreg .EnumKey (key , i ))
203
196
204
-
205
197
def _iter_vals (key ):
206
198
"""! Iterate over values of a key
207
199
"""
@@ -220,8 +212,6 @@ class MbedLsToolsWin7(MbedLsToolsBase):
220
212
""" mbed-enabled platform detection for Windows
221
213
"""
222
214
223
- _COMPOSITE_USB_SERVICES = ['usbccgp' , 'mbedComposite' ]
224
-
225
215
def __init__ (self , ** kwargs ):
226
216
MbedLsToolsBase .__init__ (self , ** kwargs )
227
217
self .os_supported .append ('Windows7' )
0 commit comments