diff options
Diffstat (limited to 'taptoser.c')
-rw-r--r-- | taptoser.c | 18 |
1 files changed, 9 insertions, 9 deletions
@@ -155,7 +155,7 @@ void decode(unsigned char *header) { printf("Flag: %4u ", (unsigned int)*header); n = getword(header+14); h_len = getword(header+12); - + switch(*(header+1)) { case '\0': printf("Type: 0 => program\nProgram length: %6u bytes ", h_len); @@ -206,7 +206,7 @@ void DoProgress(size_t pos, size_t max, unsigned char csum_ok) { p = pos; m = max; percent = 100 / m * p; - ipercent = percent / 100 * imax; + ipercent = percent / 100 * imax; if (is_binary) progress_char = '#'; else progress_char = '='; printf ("Proceed bytes: %6d/%6d [", (int) pos, (int)max); @@ -342,13 +342,13 @@ void SendTap() { unsigned int err, no, len; struct stat st; unsigned char header[19]; - + no = stat(tap_file, &st); if (no != 0) { err = errno; error(1, err, "can't stat input file"); } - + tap_fd = fopen(tap_file, "r"); if (tap_fd == NULL) { err = errno; @@ -429,7 +429,7 @@ int main(int argc, char** argv, char** env) switch (baud_rate){ default: baud_rate = 57600; // default speed - newtio.c_cflag = B57600 | CS8 | CLOCAL | CREAD | CSTOPB | CRTSCTS; + newtio.c_cflag = B57600 | CS8 | CLOCAL | CREAD | CSTOPB;// | CRTSCTS; break; case 57600: newtio.c_cflag = B57600 | CS8 | CLOCAL | CREAD | CSTOPB | CRTSCTS; @@ -445,11 +445,11 @@ int main(int argc, char** argv, char** env) break; } printf ("Serial device: %s, communication speed is: %d Bd\n", MODEMDEVICE, baud_rate); - newtio.c_iflag &= ~(IXON | IXOFF | IXANY); // vypne XON/XOFF - newtio.c_iflag = IGNPAR | IXOFF; +// newtio.c_iflag &= ~(IXON | IXOFF | IXANY); // vypne XON/XOFF + newtio.c_iflag = 0;IGNPAR | IXOFF; newtio.c_oflag = 0; - newtio.c_oflag &= ~OPOST; - newtio.c_lflag = NOFLSH; +// newtio.c_oflag &= ~OPOST; + newtio.c_lflag = 0; //NOFLSH; newtio.c_cc[VMIN] = 0; newtio.c_cc[VTIME] = 10; tcsetattr(serial_fd, TCSANOW, &newtio); |