From 4975f05c3e8744706a9aa820cb93badb8fb51881 Mon Sep 17 00:00:00 2001 From: Thorsten von Eicken Date: Mon, 9 Nov 2015 18:08:48 -0800 Subject: [PATCH] optiboot: allow for 9600 baud --- esp-link/cgioptiboot.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/esp-link/cgioptiboot.c b/esp-link/cgioptiboot.c index b6d953d..dfeb360 100644 --- a/esp-link/cgioptiboot.c +++ b/esp-link/cgioptiboot.c @@ -468,7 +468,8 @@ static bool ICACHE_FLASH_ATTR programPage(void) { static void ICACHE_FLASH_ATTR armTimer() { os_timer_disarm(&optibootTimer); - os_timer_arm(&optibootTimer, 100, 0); // 100ms + // time-out every 50ms, except when programming to allow for 9600baud (133ms for 128 bytes) + os_timer_arm(&optibootTimer, progState==stateProg ? 200 : 50, 0); } static void ICACHE_FLASH_ATTR optibootTimerCB(void *arg) {