File tree Expand file tree Collapse file tree 2 files changed +6
-12
lines changed
ports/raspberrypi/supervisor Expand file tree Collapse file tree 2 files changed +6
-12
lines changed Original file line number Diff line number Diff line change 31
31
#include "src/rp2_common/pico_platform/include/pico/platform.h"
32
32
#include "src/rp2040/hardware_regs/include/hardware/regs/intctrl.h"
33
33
34
- static background_callback_t usb_callback ;
35
- static void usb_background_do (void * unused ) {
36
- usb_background ();
37
- }
38
-
39
- static void queue_background (void ) {
40
- background_callback_add (& usb_callback , usb_background_do , NULL );
41
- }
42
-
43
34
void init_usb_hardware (void ) {
44
35
}
45
36
46
37
void post_usb_init (void ) {
38
+ irq_set_enabled (USBCTRL_IRQ , false);
39
+
47
40
irq_handler_t usb_handler = irq_get_exclusive_handler (USBCTRL_IRQ );
48
41
if (usb_handler ) {
49
42
irq_remove_handler (USBCTRL_IRQ , usb_handler );
50
- irq_add_shared_handler (USBCTRL_IRQ , usb_handler , PICO_DEFAULT_IRQ_PRIORITY );
51
43
}
52
- irq_add_shared_handler (USBCTRL_IRQ , queue_background , PICO_LOWEST_IRQ_PRIORITY );
44
+ irq_set_exclusive_handler (USBCTRL_IRQ , usb_irq_handler );
45
+
46
+ irq_set_enabled (USBCTRL_IRQ , true);
53
47
}
You can’t perform that action at this time.
0 commit comments