Skip to content

Updated adafruit_ds1307.py to allow Square Wave settings #1

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

Merged
merged 1 commit into from
May 20, 2022

Conversation

coplate
Copy link
Owner

@coplate coplate commented May 20, 2022

The existing code relied on checking the values of the square wave register, and confirming that the default of 0x#3 was set. These values are user selectable and should not be used to validate the device is an DS1307.
I followed the same logic, but applied it to the fields that are guaranteed to always be 0 in the DS1307 manual, instead of using user-changeable values.

The existing code relied on checking the values of the square wave register, and confirming that the default of 0x#3 was set.  These values are user selectable and should not be used to validate the device is an DS1307.
I followed the same logic, but applied it to the fields that are guaranteed to always be 0 in the DS1307 manual, instead of using user-changeable values.
@coplate coplate merged commit ceeef55 into main May 20, 2022
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

Successfully merging this pull request may close these issues.

1 participant