-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Export FmcSdramConfiguration and FmcSdramTiming structs #2
Conversation
6790f3d
to
3a82b98
Compare
Found a small workaround for my issue, which is to use a However, I still think it would be useful to be able to implement the trait outside the crate. |
This allows implementing SdramChip outside of this crate
3a82b98
to
2cb4422
Compare
Thanks! Agreed that exporting these is correct. Actually the naming is a bit confusing also, perhaps this is a good time to rename them to It would also be useful to add a new test for implementing Once this PR is merged I can make a patch release (0.2.1) which will be automatically used by |
I've implemented what you suggested. For the test I just copied the existing |
Awesome, looks good to me |
v0.2.1 released https://crates.io/crates/stm32-fmc |
Thanks! 👍 |
This allows implementing
SdramChip
outside of this crate.This is useful when implementing a new device. Projects depending on this crate would not have to depend on a fork while waiting for a PR to be merged with the new device.
It would also make it much easier implementing a new device when depending on a HAL crate. In my case I was depending on
stm32h7xx-hal
(which depends onstm32-fmc
) as well as depending on a local version ofstm32-fmc
with a new device implementation. This caused the issue described here: rust-lang/rust#22750. Not being able to implementSdramChip
outside of the crate would force me to maintain forks of bothstm32-fmc
as well asstm32h7xx-hal
until 1)stm32-fmc
merges a PR, and 2)stm32h7xx-hal
would adopt the new release.I'm not sure if the structs were ever meant to be exposed, but I think having some way to implement the
SdramChip
trait outside of this crate would be really helpful.