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

Improve SPI, RCC and AFIO documentation #233

Merged
merged 4 commits into from
Jun 24, 2020

Conversation

TheZoq2
Copy link
Member

@TheZoq2 TheZoq2 commented Jun 21, 2020

The lack of documentation for how to get a hold of the Rcc and Afio structs has bothered me for a while. This fixes that, along with adding some top level documentation to the SPI module

/// Aquired by calling [constrain](trait.AfioExt.html#constrain) on the [AFIO
/// registers](../pac/struct.AFIO.html)
///
/// ```rust
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rust is superfluous here as it is automatically assumed, but doc tests for embedded should probably at least feature the no_run attribute (if they can be compiled but will not run on the host) or even ignore if the example cannot compile due to ficticious code.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh right, I almost forgot doctests are a thing. It would be nice to them where possible, though I feel like it might require a fair amount of extra code in a lot of docstrings.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since it seems to be kind of difficult to run doctests right now, I'd say we should merge this, release a new version to get updated docs on docs.rs, and then sort out doctests later.

Any objections?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a conflict though.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh right, there are always changelog problems :) I'll merge #183 then sort these out and merge this

@TheZoq2 TheZoq2 merged commit 494b996 into stm32-rs:master Jun 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants