stm32-rs / meta

Meta discussions and files applicable to the entire stm32-rs project
3 stars 0 forks source link

Common crate(s) for code shared between hal crates #6

Open davidlattimore opened 3 years ago

davidlattimore commented 3 years ago

What do people think of having a crate (or crates?) for bits of code that's shared between crates. At the moment in particular, I'm thinking of the code that computes the value for the timing register in the i2c peripheral of many devices. This code is somewhat complex and sharing it would make it easier to fix bugs across multiple HALs. See this issue. The same bug seems to be present in many other HAL crates. The h7 crate has tests for the code and could serve as a basis for a shared crate.

Questions: