Skip to content

Commit 8eb2f86

Browse files
committed
RP2040: usb: make all unhandled conditions a no-op
1 parent 707dde7 commit 8eb2f86

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

targets/TARGET_RASPBERRYPI/TARGET_RP2040/USBPhy_RP2040.cpp

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -295,23 +295,17 @@ bool USBPhyHw::endpoint_add(usb_ep_t endpoint, uint32_t max_packet, usb_ep_type_
295295

296296
void USBPhyHw::endpoint_remove(usb_ep_t endpoint)
297297
{
298-
// Halt here, unhandled
299-
volatile int going = true;
300-
while(going);
298+
301299
}
302300

303301
void USBPhyHw::endpoint_stall(usb_ep_t endpoint)
304302
{
305-
// Halt here, unhandled
306-
volatile int going = true;
307-
while(going);
303+
308304
}
309305

310306
void USBPhyHw::endpoint_unstall(usb_ep_t endpoint)
311307
{
312-
// Halt here, unhandled
313-
volatile int going = true;
314-
while(going);
308+
315309
}
316310

317311
bool USBPhyHw::endpoint_read(usb_ep_t endpoint, uint8_t *data, uint32_t size)
@@ -385,9 +379,7 @@ bool USBPhyHw::endpoint_write(usb_ep_t endpoint, uint8_t *data, uint32_t size)
385379

386380
void USBPhyHw::endpoint_abort(usb_ep_t endpoint)
387381
{
388-
// Unhandled, halt here
389-
volatile int going = true;
390-
while(going);
382+
391383
}
392384

393385
void USBPhyHw::process()

0 commit comments

Comments
 (0)