aboutsummaryrefslogtreecommitdiffstats
path: root/ncpd/packet.cc
diff options
context:
space:
mode:
Diffstat (limited to 'ncpd/packet.cc')
-rw-r--r--ncpd/packet.cc14
1 files changed, 14 insertions, 0 deletions
diff --git a/ncpd/packet.cc b/ncpd/packet.cc
index 53774d6..2aa0509 100644
--- a/ncpd/packet.cc
+++ b/ncpd/packet.cc
@@ -62,6 +62,20 @@ iow(_iow)
iow.addIO(fd);
}
+void packet::reset()
+{
+ iow.remIO(fd);
+ ser_exit(fd);
+ usleep(100000);
+ inLen = outLen = termLen = 0;
+ foundSync = 0;
+ esc = false;
+ crcIn = crcOut = 0;
+
+ fd = init_serial(devname, baud, 0);
+ iow.addIO(fd);
+}
+
short int packet::
getVerbose()
{