diff options
| author | Scott Shawcroft <scott@tannewt.org> | 2018-08-17 16:51:45 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-08-17 16:51:45 -0700 |
| commit | 4a4d84ba42fb84032b31344e14fc3bb1f9e8dce2 (patch) | |
| tree | ed2e486dea85dd416975d30e6beca608ce5597bc /lib/utils/interrupt_char.c | |
| parent | 5dd420f7ff2c87a5412a55fea29eb21615a89e14 (diff) | |
| parent | 11cbeb87adb10883fe46c46bd4e22e3ad3991ed3 (diff) | |
Merge pull request #1064 from notro/i2cslave
Add busio.I2CSlave
Diffstat (limited to 'lib/utils/interrupt_char.c')
| -rw-r--r-- | lib/utils/interrupt_char.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/utils/interrupt_char.c b/lib/utils/interrupt_char.c index fca0f95b5..91ee5c80e 100644 --- a/lib/utils/interrupt_char.c +++ b/lib/utils/interrupt_char.c @@ -47,4 +47,9 @@ void mp_keyboard_interrupt(void) { #endif } +// Check to see if we've been CTRL-C'ed by autoreload or the user. +bool mp_hal_is_interrupted(void) { + return MP_STATE_VM(mp_pending_exception) == MP_OBJ_FROM_PTR(&MP_STATE_VM(mp_kbd_exception)); +} + #endif |
