diff options
Diffstat (limited to 'tools/pydfu.py')
-rwxr-xr-x | tools/pydfu.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/pydfu.py b/tools/pydfu.py index 36465aa91..030f56bf8 100755 --- a/tools/pydfu.py +++ b/tools/pydfu.py @@ -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] |