void init_done(void) { #if MICROPY_REPL_EVENT_DRIVEN uart_task_init(); #endif mp_reset(); mp_hal_stdout_tx_str("\r\n"); #if MICROPY_REPL_EVENT_DRIVEN pyexec_event_repl_init(); #endif dupterm_task_init(); #if !MICROPY_REPL_EVENT_DRIVEN soft_reset: for (;;) { if (pyexec_mode_kind == PYEXEC_MODE_RAW_REPL) { if (pyexec_raw_repl() != 0) { break; } } else { if (pyexec_friendly_repl() != 0) { break; } } } soft_reset(); goto soft_reset; #endif }
void init_done(void) { // Configure sleep, and put the radio to sleep if no interfaces are active wifi_fpm_set_sleep_type(MODEM_SLEEP_T); if (wifi_get_opmode() == NULL_MODE) { wifi_fpm_open(); wifi_fpm_do_sleep(0xfffffff); } #if MICROPY_REPL_EVENT_DRIVEN uart_task_init(); #endif mp_reset(); mp_hal_stdout_tx_str("\r\n"); #if MICROPY_REPL_EVENT_DRIVEN pyexec_event_repl_init(); #endif #if !MICROPY_REPL_EVENT_DRIVEN soft_reset: for (;;) { if (pyexec_mode_kind == PYEXEC_MODE_RAW_REPL) { if (pyexec_raw_repl() != 0) { break; } } else { if (pyexec_friendly_repl() != 0) { break; } } } soft_reset(); goto soft_reset; #endif }
void soft_reset(void) { mp_hal_stdout_tx_str("PYB: soft reboot\r\n"); mp_hal_delay_us(10000); // allow UART to flush output mp_reset(); #if MICROPY_REPL_EVENT_DRIVEN pyexec_event_repl_init(); #endif }
void init_done(void) { mp_reset(); mp_hal_stdout_tx_str("\r\n"); pyexec_event_repl_init(); uart_task_init(); }
void soft_reset(void) { mp_hal_stdout_tx_str("PYB: soft reset\r\n"); mp_hal_delay_us(10000); // allow UART to flush output mp_reset(); pyexec_event_repl_init(); }