Skip to content

Commit 7715cae

Browse files
authored
Merge pull request #14 from CGilavert/patch-2
Fix wrong mask used for the Hour Alarm register
2 parents 048db8a + c4af05a commit 7715cae

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/EdgeControl_RealTimeClock.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ void EdgeControl_RealTimeClockClass::setHourAlarm(uint8_t hours)
357357
{
358358
uint8_t dec = hours / 10;
359359
uint8_t unit = hours - (dec * 10);
360-
uint8_t hour_alarm = PCF8563T_HOUR_ALARM_AE_H_MASK & ((dec << 4) + unit);
360+
uint8_t hour_alarm = PCF8563T_HOUR_ALARM_ON & ((dec << 4) + unit);
361361
writeByte(PCF8563T_HOUR_ALARM_REG, hour_alarm); // check formula on datasheet val + 6 * (val / 10)
362362
}
363363

0 commit comments

Comments
 (0)