linux: Don't set VTIME in UART configuration for esptun

`read(esp_fd)` should wait for 1 or more characters to be available in
the UART FIFO, no timing required.
This commit is contained in:
Wladimir J. van der Laan 2020-02-22 13:01:58 +00:00
parent c261d4dcc7
commit afde09e6cc

View File

@ -182,7 +182,7 @@ static void write_esc(int fd, const char *buf, int n)
}
/**
* Write a 32-bit unsigned integer.
* Write a 32-bit unsigned integer (as ASCII text).
*/
static void write_uint(int fd, uint32_t x)
{
@ -237,7 +237,7 @@ static int setup_uart(int fd, int speed)
/* fetch bytes as they become available */
tty.c_cc[VMIN] = 1;
tty.c_cc[VTIME] = 1;
tty.c_cc[VTIME] = 0;
if (ioctl(fd, TCSETS2, &tty) != 0) {
my_err("Error from TCSETS2: %s", strerror(errno));