Skip to content

Commit 5bee790

Browse files
committed
runtime/pyexec: Remove legacy usb irq enable code.
Signed-off-by: Andrew Leech <[email protected]>
1 parent f1bdac3 commit 5bee790

File tree

1 file changed

+0
-18
lines changed

1 file changed

+0
-18
lines changed

shared/runtime/pyexec.c

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,6 @@
3535
#include "py/gc.h"
3636
#include "py/frozenmod.h"
3737
#include "py/mphal.h"
38-
#if MICROPY_HW_ENABLE_USB
39-
#include "irq.h"
40-
#include "usb.h"
41-
#endif
4238
#include "shared/readline/readline.h"
4339
#include "shared/runtime/pyexec.h"
4440
#include "genhdr/mpversion.h"
@@ -582,20 +578,6 @@ int pyexec_friendly_repl(void) {
582578

583579
for (;;) {
584580
input_restart:
585-
586-
#if MICROPY_HW_ENABLE_USB
587-
if (usb_vcp_is_enabled()) {
588-
// If the user gets to here and interrupts are disabled then
589-
// they'll never see the prompt, traceback etc. The USB REPL needs
590-
// interrupts to be enabled or no transfers occur. So we try to
591-
// do the user a favor and re-enable interrupts.
592-
if (query_irq() == IRQ_STATE_DISABLED) {
593-
enable_irq(IRQ_STATE_ENABLED);
594-
mp_hal_stdout_tx_str("MPY: enabling IRQs\r\n");
595-
}
596-
}
597-
#endif
598-
599581
// If the GC is locked at this point there is no way out except a reset,
600582
// so force the GC to be unlocked to help the user debug what went wrong.
601583
if (MP_STATE_THREAD(gc_lock_depth) != 0) {

0 commit comments

Comments
 (0)