Skip to content

Allow block_num to wrap per DFU spec 6.1.1#30

Merged
cecton merged 3 commits into
dfu-rs:mainfrom
hollandzac:main
Nov 12, 2025
Merged

Allow block_num to wrap per DFU spec 6.1.1#30
cecton merged 3 commits into
dfu-rs:mainfrom
hollandzac:main

Conversation

@hollandzac

Copy link
Copy Markdown
Contributor

Per the DFU specification 6.1.1, wBlockNum is a block sequence number that increments each time a block is transferred, wrapping to zero from 65,535.

Remove the erroneous MaximumChunksExceeded error and use wrapping_add to correctly implement the specified behavior.

Removed that Error variant as it was not used anywhere else.

zachary-biamp and others added 3 commits November 12, 2025 12:08
Per the DFU specification 6.1.1, wBlockNum is a block sequence number
that increments each time a block is transferred, wrapping to zero
from 65,535. Remove the erroneous MaximumChunksExceeded error and use
wrapping_add to correctly implement the specified behavior.
@cecton cecton merged commit 0319a3c into dfu-rs:main Nov 12, 2025
3 checks passed
@cecton

cecton commented Nov 12, 2025

Copy link
Copy Markdown
Member

Thanks a lot! Do you need a release soon?

@hollandzac

Copy link
Copy Markdown
Contributor Author

Thanks a lot! Do you need a release soon?

Yes that would be useful thankyou!

@cecton

cecton commented Nov 12, 2025

Copy link
Copy Markdown
Member

Ok it's released in 0.9.0 for dfu-core and 0.5.5 for dfu-libusb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants