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

Documentation updates and cleanup #148

Merged
merged 5 commits into from
Dec 3, 2019
Merged

Conversation

TheZoq2
Copy link
Member

@TheZoq2 TheZoq2 commented Dec 2, 2019

This fixes #144, both in terms of making that example compile without extra features, and documenting the features.

While i'm at it, I also updated the PWM and timer docs, and cleaned up Cargo.toml

Copy link
Member

@therealprof therealprof left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@geomatsi geomatsi left a comment

Choose a reason for hiding this comment

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

LGTM, thanks !

Ready for release ?

src/pwm.rs Outdated

// Set up the timer as a PWM output. Since there are multiple remap
// options for tim2 that use the same pins, you need to specify
// the remap generic parameter.
Copy link
Contributor

Choose a reason for hiding this comment

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

cc: @burrbull

In fact, this is not exactly so. It is possible to omit remap generic parameter in many cases when compiler is able to deduce mapping from the selected pins. It can be skipped on the first attempt and compiler will complain if it can not figure out the specific pin combination :)

How about updating this section, e.g. something along the following lines:

Set up the timer as a PWM output. If selected pins may correspond to different remap options,
then you shall specify the remap generic parameter. Otherwise, if there is no such ambiguity,
the remap generic parameter can be omitted without complains from the compiler.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yea, that's what I meant to say but I agree it's pretty unclear. Your wording is a lot better :)

@TheZoq2 TheZoq2 merged commit b0b696c into stm32-rs:master Dec 3, 2019
@TheZoq2 TheZoq2 deleted the doc_updates branch December 3, 2019 16:33
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.

pwm example compile error
3 participants