break out of dfu_make_idle retry loop upon success#442
Merged
brentfpage merged 1 commit intomasterfrom Apr 21, 2026
Merged
Conversation
Collaborator
|
I have no idea what this means but I'll take your word for it, haha. Ship it! |
Contributor
Author
|
Hahha, I promise it's beneficial! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes a bug in the Android-specific stage of firmware flashing that runs
dfu_make_idle. Both pre-PR and in the PR, a loop is used to allow for retries in case thedfu_make_idlecall fails. However, in the pre-PR code, the loop isn't broken whendfu_make_idleis successful. In the PR, the boolmade_idleis used to break the loop upon success. It seems that standard bools aren't available for the adopted C dialect, so I used thedfu_booltype fromdfu-programmer.I figure I'll also take this opportunity to document that the first call to
dfu_make_idlefails withstatus->bStatus: errSTALLEDPKT (0x0f)andstatus->bState: dfuERROR, but the second try goes through just fine, flashing proceeds, and the firmware gets successfully uploaded.