File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
targets/TARGET_RASPBERRYPI/TARGET_RP2040 Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ extern "C" {
32
32
33
33
#ifdef PICO_RP2040_USB_DEVICE_ENUMERATION_FIX
34
34
#include " rp2040_usb_device_enumeration.h"
35
+ #include " hardware/structs/iobank0.h"
35
36
#endif
36
37
37
38
#ifdef __cplusplus
@@ -396,7 +397,13 @@ void USBPhyHw::process()
396
397
397
398
// This is required, but having trouble working out how to link in
398
399
#ifdef PICO_RP2040_USB_DEVICE_ENUMERATION_FIX
400
+ const uint dp = 15 ;
401
+ auto function = gpio_get_function (dp);
402
+ auto override = iobank0_hw->io [dp].ctrl ;
399
403
rp2040_usb_device_enumeration_fix ();
404
+ gpio_set_function (dp, function);
405
+ gpio_set_inover (dp, GPIO_OVERRIDE_HIGH);
406
+ hw_set_bits (&iobank0_hw->io [dp].ctrl , override );
400
407
#endif
401
408
402
409
// reset bus for USBDevice layer
You can’t perform that action at this time.
0 commit comments