diff options
author | px4dev <px4@purgatory.org> | 2012-11-23 23:59:39 -0800 |
---|---|---|
committer | px4dev <px4@purgatory.org> | 2012-11-24 00:01:24 -0800 |
commit | 1f2ad5029a5f3e68423c462c4c8077c65059b775 (patch) | |
tree | 79c942c307b1f8b0456bd70c8c47212e98bbb7e3 /nuttx/include/termios.h | |
parent | b1bc5e0e461856ca8f1cc532eb2023ddbe2cb957 (diff) | |
download | px4-firmware-1f2ad5029a5f3e68423c462c4c8077c65059b775.tar.gz px4-firmware-1f2ad5029a5f3e68423c462c4c8077c65059b775.tar.bz2 px4-firmware-1f2ad5029a5f3e68423c462c4c8077c65059b775.zip |
Improved termios support for the STM32 UART driver. Also add a little more termios processing to the generic serial layer. Implement FIONREAD.
Diffstat (limited to 'nuttx/include/termios.h')
-rw-r--r-- | nuttx/include/termios.h | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/nuttx/include/termios.h b/nuttx/include/termios.h index e381814e3..976da7970 100644 --- a/nuttx/include/termios.h +++ b/nuttx/include/termios.h @@ -58,7 +58,7 @@ #define INLCR (1 << 5) /* Bit 5: Map NL to CR on input */ #define INPCK (1 << 6) /* Bit 6: Enable input parity check */ #define ISTRIP (1 << 7) /* Bit 7: Strip character */ -#define IUCLC (1 << 8) /* Bit 8: Map upper-case to lower-case on input (LEGACY) */ + /* Bit 8: unused */ #define IXANY (1 << 9) /* Bit 9: Enable any character to restart output */ #define IXOFF (1 << 10) /* Bit 10: Enable start/stop input control */ #define IXON (1 << 11) /* Bit 11: Enable start/stop output control */ @@ -67,7 +67,7 @@ /* Terminal output modes (c_oflag in the termios structure) */ #define OPOST (1 << 0) /* Bit 0: Post-process output */ -#define OLCUC (1 << 1) /* Bit 1: Map lower-case to upper-case on output (LEGACY) */ + /* Bit 1: unused */ #define ONLCR (1 << 2) /* Bit 2: Map NL to CR-NL on output */ #define OCRNL (1 << 3) /* Bit 3: Map CR to NL on output */ #define ONOCR (1 << 4) /* Bit 4: No CR output at column 0 */ @@ -98,17 +98,20 @@ /* Control Modes (c_cflag in the termios structure) */ -#define CSIZE (3 << 0) /* Bits 0-1: Character size: */ -# define CS5 (0 << 0) /* 5 bits */ -# define CS6 (1 << 0) /* 6 bits */ -# define CS7 (2 << 0) /* 7 bits */ -# define CS8 (3 << 0) /* 8 bits */ -#define CSTOPB (1 << 2) /* Bit 2: Send two stop bits, else one */ -#define CREAD (1 << 3) /* Bit 3: Enable receiver */ -#define PARENB (1 << 4) /* Bit 4: Parity enable */ -#define PARODD (1 << 5) /* Bit 5: Odd parity, else even */ -#define HUPCL (1 << 6) /* Bit 6: Hang up on last close */ -#define CLOCAL (1 << 7) /* Bit 7: Ignore modem status lines */ +#define CSIZE (3 << 0) /* Bits 0-1: Character size: */ +# define CS5 (0 << 0) /* 5 bits */ +# define CS6 (1 << 0) /* 6 bits */ +# define CS7 (2 << 0) /* 7 bits */ +# define CS8 (3 << 0) /* 8 bits */ +#define CSTOPB (1 << 2) /* Bit 2: Send two stop bits, else one */ +#define CREAD (1 << 3) /* Bit 3: Enable receiver */ +#define PARENB (1 << 4) /* Bit 4: Parity enable */ +#define PARODD (1 << 5) /* Bit 5: Odd parity, else even */ +#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 */ /* Local Modes (c_lflag in the termios structure) */ @@ -121,7 +124,6 @@ #define ISIG (1 << 6) /* Bit 6: Enable signals */ #define NOFLSH (1 << 7) /* Bit 7: Disable flush after interrupt or quit */ #define TOSTOP (1 << 8) /* Bit 8: Send SIGTTOU for background output */ -#define XCASE (1 << 9) /* Bit 9: Canonical upper/lower presentation (LEGACY) */ /* The following are subscript names for the termios c_cc array */ |