Lines Matching defs:termios
9 #include <termios.h>
18 tcgetattr(int fd, struct termios *termios)
20 return ioctl(fd, TCGETA, termios);
26 tcsetattr(int fd, int opt, const struct termios *termios)
49 return ioctl(fd, method, termios);
57 /* Some termios implementations have a TIOCDRAIN command
106 cfgetispeed(const struct termios *termios)
108 if ((termios->c_cflag & CBAUD) == CBAUD)
109 return termios->c_ispeed;
111 return termios->c_cflag & CBAUD;
116 cfsetispeed(struct termios *termios, speed_t speed)
123 termios->c_cflag |= CBAUD;
124 termios->c_ispeed = speed;
128 termios->c_cflag &= ~CBAUD;
129 termios->c_cflag |= speed;
135 cfgetospeed(const struct termios *termios)
137 if ((termios->c_cflag & CBAUD) == CBAUD)
138 return termios->c_ospeed;
140 return termios->c_cflag & CBAUD;
145 cfsetospeed(struct termios *termios, speed_t speed)
149 termios->c_cflag |= CBAUD;
150 termios->c_ospeed = speed;
154 termios->c_cflag &= ~CBAUD;
155 termios->c_cflag |= speed;
161 cfmakeraw(struct termios *termios)
163 termios->c_iflag &= ~(IGNBRK | BRKINT | PARMRK | ISTRIP | INLCR | IGNCR
165 termios->c_oflag &= ~OPOST;
166 termios->c_lflag &= ~(ECHO | ECHONL | ICANON | ISIG | IEXTEN);
167 termios->c_cflag &= ~(CSIZE | PARENB);
168 termios->c_cflag |= CS8;
169 termios->c_cc[VMIN] = 1; // input is available character by character
170 termios->c_cc[VTIME] = 0;