35
35
#include "drivers/dht/dht.h"
36
36
#endif
37
37
38
+ #if !MICROPY_PY_SYS_EXIT
39
+ #error MICROPY_PY_MACHINE requires MICROPY_PY_SYS_EXIT
40
+ #endif
41
+
38
42
// The port must provide implementations of these low-level machine functions.
39
43
40
44
static void mp_machine_idle (void );
@@ -61,11 +65,6 @@ NORETURN static void mp_machine_deepsleep(size_t n_args, const mp_obj_t *args);
61
65
#include MICROPY_PY_MACHINE_INCLUDEFILE
62
66
#endif
63
67
64
- static mp_obj_t machine_soft_reset (void ) {
65
- mp_raise_type (& mp_type_SystemExit );
66
- }
67
- static MP_DEFINE_CONST_FUN_OBJ_0 (machine_soft_reset_obj , machine_soft_reset ) ;
68
-
69
68
#if MICROPY_PY_MACHINE_BOOTLOADER
70
69
NORETURN mp_obj_t machine_bootloader (size_t n_args , const mp_obj_t * args ) {
71
70
mp_machine_bootloader (n_args , args );
@@ -156,7 +155,7 @@ static const mp_rom_map_elem_t machine_module_globals_table[] = {
156
155
#endif
157
156
158
157
// Reset related functions.
159
- { MP_ROM_QSTR (MP_QSTR_soft_reset ), MP_ROM_PTR (& machine_soft_reset_obj ) },
158
+ { MP_ROM_QSTR (MP_QSTR_soft_reset ), MP_ROM_PTR (& mp_sys_exit_obj ) },
160
159
#if MICROPY_PY_MACHINE_BOOTLOADER
161
160
{ MP_ROM_QSTR (MP_QSTR_bootloader ), MP_ROM_PTR (& machine_bootloader_obj ) },
162
161
#endif
0 commit comments