Package termios implements the low level termios(3) terminal line discipline facilities.
For a higher level interface please use the github.com/pkg/term package.
const ( TCIFLUSH = 0 TCOFLUSH = 1 TCIOFLUSH = 2 TCSANOW = 0 TCSADRAIN = 1 TCSAFLUSH = 2 )
const ( TCSETS = 0x5402 TCSETSW = 0x5403 TCSETSF = 0x5404 TCFLSH = 0x540B TCSBRK = 0x5409 TCSBRKP = 0x5425 IXON = 0x00000400 IXANY = 0x00000800 IXOFF = 0x00001000 CRTSCTS = 0x80000000 )
Cfgetispeed returns the input baud rate stored in the termios structure.
Cfgetospeed returns the output baud rate stored in the termios structure.
Cfmakecbreak modifies attr for cbreak mode.
Cfmakeraw modifies attr for raw mode.
Pty returns a UNIX 98 pseudoterminal device. Pty returns a pair of fds representing the master and slave pair.
Tcdrain waits until all output written to the object referred to by fd has been transmitted.
Tcflush discards data written to the object referred to by fd but not transmitted, or data received but not read, depending on the value of selector.
Tcgetattr gets the current serial port settings.
Tcsendbreak transmits a continuous stream of zero-valued bits for a specific duration, if the terminal is using asynchronous serial data transmission. If duration is zero, it transmits zero-valued bits for at least 0.25 seconds, and not more that 0.5 seconds. If duration is not zero, it sends zero-valued bits for some implementation-defined length of time.
Tcsetattr sets the current serial port settings.
Tiocinq returns the number of bytes in the input buffer.
Tiocmbic clears the indicated modem bits.
Tiocmbis sets the indicated modem bits.
Tiocmget returns the state of the MODEM bits.
Tiocmset sets the state of the MODEM bits.
Tiocoutq return the number of bytes in the output buffer.