avrsim: update avrsim pty attr (#2343)
Signed-off-by: Georgios Karnas <kargeor@gmail.com>
This commit is contained in:
parent
f88117c7e4
commit
393f37dbfc
|
@ -150,9 +150,19 @@ def create_pty(ptyname):
|
||||||
os.symlink(os.ttyname(sfd), ptyname)
|
os.symlink(os.ttyname(sfd), ptyname)
|
||||||
fcntl.fcntl(mfd, fcntl.F_SETFL
|
fcntl.fcntl(mfd, fcntl.F_SETFL
|
||||||
, fcntl.fcntl(mfd, fcntl.F_GETFL) | os.O_NONBLOCK)
|
, fcntl.fcntl(mfd, fcntl.F_GETFL) | os.O_NONBLOCK)
|
||||||
old = termios.tcgetattr(mfd)
|
tcattr = termios.tcgetattr(mfd)
|
||||||
old[3] = old[3] & ~termios.ECHO
|
tcattr[0] &= ~(
|
||||||
termios.tcsetattr(mfd, termios.TCSADRAIN, old)
|
termios.IGNBRK | termios.BRKINT | termios.PARMRK | termios.ISTRIP |
|
||||||
|
termios.INLCR | termios.IGNCR | termios.ICRNL | termios.IXON)
|
||||||
|
tcattr[1] &= ~termios.OPOST
|
||||||
|
tcattr[3] &= ~(
|
||||||
|
termios.ECHO | termios.ECHONL | termios.ICANON | termios.ISIG |
|
||||||
|
termios.IEXTEN)
|
||||||
|
tcattr[2] &= ~(termios.CSIZE | termios.PARENB)
|
||||||
|
tcattr[2] |= termios.CS8
|
||||||
|
tcattr[6][termios.VMIN] = 0
|
||||||
|
tcattr[6][termios.VTIME] = 0
|
||||||
|
termios.tcsetattr(mfd, termios.TCSAFLUSH, tcattr)
|
||||||
return mfd
|
return mfd
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
|
Loading…
Reference in New Issue