-
-
Notifications
You must be signed in to change notification settings - Fork 283
pwm improvements #304
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
pwm improvements #304
Conversation
-add capability to change pwm signal frequency with analogWriteFrequency -improve pwm signal frequency accuracy
@eriknyquist @SidLeung ready for review |
@@ -47,7 +49,7 @@ extern void analogReference( eAnalogReference ulMode ) ; | |||
* \param pin | |||
* \param val | |||
*/ | |||
extern void analogWrite( uint8_t pin, int val ) ; | |||
extern void analogWrite( uint8_t pin, uint32_t val ) ; |
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.
Is this required (changing the API)? Assuming we're still just looking for a positive integer, can you leave the analogWrite
declaration as it was, and instead cast to uint32_t as needed?
* | ||
* \param res | ||
*/ | ||
extern void analogWriteFrequency(uint8_t pin, uint32_t freq); |
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.
would recommend using int
for both pin and freq, if possible-- just more Arduino-y :)
+1 |
@bigdinotech ready for merging? |
@eriknyquist still needs to be tested |
-add capability to change pwm signal frequency with analogWriteFrequency
-improve pwm signal frequency accuracy