unknown 1 周之前
父節點
當前提交
1ac0b0c255
共有 1 個文件被更改,包括 6 次插入1 次删除
  1. 6 1
      powershell/usbipd.py

+ 6 - 1
powershell/usbipd.py

@@ -15,6 +15,8 @@ def get_busid():
 
 def attach_stlink():
     busid = get_busid()
+    cmd = "usbipd bind -b " + busid
+    run(cmd)
     cmd = "usbipd attach --wsl --busid " + busid
     run(cmd)
 
@@ -32,6 +34,8 @@ def get_id(name):
 
 def attach_dev(name):
     busid = get_id(name)
+    cmd = "usbipd bind -b " + busid
+    run(cmd)
     cmd = "usbipd attach -a --wsl --busid " + busid
     run(cmd)
 
@@ -49,7 +53,8 @@ if __name__ == "__main__":
     # deattach_stlink()
     attach_stlink()
     #
-    #  
+    # attach_dev("Silicon Labs") 
+    # deattach_dev("Silicon Labs") 
     # attach_dev("ATLink-USART")
     # attach_dev("Prolific")