term: github.com/pkg/term/termios Index | Files

package termios

import "github.com/pkg/term/termios"

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.


Package Files

doc.go ioctl.go pty.go pty_linux.go termios.go termios_const.go termios_linux.go


const (
    TCIFLUSH  = 0
    TCOFLUSH  = 1

    TCSANOW   = 0
const (
    TCSETS  = 0x5402
    TCSETSW = 0x5403
    TCSETSF = 0x5404
    TCFLSH  = 0x540B
    TCSBRK  = 0x5409
    TCSBRKP = 0x5425

    IXON    = 0x00000400
    IXANY   = 0x00000800
    IXOFF   = 0x00001000
    CRTSCTS = 0x80000000

func Cfgetispeed Uses

func Cfgetispeed(attr *syscall.Termios) uint32

Cfgetispeed returns the input baud rate stored in the termios structure.

func Cfgetospeed Uses

func Cfgetospeed(attr *syscall.Termios) uint32

Cfgetospeed returns the output baud rate stored in the termios structure.

func Cfmakecbreak Uses

func Cfmakecbreak(attr *syscall.Termios)

Cfmakecbreak modifies attr for cbreak mode.

func Cfmakeraw Uses

func Cfmakeraw(attr *syscall.Termios)

Cfmakeraw modifies attr for raw mode.

func Ptsname Uses

func Ptsname(fd uintptr) (string, error)

func Pty Uses

func Pty() (*os.File, *os.File, error)

Pty returns a UNIX 98 pseudoterminal device. Pty returns a pair of fds representing the master and slave pair.

func Tcdrain Uses

func Tcdrain(fd uintptr) error

Tcdrain waits until all output written to the object referred to by fd has been transmitted.

func Tcflush Uses

func Tcflush(fd, selector uintptr) error

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.

func Tcgetattr Uses

func Tcgetattr(fd uintptr, argp *syscall.Termios) error

Tcgetattr gets the current serial port settings.

func Tcsendbreak Uses

func Tcsendbreak(fd, duration uintptr) error

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.

func Tcsetattr Uses

func Tcsetattr(fd, action uintptr, argp *syscall.Termios) error

Tcsetattr sets the current serial port settings.

func Tiocinq Uses

func Tiocinq(fd uintptr, argp *int) error

Tiocinq returns the number of bytes in the input buffer.

func Tiocmbic Uses

func Tiocmbic(fd uintptr, status *int) error

Tiocmbic clears the indicated modem bits.

func Tiocmbis Uses

func Tiocmbis(fd uintptr, status *int) error

Tiocmbis sets the indicated modem bits.

func Tiocmget Uses

func Tiocmget(fd uintptr, status *int) error

Tiocmget returns the state of the MODEM bits.

func Tiocmset Uses

func Tiocmset(fd uintptr, status *int) error

Tiocmset sets the state of the MODEM bits.

func Tiocoutq Uses

func Tiocoutq(fd uintptr, argp *int) error

Tiocoutq return the number of bytes in the output buffer.

Package termios imports 4 packages (graph) and is imported by 25 packages. Updated 2019-01-09. Refresh now. Tools for package owners.