zephyr: Implement soft reset feature.
This commit is contained in:
parent
95fe7a40b3
commit
c16e7eae5e
@ -67,6 +67,7 @@ int real_main(void) {
|
|||||||
// Should be set to stack size in prj.mdef minus fuzz factor
|
// Should be set to stack size in prj.mdef minus fuzz factor
|
||||||
mp_stack_set_limit(3584);
|
mp_stack_set_limit(3584);
|
||||||
|
|
||||||
|
soft_reset:
|
||||||
#if MICROPY_ENABLE_GC
|
#if MICROPY_ENABLE_GC
|
||||||
gc_init(heap, heap + sizeof(heap));
|
gc_init(heap, heap + sizeof(heap));
|
||||||
#endif
|
#endif
|
||||||
@ -89,7 +90,9 @@ int real_main(void) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
mp_deinit();
|
printf("soft reboot\n");
|
||||||
|
goto soft_reset;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user