summaryrefslogtreecommitdiff
path: root/firmware/drivers/rtc/rtc_e8564.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/drivers/rtc/rtc_e8564.c')
-rw-r--r--firmware/drivers/rtc/rtc_e8564.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/firmware/drivers/rtc/rtc_e8564.c b/firmware/drivers/rtc/rtc_e8564.c
index 8b9f6bfa42..54e663424b 100644
--- a/firmware/drivers/rtc/rtc_e8564.c
+++ b/firmware/drivers/rtc/rtc_e8564.c
@@ -154,7 +154,7 @@ void rtc_get_alarm(int *h, int *m)
154 *h = BCD2DEC(buf[0] & 0x3f); 154 *h = BCD2DEC(buf[0] & 0x3f);
155} 155}
156 156
157bool rtc_enable_alarm(bool enable) 157void rtc_enable_alarm(bool enable)
158{ 158{
159 unsigned char tmp=0; 159 unsigned char tmp=0;
160 int rv=0; 160 int rv=0;
@@ -172,13 +172,11 @@ bool rtc_enable_alarm(bool enable)
172 /* disable alarm interrupt */ 172 /* disable alarm interrupt */
173 if(rtc_lock_alarm_clear) 173 if(rtc_lock_alarm_clear)
174 /* lock disabling alarm before it was checked whether or not the unit was started by RTC alarm */ 174 /* lock disabling alarm before it was checked whether or not the unit was started by RTC alarm */
175 return false; 175 return;
176 rv = i2c_readbytes(RTC_ADDR, RTC_CTRL2, 1, &tmp); 176 rv = i2c_readbytes(RTC_ADDR, RTC_CTRL2, 1, &tmp);
177 tmp &= ~(RTC_AIE | RTC_AF); 177 tmp &= ~(RTC_AIE | RTC_AF);
178 pp_i2c_send(RTC_ADDR, RTC_CTRL2, tmp); 178 pp_i2c_send(RTC_ADDR, RTC_CTRL2, tmp);
179 } 179 }
180
181 return false;
182} 180}
183 181
184bool rtc_check_alarm_started(bool release_alarm) 182bool rtc_check_alarm_started(bool release_alarm)