Skip to content

Commit d6a1ca3

Browse files
committed
Revert "Add rp2040 reset interface"
This reverts commit 85b38df.
1 parent 9c564bc commit d6a1ca3

File tree

3 files changed

+0
-33
lines changed

3 files changed

+0
-33
lines changed

tmk_core/protocol/chibios/usb_main.c

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@
4343
#include "usb_device_state.h"
4444
#include "usb_descriptor.h"
4545
#include "usb_driver.h"
46-
#include "platforms/bootloader.h"
4746

4847
#ifdef NKRO_ENABLE
4948
# include "keycode_config.h"
@@ -652,21 +651,6 @@ static bool usb_request_hook_cb(USBDriver *usbp) {
652651
* 4,5: (LSB,MSB) wIndex
653652
* 6,7: (LSB,MSB) wLength (number of bytes to transfer if there is a data phase) */
654653

655-
if (((usbp->setup[0] & USB_RTYPE_TYPE_MASK) == USB_RTYPE_TYPE_CLASS) && ((usbp->setup[0] & USB_RTYPE_RECIPIENT_MASK) == USB_RTYPE_RECIPIENT_INTERFACE)) {
656-
dprint(" TYPE_CLASS, RECIPIENT_INTERFACE\n");
657-
if ((usbp->setup[0] & USB_RTYPE_DIR_MASK) == USB_RTYPE_DIR_HOST2DEV) {
658-
if (usbp->setup[4] == RP2040_RESET_INTERFACE) {
659-
switch (usbp->setup[1]) { /* bRequest */
660-
case 0x01: // RESET_REQUEST_BOOTSEL
661-
case 0x02: // RESET_REQUEST_FLASH
662-
dprint(" Reset interface\n");
663-
bootloader_jump();
664-
break;
665-
}
666-
}
667-
}
668-
}
669-
670654
/* Handle HID class specific requests */
671655
if (((usbp->setup[0] & USB_RTYPE_TYPE_MASK) == USB_RTYPE_TYPE_CLASS) && ((usbp->setup[0] & USB_RTYPE_RECIPIENT_MASK) == USB_RTYPE_RECIPIENT_INTERFACE)) {
672656
switch (usbp->setup[0] & USB_RTYPE_DIR_MASK) {

tmk_core/protocol/usb_descriptor.c

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -738,19 +738,6 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = {
738738
.PollingIntervalMS = USB_POLLING_INTERVAL_MS
739739
},
740740
#endif
741-
.Rp2040_Reset_Interface = {
742-
.Header = {
743-
.Size = sizeof(USB_Descriptor_Interface_t),
744-
.Type = DTYPE_Interface
745-
},
746-
.InterfaceNumber = RP2040_RESET_INTERFACE,
747-
.AlternateSetting = 0x00,
748-
.TotalEndpoints = 2,
749-
.Class = 0xFF,
750-
.SubClass = 0x00, // RESET_INTERFACE_SUBCLASS
751-
.Protocol = 0x01, // RESET_INTERFACE_PROTOCOL
752-
.InterfaceStrIndex = NO_DESCRIPTOR
753-
},
754741

755742
#ifdef CONSOLE_ENABLE
756743
/*

tmk_core/protocol/usb_descriptor.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,6 @@ typedef struct {
9292
USB_Descriptor_Endpoint_t Shared_INEndpoint;
9393
#endif
9494

95-
USB_Descriptor_Interface_t Rp2040_Reset_Interface;
96-
9795
#ifdef CONSOLE_ENABLE
9896
// Console HID Interface
9997
USB_Descriptor_Interface_t Console_Interface;
@@ -175,8 +173,6 @@ enum usb_interfaces {
175173
SHARED_INTERFACE,
176174
#endif
177175

178-
RP2040_RESET_INTERFACE,
179-
180176
#ifdef CONSOLE_ENABLE
181177
CONSOLE_INTERFACE,
182178
#endif

0 commit comments

Comments
 (0)