diff options
author | Rafaël Carré <rafael.carre@gmail.com> | 2010-05-22 00:28:26 +0000 |
---|---|---|
committer | Rafaël Carré <rafael.carre@gmail.com> | 2010-05-22 00:28:26 +0000 |
commit | ba46c88c6f077f7e6e1c266e9742870802037b68 (patch) | |
tree | 8a663c4f83c4f11d19360c044a351e8bd7ced252 /firmware/drivers/rtc/rtc_m41st84w.c | |
parent | 8302c5fe17b0c9e74f1c1d9941c852153516387d (diff) | |
download | rockbox-ba46c88c6f077f7e6e1c266e9742870802037b68.tar.gz rockbox-ba46c88c6f077f7e6e1c266e9742870802037b68.zip |
rtc_enable_alarm() needs no return value
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26245 a1c6a512-1295-4272-9138-f99709370657
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 */ |