Skip to content

Commit 3e41a74

Browse files
committed
remove the cflag check
1 parent a7e909a commit 3e41a74

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

tools/src/stm32flash_serial/src/serial_posix.c

Lines changed: 8 additions & 1 deletion
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)