FreeCalypso > hg > freecalypso-tools
changeset 425:7eddc2578fdb
fcup-atinterf: added 20 ms serial flush
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sun, 28 Oct 2018 20:03:06 +0000 |
parents | dd0247097097 |
children | 13f0fc38cefd |
files | uptools/atinterf/fcup-atinterf.c |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/uptools/atinterf/fcup-atinterf.c Sun Oct 28 00:38:13 2018 +0000 +++ b/uptools/atinterf/fcup-atinterf.c Sun Oct 28 20:03:06 2018 +0000 @@ -4,6 +4,7 @@ #include <stdlib.h> #include <string.h> #include <strings.h> +#include <termios.h> #include <unistd.h> extern int target_fd; @@ -155,6 +156,8 @@ if (argc > 3) wakeup_after_sec = strtoul(argv[3], 0, 0); + usleep(20000); + tcflush(target_fd, TCIFLUSH); set_serial_nonblock(0); target_rd = fdopen(target_fd, "r"); if (!target_rd) {