View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0038243 | FPC | RTL | public | 2020-12-21 21:05 | 2020-12-22 06:13 |
Reporter | Christo Crause | Assigned To | Florian | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Product Version | 3.3.1 | ||||
Fixed in Version | 3.3.1 | ||||
Summary | 0038243: Xtensa [patch] ESP8266 read function is non-blocking | ||||
Description | When trying to wait for user input on the default serial input, read returns immediately. If no character is available in the serial buffer, a #0 is returned. This is because the low level function uart_rx_one_char is apparently non-blocking. One way to fix this is to convert the ReadChar function in esp8266.pp to loop until a non-zero character is returned. This fix has been implemented in the attached patch. Not sure if this loop should be moved to the console unit to make it more general... | ||||
Tags | No tags attached. | ||||
Fixed in Revision | 47832 | ||||
FPCOldBugId | |||||
FPCTarget | - | ||||
Attached Files |
|
|
esp8266.patch (512 bytes)
Index: rtl/freertos/xtensa/esp8266.pp =================================================================== --- rtl/freertos/xtensa/esp8266.pp (revision 47785) +++ rtl/freertos/xtensa/esp8266.pp (working copy) @@ -81,7 +81,11 @@ 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 |
|
Thanks, applied. |
|
Thanks Florian. |
Date Modified | Username | Field | Change |
---|---|---|---|
2020-12-21 21:05 | Christo Crause | New Issue | |
2020-12-21 21:05 | Christo Crause | File Added: esp8266.patch | |
2020-12-21 22:43 | Florian | Assigned To | => Florian |
2020-12-21 22:43 | Florian | Status | new => resolved |
2020-12-21 22:43 | Florian | Resolution | open => fixed |
2020-12-21 22:43 | Florian | Fixed in Version | => 3.3.1 |
2020-12-21 22:43 | Florian | Fixed in Revision | => 47832 |
2020-12-21 22:43 | Florian | FPCTarget | => - |
2020-12-21 22:43 | Florian | Note Added: 0127751 | |
2020-12-22 06:13 | Christo Crause | Status | resolved => closed |
2020-12-22 06:13 | Christo Crause | Note Added: 0127755 |