forked from qmk/qmk_firmware
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This is the same one implemented in the rp-pico SDK. See [definition](https://github.com/raspberrypi/pico-sdk/blob/2.0.0/src/rp2_common/pico_stdio_usb/stdio_usb_descriptors.c#L109) and [usage](https://github.com/raspberrypi/pico-sdk/blob/2.0.0/src/rp2_common/pico_stdio_usb/reset_interface.c). Since QMK does not use the USB descriptors from the SDK, we can't just use `#define FOO PICO_STDIO_USB_ENABLE_RESET_VIA_VENDOR_INTERFACE` and have to implement it ourselves. Picotool writes a control transfer that arrives in `usb_request_hook_cb` in `usbp->setup` as bytes `21 01 00 00 03 00 00 00`. FWUPD also implements this same reset protocol https://github.com/fwupd/fwupd/tree/main/plugins/rp-pico Using this reset mechanism allows a standard reset into bootloader mode from where UF2 update is easy. The qmk commandline could also implement it to make debugging more seamless. Signed-off-by: Daniel Schaefer <[email protected]>
- Loading branch information
1 parent
9388622
commit 5b72932
Showing
3 changed files
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters