Skip to content

Commit cdc73d2

Browse files
committed
Adding NXP vendor string, removing and cleaning unused code
1 parent 6a0265d commit cdc73d2

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

mbed_lstools/windows.py

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838

3939

4040
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']
4242

4343

4444
def _get_values_with_numeric_keys(reg_key):
@@ -54,7 +54,6 @@ def _get_values_with_numeric_keys(reg_key):
5454
continue
5555
except OSError:
5656
logger.debug('Failed to iterate over all keys')
57-
pass
5857

5958
return result
6059

@@ -89,7 +88,7 @@ def _get_cached_mounted_points():
8988
mount_point_match = re.match('.*\\\\(.:)$', v[0])
9089

9190
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])
9392
continue
9493

9594
mount_point = mount_point_match.group(1)
@@ -163,7 +162,6 @@ def _determine_valid_non_composite_devices(devices, target_id_usb_id_mount_point
163162

164163
return candidates
165164

166-
167165
def _determine_subdevice_capability(key):
168166
try:
169167
type = None
@@ -178,14 +176,10 @@ def _determine_subdevice_capability(key):
178176
return 'msd'
179177
elif 'usb\\class_02' in compatible_ids:
180178
return 'serial'
181-
elif 'usb\\class_03' in compatible_ids or 'usb\\class_ff' in compatible_ids:
182-
return 'debug'
183179
else:
184180
logger.debug('Unknown capabilities from the following ids: %s', compatible_ids)
185181
return None
186182

187-
188-
189183
# =============================== Start Registry Functions ====================================
190184

191185
def _iter_keys_as_str(key):
@@ -194,14 +188,12 @@ def _iter_keys_as_str(key):
194188
for i in range(winreg.QueryInfoKey(key)[0]):
195189
yield winreg.EnumKey(key, i)
196190

197-
198191
def _iter_keys(key):
199192
"""! Iterate over subkeys of a key
200193
"""
201194
for i in range(winreg.QueryInfoKey(key)[0]):
202195
yield winreg.OpenKey(key, winreg.EnumKey(key, i))
203196

204-
205197
def _iter_vals(key):
206198
"""! Iterate over values of a key
207199
"""
@@ -220,8 +212,6 @@ class MbedLsToolsWin7(MbedLsToolsBase):
220212
""" mbed-enabled platform detection for Windows
221213
"""
222214

223-
_COMPOSITE_USB_SERVICES = ['usbccgp', 'mbedComposite']
224-
225215
def __init__(self, **kwargs):
226216
MbedLsToolsBase.__init__(self, **kwargs)
227217
self.os_supported.append('Windows7')

0 commit comments

Comments
 (0)