summaryrefslogtreecommitdiff
path: root/spectro/icoms_nt.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2017-11-25 10:16:54 +0100
committerJörg Frings-Fürst <debian@jff-webhosting.net>2017-11-25 10:16:54 +0100
commit1b1126bd023a2bb92699773a1867358067dabcb8 (patch)
tree6fd56d034e5a154c7992e7855d61691cecd043c4 /spectro/icoms_nt.c
parentcb5c7cec4aa1946f75dc3d408eb7f1051f3fb3d4 (diff)
parentf6b8e0eae4374f339487a33e3e4fe5462d5816e1 (diff)
Update upstream source from tag 'upstream/2.0.0'
Update to upstream version '2.0.0' with Debian dir e866e6e75661017faaa5331becda76021407390b
Diffstat (limited to 'spectro/icoms_nt.c')
-rwxr-xr-x[-rw-r--r--]spectro/icoms_nt.c26
1 files changed, 21 insertions, 5 deletions
diff --git a/spectro/icoms_nt.c b/spectro/icoms_nt.c
index b9e0d0c..39ff6f0 100644..100755
--- a/spectro/icoms_nt.c
+++ b/spectro/icoms_nt.c
@@ -18,7 +18,7 @@
#include <conio.h>
-instType fast_ser_inst_type(icoms *p, int tryhard, void *, void *);
+devType fast_ser_dev_type(icoms *p, int tryhard, void *, void *);
/* Add paths to serial connected device. */
/* Return an icom error */
@@ -128,12 +128,14 @@ int serial_get_paths(icompaths *p, icom_type mask) {
icoms *icom;
if ((path = p->get_last_path(p)) != NULL
&& (icom = new_icoms(path, p->log)) != NULL) {
- devType itype = fast_ser_inst_type(icom, 0, NULL, NULL);
- if (itype != instUnknown)
- icompaths_set_serial_itype(path, itype); /* And set category */
+ if (!p->fs_excluded(p, path)) {
+ devType itype = fast_ser_dev_type(icom, 0, NULL, NULL);
+ if (itype != instUnknown)
+ icompaths_set_serial_itype(path, itype); /* And set category */
+ }
icom->del(icom);
}
- a1logd(p->log, 8, "serial_get_paths: Identified '%s' dctype 0x%x\n",inst_sname(path->itype),path->dctype);
+ a1logd(p->log, 8, "serial_get_paths: Identified '%s' dctype 0x%x\n",inst_sname(path->dtype),path->dctype);
}
}
if ((stat = RegCloseKey(sch)) != ERROR_SUCCESS) {
@@ -163,6 +165,15 @@ void serial_close_port(icoms *p) {
/* -------------------------------------------------------------------- */
+#ifndef CBR_230400
+# define CBR_230400 230400
+#endif
+#ifndef CBR_460800
+# define CBR_460800 460800
+#endif
+#ifndef CBR_512000
+# define CBR_512000 512000
+#endif
#ifndef CBR_921600
# define CBR_921600 921600
#endif
@@ -190,10 +201,12 @@ int delayms) { /* Delay after open in msec */
" Open delay = %d ms\n"
,p->name ,fc ,baud_rate_to_str(baud) ,parity ,stop ,word, delayms);
+#ifdef NEVER /* Is this needed ? */
if (p->is_open) {
a1logd(p->log, 8, "icoms_set_ser_port: closing port '%s'\n",p->name);
p->close_port(p);
}
+#endif
if (p->port_type(p) == icomt_serial) {
DCB dcb;
@@ -386,6 +399,9 @@ int delayms) { /* Delay after open in msec */
case baud_115200:
dcb.BaudRate = CBR_115200;
break;
+ case baud_230400:
+ dcb.BaudRate = CBR_230400;
+ break;
case baud_921600:
dcb.BaudRate = CBR_921600;
break;