-
Notifications
You must be signed in to change notification settings - Fork 8
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
FlexIO module naming consistency for 1011, 1021 #37
Comments
Here's how this was solved for ADC and PWM peripherals on the 1011. Something similar should still work for FlexIO. imxrt-ral/devices/imxrt1011.yaml Lines 17 to 30 in 0b0d968
|
This is a breaking change, though, so it will require a major version bump. Although you are probably aware. |
I haven't tried anything yet, but I think there's a backwards-compatible approach. After correcting the module name, I'll create a 0.5 release branch. Then, I'll manually add modules for the old name, something like #[deprecated(since = "0.5.1", note = "Use the 'flexio' module instead of this module")]
pub mod flexio1 {
pub use super::flexio::*;
} If that all works, we could release that in 0.5.1 for immediate use in the HAL. I assume the maintainer burden to keep the patches for the rest of the 0.5 release. A commit with some smoke tests could help us make sure this all works, and help me with any longer-term maintenance. The path Specific to the clock gate routines, the HAL handles this with a branch that checks for the "sole instance" const generic. Here's the ADC clock gate implementation. |
@mciantyre I added the first part of your suggestion. If you volunteer to provide the |
I also added a namespace existence smoke test in that PR. |
@mciantyre Any feedback on this? What's missing? |
Since the 1011 and 1021 MCUs only have one FlexIO peripheral instance, the RAL generation pipeline names the module as
flexio1
.imxrt-ral/src/imxrt1011.rs
Line 704 in 0b0d968
This prevents us from using a consistent module path in Rust code. See the (current) build status of imxrt-rs/imxrt-hal#139 for an example of an issue that manifests when names aren't consistent.
Use renaming techniques (SVD patches,
raltool
transforms) to renameflexio1
toflexio
in 1011 and 1021 MCUs.The text was updated successfully, but these errors were encountered: