-
Notifications
You must be signed in to change notification settings - Fork 313
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
Refactored setting prescale, add setPrescale #65
base: master
Are you sure you want to change the base?
Conversation
Thank you @Bolukan. |
i believe this was hand-added in last push - please check? |
I removed a change (25.000.000 to a constant) back on his request in the last commit. |
ok i did a bit of work on it in last push, please check and adjust PR as necessary - thank you :) |
I dont know if I used the right route ('Comply to current master branche', 'Merge pull request #1 from adafruit/master' and 'use setPrescale function') and it took some time to get compliant to clang-format. But work is done ... |
nice work! |
@Bolukan As you are adding a new function, would you also update the Thank you in advance. |
Done commenting out line (in example) and update keywords with new functions in current version |
it needs to be hardware-reviewed since its a code not documentaiton change |
Scope
Refactored the code for setting prescale which was in the code twice and moved it to a
void setPrescale(uint8_t prescale, bool extclk=false)
function.Known limitations
A private setPrescale function could be preferred.
I refrained from changing the definition of existing functions, but considered
void setExternalOscillator(void)
function.Tests and examples
In pwmtest.ino an example of setPrescale is added.