Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: pybricks/pybricks-micropython
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: pybricks/pybricks-micropython
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: dlech-usb
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 11 commits
  • 70 files changed
  • 2 contributors

Commits on Nov 26, 2023

  1. Replace STM32 USB library with submodule

    Replaces the copy of the STM32 USB library with a submodule.
    Uses v2.6.0 as that was roughly the version that was in the
    repo. Temporarily adds #undef for MIN and MAX to get it to
    compile. Removes the CDC file from the build as a subsequent
    change will replace that with a custom class.
    
    Signed-off-by: Nate Karstens <nate.karstens@gmail.com>
    nkarstens committed Nov 26, 2023
    Configuration menu
    Copy the full SHA
    12076e1 View commit details
    Browse the repository at this point in the history
  2. Update USB driver

    Updates the USB driver to tips. Removes the MIN & MAX #undefs
    that were temporarily added in the previous patch.
    
    The most important thing to note regarding compatibility is
    that USBD_HandleTypeDef::pUserData is now an array.
    
    Signed-off-by: Nate Karstens <nate.karstens@gmail.com>
    nkarstens committed Nov 26, 2023
    Configuration menu
    Copy the full SHA
    7a7f5bb View commit details
    Browse the repository at this point in the history
  3. Replace VCP names

    Renames VCP (Virtual COM Port) functions to better reflect a Pybricks
    custom class and makes functions static.
    
    Signed-off-by: Nate Karstens <nate.karstens@gmail.com>
    nkarstens committed Nov 26, 2023
    Configuration menu
    Copy the full SHA
    dcd29eb View commit details
    Browse the repository at this point in the history
  4. Remove USB serial driver

    Removes the USB serial driver. A future change will add
    functionality for a custom USB driver to the existing
    battery charging driver.
    
    Signed-off-by: Nate Karstens <nate.karstens@gmail.com>
    nkarstens committed Nov 26, 2023
    Configuration menu
    Copy the full SHA
    9ff624c View commit details
    Browse the repository at this point in the history
  5. Add new Pybricks device class

    Adds a new Pybricks device class and provides the correct
    descriptors so that Windows will use the WinUSB driver.
    
    Signed-off-by: Nate Karstens <nate.karstens@gmail.com>
    nkarstens committed Nov 26, 2023
    Configuration menu
    Copy the full SHA
    bda9b67 View commit details
    Browse the repository at this point in the history
  6. Add UUID little endian utility functions

    Adds functions to copy and compare UUIDs in little endian
    format. USB is a little endian protocol, so this will be
    used to encode and decode UUIDs properly on this medium.
    
    Signed-off-by: Nate Karstens <nate.karstens@gmail.com>
    nkarstens committed Nov 26, 2023
    Configuration menu
    Copy the full SHA
    1d0e078 View commit details
    Browse the repository at this point in the history
  7. Add versions and capabilities to BOS descriptor

    Adds versions and capabilities to the BOS Descriptor by
    appending dynamically-generated platform descriptors that
    use the same UUIDs that are used with BLE and contain the
    following values:
    
     * Firmware version
     * Software (protocol) version
     * Hub capabilities
    
    Signed-off-by: Nate Karstens <nate.karstens@gmail.com>
    nkarstens committed Nov 26, 2023
    Configuration menu
    Copy the full SHA
    715e1cb View commit details
    Browse the repository at this point in the history
  8. Configure USB device and process pybricks commands

    Configures the USB device and processes pybricks commands.
    
    Signed-off-by: Nate Karstens <nate.karstens@gmail.com>
    nkarstens committed Nov 26, 2023
    Configuration menu
    Copy the full SHA
    a519633 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    5b57c9b View commit details
    Browse the repository at this point in the history
  10. drv/usb/stm32_usbd: use pbdrvconfig for USB info

    This moves the USB VID/PID and strings into pbdrvconfig.h, so that each
    hub can set the appropriate values. Additionally, since SPIKE Prime and
    Robot Inventor use the same firmware, we have to dynamically set the
    PID at runtime based on the hub variant.
    dlech committed Nov 26, 2023
    Configuration menu
    Copy the full SHA
    29171f1 View commit details
    Browse the repository at this point in the history

Commits on Nov 27, 2023

  1. drv/usb/stm32_usbd: use Pybricks class/subclass/protocol

    This adds new defines for the Pybricks USB device class, subclass and
    protocol. The class (0xff) is defined by the USB-IF and is the vendor-
    specific class. The subclass and protocol are vendor-specific and come
    from the first two bytes of the the Pybricks Bluetooth UUIDs.
    
    This allows us to identify hubs running Pybricks when enumerating USB
    devices.
    dlech committed Nov 27, 2023
    Configuration menu
    Copy the full SHA
    1fe0ec5 View commit details
    Browse the repository at this point in the history
Loading