mirror of
https://github.com/AsahiLinux/m1n1
synced 2024-11-27 08:50:17 +00:00
m1n1.proxy: Allow overriding default timeout with M1N1TIMEOUT
Signed-off-by: Hector Martin <marcan@marcan.st>
This commit is contained in:
parent
017f050fff
commit
cc39491863
2 changed files with 3 additions and 2 deletions
|
@ -139,7 +139,7 @@ class UartInterface(Reloadable):
|
|||
#d = self.dev.read(1)
|
||||
#while d != "":
|
||||
#d = self.dev.read(1)
|
||||
self.dev.timeout = 3
|
||||
self.dev.timeout = int(os.environ.get("M1N1TIMEOUT", "3"))
|
||||
self.tty_enable = True
|
||||
self.handlers = {}
|
||||
self.evt_handlers = {}
|
||||
|
|
|
@ -441,6 +441,7 @@ class GuardedHeap:
|
|||
self.ptrs = set()
|
||||
|
||||
def bootstrap_port(iface, proxy):
|
||||
to = iface.dev.timeout
|
||||
try:
|
||||
iface.dev.timeout = 0.15
|
||||
iface.nop()
|
||||
|
@ -449,4 +450,4 @@ def bootstrap_port(iface, proxy):
|
|||
iface.dev.baudrate = 1500000
|
||||
|
||||
iface.nop()
|
||||
iface.dev.timeout = 3
|
||||
iface.dev.timeout = to
|
||||
|
|
Loading…
Reference in a new issue