mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[code] Enable interrupting an infinite input() loop when clicking on home
This commit is contained in:
@@ -17,6 +17,7 @@ extern "C" {
|
||||
#include "py/repl.h"
|
||||
#include "py/runtime.h"
|
||||
#include "py/stackctrl.h"
|
||||
#include "mphalport.h"
|
||||
}
|
||||
|
||||
static MicroPython::ScriptProvider * sScriptProvider = nullptr;
|
||||
@@ -84,6 +85,10 @@ void MicroPython::ExecutionEnvironment::runCode(const char * str) {
|
||||
sCurrentExecutionEnvironment = nullptr;
|
||||
}
|
||||
|
||||
void MicroPython::ExecutionEnvironment::interrupt() {
|
||||
mp_keyboard_interrupt();
|
||||
}
|
||||
|
||||
extern "C" {
|
||||
extern const void * _stack_start;
|
||||
extern const void * _stack_end;
|
||||
|
||||
Reference in New Issue
Block a user