embassy-rs / embassy

Modern embedded framework, using Rust and async.
https://embassy.dev
Apache License 2.0
4.91k stars 672 forks source link

stm32: RCC refactor tracking issue #2515

Closed Dirbaio closed 4 months ago

Dirbaio commented 5 months ago

The 3 designs

Note RCC in embassy-stm32 is a bit "in flux". Currently we have three API designs for RCC depending on the family, for historical reasons. Some have been ported from stm32-rs, some have been developed for embassy but before we knew what the best design is.

Rationale for the v3 design

The refactor

We should port all RCCs to the v3 design, both for consistency between chips and to get the v3 benefits.

While we're at it, it'd be great to unify similar families into a single file. I have already unified a few into l.rs, h.rs, f.rs , but I think the remaining ones are different enough that we might want to keep them separate.

Some candidates to unify are:

Help is welcome!

Help on this would be very welcome. If you want to help:

barnabywalters commented 5 months ago

I made a start on G4, not quite ready to PR yet but hopefully in the next days.

Dirbaio commented 4 months ago

this is now DONE, finally :partying_face: