esp32: Make machine.soft_reset() work in main.py and reset_cause().

This commit fixes two issues on the esp32:
- it enables machine.soft_reset() to be called in main.py;
- it enables machine.reset_cause() to correctly identify a soft reset.

The former is useful in that it enables soft resets in applications that
are started at boot time.  The support is patterned after the stm32 port.
This commit is contained in:
Thorsten von Eicken
2020-06-03 22:42:37 -07:00
committed by Damien George
parent c10d431819
commit d28dbcd6c7
3 changed files with 24 additions and 1 deletions

View File

@@ -22,6 +22,8 @@ extern const mp_obj_type_t machine_uart_type;
extern const mp_obj_type_t machine_rtc_type;
extern const mp_obj_type_t machine_sdcard_type;
void machine_init(void);
void machine_deinit(void);
void machine_pins_init(void);
void machine_pins_deinit(void);
void machine_timer_deinit_all(void);