mirror of
https://github.com/micropython/micropython.git
synced 2026-01-05 03:30:14 +01:00
esp8266: Support dedicated REPL loop (aka pull-style).
Event-driven loop (push-style) is still supported and default (controlled by MICROPY_REPL_EVENT_DRIVEN setting, as expected). Dedicated loop worked even without adding ets_loop_iter(), though that needs to be revisited later.
This commit is contained in:
@@ -233,6 +233,7 @@ void soft_reset(void);
|
||||
void mp_keyboard_interrupt(void);
|
||||
|
||||
int interrupt_char;
|
||||
#if MICROPY_REPL_EVENT_DRIVEN
|
||||
void uart_task_handler(os_event_t *evt) {
|
||||
if (pyexec_repl_active) {
|
||||
// TODO: Just returning here isn't exactly right.
|
||||
@@ -264,3 +265,4 @@ void uart_task_handler(os_event_t *evt) {
|
||||
void uart_task_init() {
|
||||
system_os_task(uart_task_handler, UART_TASK_ID, uart_evt_queue, sizeof(uart_evt_queue) / sizeof(*uart_evt_queue));
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user