diff options
| author | Damien George <damien.p.george@gmail.com> | 2016-12-15 13:00:19 +1100 |
|---|---|---|
| committer | Damien George <damien.p.george@gmail.com> | 2016-12-15 13:00:19 +1100 |
| commit | 7f1da0a03b1559080ca4d054bd38f104bde168e6 (patch) | |
| tree | 1450845231e9bda2a481a67140cb09d6ad7ba71c /py/mpconfig.h | |
| parent | 979ab4e126dacca4d7fbbd0e71c849365ef2c947 (diff) | |
py: Add MICROPY_KBD_EXCEPTION config option to provide mp_kbd_exception.
Defining and initialising mp_kbd_exception is boiler-plate code and so the
core runtime can provide it, instead of each port needing to do it
themselves.
The exception object is placed in the VM state rather than on the heap.
Diffstat (limited to 'py/mpconfig.h')
| -rw-r--r-- | py/mpconfig.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/py/mpconfig.h b/py/mpconfig.h index ea90ec984..7a71ebd95 100644 --- a/py/mpconfig.h +++ b/py/mpconfig.h @@ -446,6 +446,11 @@ # endif #endif +// Whether to provide the mp_kbd_exception object +#ifndef MICROPY_KBD_EXCEPTION +#define MICROPY_KBD_EXCEPTION (0) +#endif + // Prefer to raise KeyboardInterrupt asynchronously (from signal or interrupt // handler) - if supported by a particular port. #ifndef MICROPY_ASYNC_KBD_INTR |
