diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2018-07-11 22:20:14 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2018-07-11 22:20:14 +0200 |
commit | 7beb00cd8d28c3d5893ce3db907a828d64afdea9 (patch) | |
tree | 395a3dee2fe197b8284dee02c5f527889df78413 /spectro/icoms_nt.c | |
parent | e2d30e0583c047a4bedf4c8d0c86320f1b3fd8ed (diff) | |
parent | a0442ed58dee48a521ea053083ea967894507898 (diff) |
Update upstream source from tag 'upstream/2.0.1+repack'
Update to upstream version '2.0.1+repack'
with Debian dir 6edb5dd2df9aca152662fc4a8f72bd6d86f8552e
Diffstat (limited to 'spectro/icoms_nt.c')
-rwxr-xr-x | spectro/icoms_nt.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/spectro/icoms_nt.c b/spectro/icoms_nt.c index 39ff6f0..7ac074b 100755 --- a/spectro/icoms_nt.c +++ b/spectro/icoms_nt.c @@ -163,6 +163,16 @@ void serial_close_port(icoms *p) { } } +/* Clear any serial errors */ +static void nt_ser_clearerr(icoms *p) { + DWORD errs; + + if (!ClearCommError(p->phandle, &errs,NULL)) + error("nt_ser_clearerr: failed, and Clear error failed"); + + return; +} + /* -------------------------------------------------------------------- */ #ifndef CBR_230400 @@ -428,6 +438,7 @@ int delayms) { /* Delay after open in msec */ p->write = icoms_ser_write; p->read = icoms_ser_read; + p->ser_clearerr = nt_ser_clearerr; } a1logd(p->log, 8, "icoms_set_ser_port: port characteristics set ok\n"); |