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

DS3231: Add support for fetching alarm enabled status #269

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

justinnewitter
Copy link
Contributor

This commit introduces one new method for DS3231 devices:

  • bool alarmEnabled(uint8_t alarm_num);

Updated the DS3231_alarm example to fetch the alarm1 enabled status.
Locally validated that this correctly fetches the enabled/disabled status
for alarm2 as well.

Sample output from the DS3231_alarm example

22:43:32 [Alarm1: 20 22:43:36, Mode: Second, Enabled: 1, Fired: 0
22:43:34 [Alarm1: 20 22:43:36, Mode: Second, Enabled: 1, Fired: 0
22:43:36 [Alarm1: 20 22:43:36, Mode: Second, Enabled: 1, Fired: 1 - Alarm cleared
22:43:38 [Alarm1: 20 22:43:36, Mode: Second, Enabled: 1, Fired: 0
22:43:40 [Alarm1: 20 22:43:36, Mode: Second, Enabled: 1, Fired: 0

The Enabled: 1 is what is new 😄

This commit introduces one new method for DS3231 devices:
  - bool alarmEnabled(uint8_t alarm_num);

Updated the DS3231_alarm example to fetch the alarm1
enabled status. Locally validated that this correctly
fetches the enabled/disabled status for alarm2 as well.
@justinnewitter justinnewitter marked this pull request as ready for review December 21, 2022 04:17
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