Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

apollo_fpga: fix handing off USB port to Apollo under Windows #63

Merged
merged 1 commit into from
May 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions apollo_fpga/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import os
import time
import usb.core
import platform

from .jtag import JTAGChain
from .spi import DebugSPIConnection
Expand Down Expand Up @@ -129,6 +130,10 @@ def _request_handoff(cls, device):
if stub_if is None:
raise DebuggerNotFound("No Apollo stub interface found")

# In Windows, we first need to claim the target interface.
if platform.system() == "Windows":
usb.util.claim_interface(device, stub_if)

# Send the request
intf_number = stub_if.bInterfaceNumber
REQUEST_APOLLO_ADV_STOP = 0xF0
Expand Down
Loading