tools/pydfu.py: Display any error strings from device/mboot.
This commit is contained in:
parent
f7130a99b6
commit
38ccb4c643
|
@ -161,6 +161,13 @@ def clr_status():
|
|||
def get_status():
|
||||
"""Get the status of the last operation."""
|
||||
stat = __dev.ctrl_transfer(0xA1, __DFU_GETSTATUS, 0, __DFU_INTERFACE, 6, 20000)
|
||||
|
||||
# firmware can provide an optional string for any error
|
||||
if stat[5]:
|
||||
message = get_string(__dev, stat[5])
|
||||
if message:
|
||||
print(message)
|
||||
|
||||
return stat[4]
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue