-
Notifications
You must be signed in to change notification settings - Fork 182
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this 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. |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 :)
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