diff options
Diffstat (limited to 'firmware/drivers/rtc/rtc_m41st84w.c')
-rw-r--r-- | firmware/drivers/rtc/rtc_m41st84w.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/firmware/drivers/rtc/rtc_m41st84w.c b/firmware/drivers/rtc/rtc_m41st84w.c index 5374f66f24..4cfa155bfb 100644 --- a/firmware/drivers/rtc/rtc_m41st84w.c +++ b/firmware/drivers/rtc/rtc_m41st84w.c | |||
@@ -137,9 +137,7 @@ void rtc_get_alarm(int *h, int *m) | |||
137 | /* turn alarm on or off by setting the alarm flag enable */ | 137 | /* turn alarm on or off by setting the alarm flag enable */ |
138 | /* the alarm is automatically disabled when the RTC gets Vcc power at startup */ | 138 | /* the alarm is automatically disabled when the RTC gets Vcc power at startup */ |
139 | /* avoid that an alarm occurs when the device is on because this locks the ON key forever */ | 139 | /* avoid that an alarm occurs when the device is on because this locks the ON key forever */ |
140 | /* returns false if alarm was set and alarm flag (output) is off */ | 140 | void rtc_enable_alarm(bool enable) |
141 | /* returns true if alarm flag went on, which would lock the device, so the alarm was disabled again */ | ||
142 | bool rtc_enable_alarm(bool enable) | ||
143 | { | 141 | { |
144 | unsigned char data = rtc_read(0x0a); | 142 | unsigned char data = rtc_read(0x0a); |
145 | if (enable) | 143 | if (enable) |
@@ -164,8 +162,6 @@ bool rtc_enable_alarm(bool enable) | |||
164 | data |= 0xa0; /* turn bit d7=AFE and d5=ABE on */ | 162 | data |= 0xa0; /* turn bit d7=AFE and d5=ABE on */ |
165 | rtc_write(0x0a, data); | 163 | rtc_write(0x0a, data); |
166 | } | 164 | } |
167 | |||
168 | return false; /* all ok */ | ||
169 | } | 165 | } |
170 | 166 | ||
171 | #endif /* HAVE_RTC_ALARM */ | 167 | #endif /* HAVE_RTC_ALARM */ |