diff options
| author | Andrew Leech <andrew.leech@planetinnovation.com.au> | 2024-08-09 19:37:10 +1000 | 
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2025-10-31 10:51:07 +1100 | 
| commit | 6b0e1c2701490260cb81bbe884f42a9c18bea020 (patch) | |
| tree | 2d7e7e780760c96c998e3fef528daa168a6b8cc9 | |
| parent | 4efc5e12b94082af16520e73ecdd53a67ceddfcf (diff) | |
shared/runtime/pyexec: Remove legacy USB IRQ enable code.
It's very STM32 USB stack specific and doesn't generalise well to other
ports.  So remove it.
Signed-off-by: Andrew Leech <andrew.leech@planetinnovation.com.au>
| -rw-r--r-- | shared/runtime/pyexec.c | 18 | 
1 files changed, 0 insertions, 18 deletions
diff --git a/shared/runtime/pyexec.c b/shared/runtime/pyexec.c index 0b253b4ce..7d2a70c01 100644 --- a/shared/runtime/pyexec.c +++ b/shared/runtime/pyexec.c @@ -35,10 +35,6 @@  #include "py/gc.h"  #include "py/frozenmod.h"  #include "py/mphal.h" -#if MICROPY_HW_ENABLE_USB -#include "irq.h" -#include "usb.h" -#endif  #include "shared/readline/readline.h"  #include "shared/runtime/pyexec.h"  #include "genhdr/mpversion.h" @@ -582,20 +578,6 @@ friendly_repl_reset:      for (;;) {      input_restart: - -        #if MICROPY_HW_ENABLE_USB -        if (usb_vcp_is_enabled()) { -            // If the user gets to here and interrupts are disabled then -            // they'll never see the prompt, traceback etc. The USB REPL needs -            // interrupts to be enabled or no transfers occur. So we try to -            // do the user a favor and re-enable interrupts. -            if (query_irq() == IRQ_STATE_DISABLED) { -                enable_irq(IRQ_STATE_ENABLED); -                mp_hal_stdout_tx_str("MPY: enabling IRQs\r\n"); -            } -        } -        #endif -          // If the GC is locked at this point there is no way out except a reset,          // so force the GC to be unlocked to help the user debug what went wrong.          MP_STATE_THREAD(gc_lock_depth) = 0;  | 
