proxy.py: add a ttymode() call to switch to a dump terminal print

TODO: implement input

Signed-off-by: Hector Martin <marcan@marcan.st>
This commit is contained in:
Hector Martin 2021-01-23 22:32:49 +09:00
parent 674a82a2bb
commit e1f0be37b4

View file

@ -133,6 +133,13 @@ class UartInterface:
sys.stdout.write(chr(c))
sys.stdout.flush()
def ttymode(self):
self.tty_enable = True
self.dev.timeout = None
while True:
sys.stdout.buffer.write(self.readfull(1))
sys.stdout.buffer.flush()
def reply(self, cmd):
reply = b''
while True: