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:
Damien George 2019-05-01 12:41:07 +10:00
parent 859596ce25
commit 2459162599
1 changed files with 1 additions and 1 deletions

View File

@ -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) {