Skip to content
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

Make AnyPin accessible from ::gpio::AnyPin? #1917

Closed
plaes opened this issue Aug 10, 2024 · 3 comments · Fixed by #1918
Closed

Make AnyPin accessible from ::gpio::AnyPin? #1917

plaes opened this issue Aug 10, 2024 · 3 comments · Fixed by #1918
Labels
peripheral:gpio GPIO peripheral

Comments

@plaes
Copy link
Contributor

plaes commented Aug 10, 2024

Currently import path for AnyPin for esp-hal is ::gpio::any_pin::AnyPin. Both embassy-nrf and embassy-stm32 have AnyPin under ::gpio::AnyPin.
Would it make sense to switch to ::gpio::AnyPin for esp-hal as well?

@bjoernQ
Copy link
Contributor

bjoernQ commented Aug 12, 2024

Not saying we shouldn't but re-exporting the types doesn't look too nice in the docs:

image

If we think this improves the user experience we might want to move the code from the module into the super-module - originally, I wanted to have it separated because gpio.rs is already quite large

However no strong opinion on this - just something to consider

@plaes
Copy link
Contributor Author

plaes commented Aug 12, 2024

Hmm.. need to check how #[doc(inline)] affects this.

@jessebraham jessebraham added the peripheral:gpio GPIO peripheral label Aug 12, 2024
@plaes
Copy link
Contributor Author

plaes commented Aug 13, 2024

Not saying we shouldn't but re-exporting the types doesn't look too nice in the docs:

image

If we think this improves the user experience we might want to move the code from the module into the super-module - originally, I wanted to have it separated because gpio.rs is already quite large

However no strong opinion on this - just something to consider

I seem to managed to fix it by hiding the documentation for any_pin submodule via #doc(hidden). I still kept it public to not break existing applications, but it doesn't show up in documentation anymore.
Unfortunately there doesn't seem to be a way to mark a certain import path as deprecated.

@github-project-automation github-project-automation bot moved this from Todo to Done in esp-rs Aug 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
peripheral:gpio GPIO peripheral
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants