Skip to content
This repository has been archived by the owner on Mar 27, 2020. It is now read-only.

Commit

Permalink
Disable printing serial port settings when initialising
Browse files Browse the repository at this point in the history
  • Loading branch information
thomotron committed Oct 8, 2019
1 parent bf2385d commit 396eac8
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions client/captureme.c
Original file line number Diff line number Diff line change
Expand Up @@ -196,9 +196,9 @@ int serial_setup_port_with_speed(int fd, int speed)
struct termios t;

tcgetattr(fd, &t);
fprintf(stderr, "Serial port settings before tcsetaddr: c=%08x, i=%08x, o=%08x, l=%08x\n",
(unsigned int)t.c_cflag, (unsigned int)t.c_iflag,
(unsigned int)t.c_oflag, (unsigned int)t.c_lflag);
//fprintf(stderr, "Serial port settings before tcsetaddr: c=%08x, i=%08x, o=%08x, l=%08x\n",
// (unsigned int)t.c_cflag, (unsigned int)t.c_iflag,
// (unsigned int)t.c_oflag, (unsigned int)t.c_lflag);

speed_t baud_rate;
switch (speed)
Expand Down Expand Up @@ -244,16 +244,16 @@ int serial_setup_port_with_speed(int fd, int speed)
// no output processing
t.c_oflag &= ~OPOST;

fprintf(stderr, "Serial port settings attempting to be set: c=%08x, i=%08x, o=%08x, l=%08x\n",
(unsigned int)t.c_cflag, (unsigned int)t.c_iflag,
(unsigned int)t.c_oflag, (unsigned int)t.c_lflag);
//fprintf(stderr, "Serial port settings attempting to be set: c=%08x, i=%08x, o=%08x, l=%08x\n",
// (unsigned int)t.c_cflag, (unsigned int)t.c_iflag,
// (unsigned int)t.c_oflag, (unsigned int)t.c_lflag);

tcsetattr(fd, TCSANOW, &t);

tcgetattr(fd, &t);
fprintf(stderr, "Serial port settings after tcsetaddr: c=%08x, i=%08x, o=%08x, l=%08x\n",
(unsigned int)t.c_cflag, (unsigned int)t.c_iflag,
(unsigned int)t.c_oflag, (unsigned int)t.c_lflag);
//fprintf(stderr, "Serial port settings after tcsetaddr: c=%08x, i=%08x, o=%08x, l=%08x\n",
// (unsigned int)t.c_cflag, (unsigned int)t.c_iflag,
// (unsigned int)t.c_oflag, (unsigned int)t.c_lflag);

set_nonblock(fd);

Expand Down

0 comments on commit 396eac8

Please sign in to comment.