| 1 | /* termios baud rate selection definitions. Universal version for sane speed_t. |
| 2 | Copyright (C) 2019-2026 Free Software Foundation, Inc. |
| 3 | This file is part of the GNU C Library. |
| 4 | |
| 5 | The GNU C Library is free software; you can redistribute it and/or |
| 6 | modify it under the terms of the GNU Lesser General Public |
| 7 | License as published by the Free Software Foundation; either |
| 8 | version 2.1 of the License, or (at your option) any later version. |
| 9 | |
| 10 | The GNU C Library is distributed in the hope that it will be useful, |
| 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 13 | Lesser General Public License for more details. |
| 14 | |
| 15 | You should have received a copy of the GNU Lesser General Public |
| 16 | License along with the GNU C Library. If not, see |
| 17 | <https://www.gnu.org/licenses/>. */ |
| 18 | |
| 19 | #ifndef _TERMIOS_H |
| 20 | # error "Never include <bits/termios-baud.h> directly; use <termios.h> instead." |
| 21 | #endif |
| 22 | |
| 23 | /* POSIX required baud rates */ |
| 24 | #define B0 0U /* Hang up or ispeed == ospeed */ |
| 25 | #define B50 50U |
| 26 | #define B75 75U |
| 27 | #define B110 110U |
| 28 | #define B134 134U /* Really 134.5 baud by POSIX spec */ |
| 29 | #define B150 150U |
| 30 | #define B200 200U |
| 31 | #define B300 300U |
| 32 | #define B600 600U |
| 33 | #define B1200 1200U |
| 34 | #define B1800 1800U |
| 35 | #define B2400 2400U |
| 36 | #define B4800 4800U |
| 37 | #define B9600 9600U |
| 38 | #define B19200 19200U |
| 39 | #define B38400 38400U |
| 40 | #ifdef __USE_MISC |
| 41 | # define EXTA B19200 |
| 42 | # define EXTB B38400 |
| 43 | #endif |
| 44 | |
| 45 | /* Other baud rates, "nonstandard" but known to be used */ |
| 46 | #define B7200 7200U |
| 47 | #define B14400 14400U |
| 48 | #define B28800 28800U |
| 49 | #define B33600 33600U |
| 50 | #define B57600 57600U |
| 51 | #define B76800 76800U |
| 52 | #define B115200 115200U |
| 53 | #define B153600 153600U |
| 54 | #define B230400 230400U |
| 55 | #define B307200 307200U |
| 56 | #define B460800 460800U |
| 57 | #define B500000 500000U |
| 58 | #define B576000 576000U |
| 59 | #define B614400 614400U |
| 60 | #define B921600 921600U |
| 61 | #define B1000000 1000000U |
| 62 | #define B1152000 1152000U |
| 63 | #define B1500000 1500000U |
| 64 | #define B2000000 2000000U |
| 65 | #define B2500000 2500000U |
| 66 | #define B3000000 3000000U |
| 67 | #define B3500000 3500000U |
| 68 | #define B4000000 4000000U |
| 69 | #define B5000000 5000000U |
| 70 | #define B10000000 10000000U |
| 71 | |
| 72 | #ifdef __USE_GNU |
| 73 | #define SPEED_MAX 4294967295U /* maximum valid speed_t value */ |
| 74 | #endif |
| 75 | #define __MAX_BAUD 4294967295U /* legacy alias for SPEED_MAX */ |
| 76 | |