summaryrefslogtreecommitdiffstatshomepage
path: root/py/stackctrl.c
diff options
context:
space:
mode:
Diffstat (limited to 'py/stackctrl.c')
-rw-r--r--py/stackctrl.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/py/stackctrl.c b/py/stackctrl.c
index 4c51653727..14d1fd0429 100644
--- a/py/stackctrl.c
+++ b/py/stackctrl.c
@@ -35,6 +35,10 @@ void mp_stack_ctrl_init(void) {
MP_STATE_VM(stack_top) = (char*)&stack_dummy;
}
+void mp_stack_set_top(void *top) {
+ MP_STATE_VM(stack_top) = top;
+}
+
mp_uint_t mp_stack_usage(void) {
// Assumes descending stack
volatile int stack_dummy;