12 #define termios asmtermios 14 #include <asm/termios.h> 44 printf(
"\t[RT SERIAL] Configuring serial device...\n");
47 ioctl(fd, TCGETS2, &tty);
48 tty.c_cflag &= ~CBAUD;
49 tty.c_cflag |= BOTHER;
53 tty.c_cflag = (tty.c_cflag & ~CSIZE) | CS8;
56 tty.c_iflag &= ~IGNBRK;
63 tty.c_iflag &= ~(IXON | IXOFF | IXANY);
65 tty.c_cflag |= (CLOCAL | CREAD);
68 tty.c_cflag |= PARENB;
69 tty.c_cflag &= ~CSTOPB;
70 tty.c_cflag &= ~CRTSCTS;
73 ioctl(fd, TCSETS2, &tty);
int set_interface_attribs_custom_baud(int fd, int speed, int parity, int port)
Configure serial port.