Skip to content
This repository was archived by the owner on Oct 5, 2021. It is now read-only.

Commit 1791dba

Browse files
jcwfpistm
authored andcommitted
Remove the cflag check
Signed-off-by: Jean-Claude Wippler <[email protected]>
1 parent 02d7d34 commit 1791dba

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

serial_posix.c

+8-1
Original file line numberDiff line numberDiff line change
@@ -182,11 +182,18 @@ static port_err_t serial_setup(serial_t *h, const serial_baud_t baud,
182182
if (tcsetattr(h->fd, TCSANOW, &h->newtio) != 0)
183183
return PORT_ERR_UNKNOWN;
184184

185+
/* this check fails on CDC-ACM devices, bits 16 and 17 of cflag differ!
186+
* it has been disabled below for now -jcw, 2015-11-09
187+
if (settings.c_cflag != h->newtio.c_cflag)
188+
fprintf(stderr, "c_cflag mismatch %lx\n",
189+
settings.c_cflag ^ h->newtio.c_cflag);
190+
*/
191+
185192
/* confirm they were set */
186193
tcgetattr(h->fd, &settings);
187194
if (settings.c_iflag != h->newtio.c_iflag ||
188195
settings.c_oflag != h->newtio.c_oflag ||
189-
settings.c_cflag != h->newtio.c_cflag ||
196+
//settings.c_cflag != h->newtio.c_cflag ||
190197
settings.c_lflag != h->newtio.c_lflag)
191198
return PORT_ERR_UNKNOWN;
192199

0 commit comments

Comments
 (0)