mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-04 11:07:46 +00:00
rp2040: usb: reset device address on bus reset
This commit is contained in:
@@ -128,6 +128,8 @@ func handleUSBIRQ(intr interrupt.Interrupt) {
|
||||
// Bus is reset
|
||||
if (status & rp.USBCTRL_REGS_INTS_BUS_RESET) > 0 {
|
||||
rp.USBCTRL_REGS.SIE_STATUS.Set(rp.USBCTRL_REGS_SIE_STATUS_BUS_RESET)
|
||||
rp.USBCTRL_REGS.ADDR_ENDP.Set(0)
|
||||
|
||||
initEndpoint(0, usb.ENDPOINT_TYPE_CONTROL)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user