mirror of
https://github.com/AsahiLinux/m1n1
synced 2025-02-17 06:08:28 +00:00
m1n1.proxyutils: Only set baud if connected via serial
Signed-off-by: Hector Martin <marcan@marcan.st>
This commit is contained in:
parent
99e38d24d0
commit
6c070fa224
1 changed files with 11 additions and 5 deletions
|
@ -442,12 +442,18 @@ class GuardedHeap:
|
|||
|
||||
def bootstrap_port(iface, proxy):
|
||||
to = iface.dev.timeout
|
||||
do_baud = True
|
||||
try:
|
||||
iface.dev.timeout = 0.15
|
||||
iface.nop()
|
||||
proxy.set_baud(1500000)
|
||||
except UartTimeout:
|
||||
iface.dev.baudrate = 1500000
|
||||
do_baud = proxy.iodev_whoami() == IODEV.UART
|
||||
except ProxyCommandError:
|
||||
pass
|
||||
if do_baud:
|
||||
try:
|
||||
iface.dev.timeout = 0.15
|
||||
iface.nop()
|
||||
proxy.set_baud(1500000)
|
||||
except UartTimeout:
|
||||
iface.dev.baudrate = 1500000
|
||||
|
||||
iface.nop()
|
||||
iface.dev.timeout = to
|
||||
|
|
Loading…
Add table
Reference in a new issue