Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- stty -F /dev/ttyO0 speed 115200
- stty -F /dev/ttyO0 raw
- stty -F /dev/ttyO0 speed 115200
- stty -F /dev/ttyO0 -echo
- #define TIOCGRS485 0x542e
- #define TIOCSRS485 0x542f
- struct serial_rs485 rs485conf;
- if ((ttydev = open( argv[i + 1], O_RDWR | O_NOCTTY | O_NONBLOCK)) < 0)
- errOut( "\nERROR parsevil: TTY device could not be opened: %s\n\n", argv[i + 1]);
- rs485conf.flags |= SER_RS485_ENABLED;
- rs485conf.flags |= SER_RS485_RTS_ON_SEND;
- if (ioctl (ttydev, TIOCSRS485, &rs485conf) < 0)
- {
- printf("ioctrl Error handling. See errno. \n");
- }else
- {
- printf("set rs485 ok\n");
- }
Add Comment
Please, Sign In to add comment