Skip to content

Conversation

paroga
Copy link
Contributor

@paroga paroga commented Sep 1, 2025

I'd like to introduce a trait use embassy-usb-dfu without embassy-boot and implement my own update logic.

Before finishing that / cleaning it up, I'd like to get some feedback on the API and how to upstream that, since it's a very intrusive change and will break all downstream implementations.

@ExplodingWaffle
Copy link
Contributor

Have you seen #2407? It seems to me that the preferred way would be to make DFU just another class in embassy-usb (unless dirbaio changed his mind)

@paroga
Copy link
Contributor Author

paroga commented Sep 1, 2025

Have you seen #2407? It seems to me that the preferred way would be to make DFU just another class in embassy-usb (unless dirbaio changed his mind)

no, I didn't. thanks for the information. any idea how i can help in getting that merged?

@Dirbaio is there something like a list of required things in #2407? can i help somehow to finish it?

@Dirbaio
Copy link
Member

Dirbaio commented Sep 1, 2025

Yes I'd prefer to add the "unopinionated" class implementation to embassy-usb, then the embassy-usb-dfu crate could just use that and wrap it into an "opinionated" api that uses embassy-boot.

The missing thing in #2407 was to change embassy-usb-dfu to use the class so we don't have two implementations. Anyway, it's now quite old, it's probably easier to start from scratch.

@paroga
Copy link
Contributor Author

paroga commented Sep 1, 2025

Yes I'd prefer to add the "unopinionated" class implementation to embassy-usb, then the embassy-usb-dfu crate could just use that and wrap it into an "opinionated" api that uses embassy-boot.

The missing thing in #2407 was to change embassy-usb-dfu to use the class so we don't have two implementations. Anyway, it's now quite old, it's probably easier to start from scratch.

@Dirbaio if you're ok, i'll try to rebase it to latest main and adopt embassy-usb-dfu to use it in the next days/weeks and update this PR with it.

@paroga
Copy link
Contributor Author

paroga commented Sep 2, 2025

@Dirbaio Since the remaining logic is minimal I'd move the embassy-boot adaptation directly into that create and deprecate embassy-usb-dfu. Does that sound reasonable?

If the basic structure looks good, I'll add the missing documentation and adopt the examples too.

@Dirbaio
Copy link
Member

Dirbaio commented Sep 5, 2025

sounds good yes.

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