Files
PX4-Autopilot/nuttx-patches/fix_CRTSCTS-define.patch
T
Lorenz Meier 8a58cf0daa Fix usage of CRTSCTS define from termios.h
NuttX had the CRTSCTS define incorrectly set for only output flow control, which broke our flow control logic. This commit patches NuttX and puts in addition a guard in place to prevent any future issue with the non-POSIX define being incorrect.

This has been debugged and identified by @ecmnet, which was the main contribution for this patch.
2016-12-26 12:08:05 +01:00

13 lines
630 B
Diff

diff -ruN NuttX/nuttx/include/termios.h NuttX/nuttx/include/termios.h
--- NuttX/nuttx/include/termios.h 1969-12-31 14:00:00.000000000 -1000
+++ NuttX/nuttx/include/termios.h 2014-12-25 17:33:53.404950574 -1000
@@ -110,8 +110,8 @@
#define HUPCL (1 << 6) /* Bit 6: Hang up on last close */
#define CLOCAL (1 << 7) /* Bit 7: Ignore modem status lines */
#define CCTS_OFLOW (1 << 8) /* Bit 8: CTS flow control of output */
-#define CRTSCTS CCTS_OFLOW
#define CRTS_IFLOW (1 << 9) /* Bit 9: RTS flow control of input */
+#define CRTSCTS (CRTS_IFLOW | CCTS_OFLOW)
/* Local Modes (c_lflag in the termios structure) */