Skip to content

Conversation

@GabrielNotman
Copy link
Contributor

First commit fixes a bug in setHours() (if hours < 13 and in 12h mode).

The main additions add the ability to set an interrupt based alarm which can call a user specified callback. It will work in sleep mode and the alarm will wake the board. Alarm masking is implemented to create periodic alarms.

Previously was always subtracting 12 hours from
the set hour value (in H12 mode) this cause a bug
if the set hour was <=12.
Now by default the interrupt is enabled but the mask
is set to no compare.
This is not strictly required for a wake alarm
as the IRQ routine will wake the board.
Now the identifiers from /component/rtc.h are used.
@agdl agdl self-assigned this Sep 25, 2015
agdl added a commit that referenced this pull request Sep 25, 2015
Added Alarm/Compare Interrupt Functionality
@agdl agdl merged commit 144952c into arduino-libraries:master Sep 25, 2015
@agdl
Copy link
Member

agdl commented Sep 25, 2015

@GabrielNotman thank you!

agdl added a commit that referenced this pull request Sep 25, 2015
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.

2 participants