Skip to content

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

@bperrybap

Description

@bperrybap

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions