Add vendor request to reset the MCU

There's two issues with this.
1. There's no way to force a USB reset.
2. This USB stack is cursed.

I can't tell how much of the latter is my fault, though, so I'm
keeping it in.
This commit is contained in:
Puck Meerburg
2025-12-30 17:05:46 +00:00
parent 0e29a58828
commit da0529dd99

View File

@@ -15,12 +15,12 @@
int anim_render(uint16_t *fb, int index, int frame);
enum usb_control_resp bl_handler(enum usb_control_state state) {
if (usb_control_request.bmRequestType != 0x60) return USB_CONTROL_RESP_PASS;
if ((usb_control_request.bmRequestType & 0x7f) != 0x43) return USB_CONTROL_RESP_PASS;
if (usb_control_request.bRequest != 0x69)
return USB_CONTROL_RESP_STALL;
asm volatile("j 0x00");
if (state == USB_CONTROL_FINISHED) asm volatile("j 0x00");
return USB_CONTROL_RESP_ACK;
}