# Functions
GetTermios returns a filled-in Termios, from an fd.
GetWinSize gets window size from an fd.
GTTY returns the TTY struct for a given fd.
MakeRaw modifies Termio state so, if it used for an fd or tty, it will set it to raw mode.
MakeSerialBaud updates the Termios to set the baudrate.
MakeSerialDefault updates the Termios to typical serial configuration: - Ignore all flow control (modem, hardware, software...) - Translate carriage return to newline on input - Enable canonical mode: Input is available line by line, with line editing enabled (ERASE, KILL are supported) - Local ECHO is added (and handled by line editing) - Map newline to carriage return newline on output.
New creates a new TTYIO using /dev/tty.
NewTTYS returns a new TTYIO.
NewWithDev creates a new TTYIO with the specified device.
Raw sets a TTY into raw more, returning a TTY struct.
SetTermios sets tty parameters for an fd from a Termios.
SetWinSize sets window size for an fd from a Winsize.