summaryrefslogtreecommitdiff
path: root/ports/qemu-arm/modmachine.c
diff options
context:
space:
mode:
Diffstat (limited to 'ports/qemu-arm/modmachine.c')
-rw-r--r--ports/qemu-arm/modmachine.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/ports/qemu-arm/modmachine.c b/ports/qemu-arm/modmachine.c
index a897c5670..75872a22c 100644
--- a/ports/qemu-arm/modmachine.c
+++ b/ports/qemu-arm/modmachine.c
@@ -27,6 +27,22 @@
// This file is never compiled standalone, it's included directly from
// extmod/modmachine.c via MICROPY_PY_MACHINE_INCLUDEFILE.
+#include <stdlib.h>
+
static void mp_machine_idle(void) {
// Do nothing.
}
+
+#if MICROPY_PY_MACHINE_RESET
+
+static void mp_machine_reset(void) {
+ // Exit qemu (via semihosting call).
+ exit(0);
+}
+
+static mp_int_t mp_machine_reset_cause(void) {
+ // Not implemented.
+ return 0;
+}
+
+#endif