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

Would be nice to have BBSQW option to squareWave() #17

Open
bperrybap opened this issue Nov 16, 2015 · 0 comments
Open

Would be nice to have BBSQW option to squareWave() #17

bperrybap opened this issue Nov 16, 2015 · 0 comments

Comments

@bperrybap
Copy link

Currently, there is no way in the existing squareWave() API function to tell it that you want the square wave/INT pin output to work when on battery backup.
You currently have to do it manually with something like this:

RTC.writeRTC(RTC_CONTROL, (RTC.readRTC(RTC_CONTROL) | _BV(BBSQW)));

While it works, it is a bit ugly.
Having it in the API would be a nice addition.
My suggestion would be to add a flag parameter to the squareWave() function that if true would set the BBSQW bit. And then in the header file set it to false if not specified.
This allows it to be backward compatible with existing code and yet provide the new functionality for those that want/need it.

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

No branches or pull requests

1 participant