lib/utils/interrupt_char: Invalidate interrupt char at start up.
Otherwise mp_interrupt_char will have a value of zero on start up (because it's in the BSS) and a KeyboardInterrupt may be raised during start up. For example this can occur if there is a UART attached to the REPL which sends spurious null bytes when the device turns on.
This commit is contained in:
parent
859596ce25
commit
2459162599
|
@ -29,7 +29,7 @@
|
|||
|
||||
#if MICROPY_KBD_EXCEPTION
|
||||
|
||||
int mp_interrupt_char;
|
||||
int mp_interrupt_char = -1;
|
||||
|
||||
void mp_hal_set_interrupt_char(int c) {
|
||||
if (c != -1) {
|
||||
|
|
Loading…
Reference in New Issue