Procházet zdrojové kódy

* patch by Christo Crause to take care of the fact that the esp8266 read function is non-blocking, resolves #38243

git-svn-id: trunk@47832 -
florian před 4 roky
rodič
revize
da468719df
1 změnil soubory, kde provedl 5 přidání a 1 odebrání
  1. 5 1
      rtl/freertos/xtensa/esp8266.pp

+ 5 - 1
rtl/freertos/xtensa/esp8266.pp

@@ -81,7 +81,11 @@ unit esp8266;
       begin
         ReadChar := true;
         ACh := #0;
-        uart_rx_one_char(@ACh);  // check failure?
+        repeat
+          uart_rx_one_char(@ACh);  // check failure?
+          if ACh = #0 then
+            vTaskDelay(1);
+        until ACh <> #0;
       end;
 
 begin