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

Transition to libusb and support targeting device by serial number #59

Merged

Commits on May 9, 2024

  1. usb: Replace USBDEVFS interface with libusb

    In order to support selecting board based on serial number the iProduct
    field needs to be inspected, with the hand-rolled parsing of the USB
    descriptors this becomes cumbersome.
    
    Furthermore the direct use of Linux's USBDEVFS creats an unnecessary
    dependency on the host OS being Linux.
    
    It's unclear why libusb wasn't choosen in the first place, perhaps it
    relates to the faint memory of 0.1 vs 1.0 packaging issues?
    
    Move to libusb-1.0 in order to resolve these issues, as well as clean up
    the code a bit.
    
    Signed-off-by: Bjorn Andersson <[email protected]>
    quic-bjorande committed May 9, 2024
    Configuration menu
    Copy the full SHA
    3285bd2 View commit details
    Browse the repository at this point in the history
  2. usb: Allow selecting board by serial number

    When working on a host with multiple boards attached being able to
    select a specific board by serial number becomes necessary.
    
    In the EDL USB descriptors a device serial number is available as part
    of the iProduct string, so this can be used for comparison.
    
    As libusb requires a handle the libusb_open() needs to be moved into the
    loop.
    
    Signed-off-by: Bjorn Andersson <[email protected]>
    quic-bjorande committed May 9, 2024
    Configuration menu
    Copy the full SHA
    43976ff View commit details
    Browse the repository at this point in the history