summaryrefslogtreecommitdiff
path: root/firmware/drivers/rtc/rtc_ds1339_ds3231.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/drivers/rtc/rtc_ds1339_ds3231.c')
-rw-r--r--firmware/drivers/rtc/rtc_ds1339_ds3231.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/firmware/drivers/rtc/rtc_ds1339_ds3231.c b/firmware/drivers/rtc/rtc_ds1339_ds3231.c
index 01624e048b..a813e8d999 100644
--- a/firmware/drivers/rtc/rtc_ds1339_ds3231.c
+++ b/firmware/drivers/rtc/rtc_ds1339_ds3231.c
@@ -99,9 +99,7 @@ void rtc_get_alarm(int *h, int *m)
99/* turn alarm on or off by setting the alarm flag enable */ 99/* turn alarm on or off by setting the alarm flag enable */
100/* the alarm is automatically disabled when the RTC gets Vcc power at startup */ 100/* the alarm is automatically disabled when the RTC gets Vcc power at startup */
101/* avoid that an alarm occurs when the device is on because this locks the ON key forever */ 101/* avoid that an alarm occurs when the device is on because this locks the ON key forever */
102/* returns false if alarm was set and alarm flag (output) is off */ 102void rtc_enable_alarm(bool enable)
103/* returns true if alarm flag went on, which would lock the device, so the alarm was disabled again */
104bool rtc_enable_alarm(bool enable)
105{ 103{
106 unsigned char buf[2]; 104 unsigned char buf[2];
107 105
@@ -109,8 +107,6 @@ bool rtc_enable_alarm(bool enable)
109 buf[1] = 0x00; /* reset alarm flags (and OSF for good measure) */ 107 buf[1] = 0x00; /* reset alarm flags (and OSF for good measure) */
110 108
111 sw_i2c_write(RTC_ADDR, 0x0e, buf, 2); 109 sw_i2c_write(RTC_ADDR, 0x0e, buf, 2);
112
113 return false; /* all ok */
114} 110}
115 111
116#endif /* HAVE_RTC_ALARM */ 112#endif /* HAVE_RTC_ALARM */