summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--taptoser.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/taptoser.c b/taptoser.c
index 3985022..20b962e 100644
--- a/taptoser.c
+++ b/taptoser.c
@@ -100,7 +100,7 @@ void TestArgs (int argc, char *argv[])
break;
}
}
- if (baud_rate != 9600 && baud_rate != 19200) baud_rate = 19200;
+// if (baud_rate != 9600 && baud_rate != 19200) baud_rate = 19200;
/* Done with options. OPTIND points to first nonoption argument. */
if (optind < argc) {
while (optind < argc){
@@ -208,6 +208,9 @@ int main(int argc, char** argv, char** env)
tcgetattr(serial_fd, &oldtio); /* save current port settings */
switch (baud_rate){
default:
+ case 57600:
+ newtio.c_cflag = B57600 | CS8 | CLOCAL | CREAD | CSTOPB | CRTSCTS;
+ break;
case 19200:
newtio.c_cflag = B19200 | CS8 | CLOCAL | CREAD | CSTOPB | CRTSCTS;
break;
@@ -226,7 +229,6 @@ int main(int argc, char** argv, char** env)
tcsetattr(serial_fd, TCSANOW, &newtio);
Set_DTR(true);
-
no = stat(tap_file, &st);
if (no != 0)
{
@@ -243,6 +245,7 @@ int main(int argc, char** argv, char** env)
while (pos < st.st_size)
{
+
pos += no = fread(header, 1, 2, fd);
if (no != 2)
tooshort(fd);