mirror of
https://github.com/micropython/micropython.git
synced 2026-01-06 12:10:13 +01:00
pyexec: Make raw REPL work with event-driven version of pyexec.
esp8266 port now has working raw and friendly REPL, as well as working soft reset (CTRL-D at REPL, or raise SystemExit). tools/pyboard.py now works with esp8266 port.
This commit is contained in:
@@ -200,10 +200,16 @@ void ICACHE_FLASH_ATTR uart_reattach() {
|
||||
|
||||
// Task-based UART interface
|
||||
|
||||
int pyexec_friendly_repl_process_char(int c);
|
||||
#include "py/obj.h"
|
||||
#include "stmhal/pyexec.h"
|
||||
|
||||
void soft_reset(void);
|
||||
|
||||
void uart_task_handler(os_event_t *evt) {
|
||||
pyexec_friendly_repl_process_char(evt->par);
|
||||
int ret = pyexec_event_repl_process_char(evt->par);
|
||||
if (ret & PYEXEC_FORCED_EXIT) {
|
||||
soft_reset();
|
||||
}
|
||||
}
|
||||
|
||||
void uart_task_init() {
|
||||
|
||||
Reference in New Issue
Block a user