summaryrefslogtreecommitdiff
path: root/firmware/drivers/rtc
diff options
context:
space:
mode:
authorRafaël Carré <rafael.carre@gmail.com>2010-05-22 00:28:26 +0000
committerRafaël Carré <rafael.carre@gmail.com>2010-05-22 00:28:26 +0000
commitba46c88c6f077f7e6e1c266e9742870802037b68 (patch)
tree8a663c4f83c4f11d19360c044a351e8bd7ced252 /firmware/drivers/rtc
parent8302c5fe17b0c9e74f1c1d9941c852153516387d (diff)
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')
-rw-r--r--firmware/drivers/rtc/rtc_as3514.c4
-rw-r--r--firmware/drivers/rtc/rtc_ds1339_ds3231.c6
-rw-r--r--firmware/drivers/rtc/rtc_e8564.c6
-rw-r--r--firmware/drivers/rtc/rtc_m41st84w.c6
-rw-r--r--firmware/drivers/rtc/rtc_mc13783.c4
-rw-r--r--firmware/drivers/rtc/rtc_pcf50605.c4
-rw-r--r--firmware/drivers/rtc/rtc_s3c2440.c5
-rw-r--r--firmware/drivers/rtc/rtc_tcc77x.c2
8 files changed, 10 insertions, 27 deletions
diff --git a/firmware/drivers/rtc/rtc_as3514.c b/firmware/drivers/rtc/rtc_as3514.c
index fe2921b433..e5db839e77 100644
--- a/firmware/drivers/rtc/rtc_as3514.c
+++ b/firmware/drivers/rtc/rtc_as3514.c
@@ -111,9 +111,9 @@ void rtc_alarm_poweroff(void)
while(1);
}
-bool rtc_enable_alarm(bool enable)
+void rtc_enable_alarm(bool enable)
{
- return alarm_enabled = enable;
+ alarm_enabled = enable;
}
bool rtc_check_alarm_started(bool release_alarm)
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)
/* turn alarm on or off by setting the alarm flag enable */
/* the alarm is automatically disabled when the RTC gets Vcc power at startup */
/* avoid that an alarm occurs when the device is on because this locks the ON key forever */
-/* returns false if alarm was set and alarm flag (output) is off */
-/* returns true if alarm flag went on, which would lock the device, so the alarm was disabled again */
-bool rtc_enable_alarm(bool enable)
+void rtc_enable_alarm(bool enable)
{
unsigned char buf[2];
@@ -109,8 +107,6 @@ bool rtc_enable_alarm(bool enable)
buf[1] = 0x00; /* reset alarm flags (and OSF for good measure) */
sw_i2c_write(RTC_ADDR, 0x0e, buf, 2);
-
- return false; /* all ok */
}
#endif /* HAVE_RTC_ALARM */
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)
*h = BCD2DEC(buf[0] & 0x3f);
}
-bool rtc_enable_alarm(bool enable)
+void rtc_enable_alarm(bool enable)
{
unsigned char tmp=0;
int rv=0;
@@ -172,13 +172,11 @@ bool rtc_enable_alarm(bool enable)
/* disable alarm interrupt */
if(rtc_lock_alarm_clear)
/* lock disabling alarm before it was checked whether or not the unit was started by RTC alarm */
- return false;
+ return;
rv = i2c_readbytes(RTC_ADDR, RTC_CTRL2, 1, &tmp);
tmp &= ~(RTC_AIE | RTC_AF);
pp_i2c_send(RTC_ADDR, RTC_CTRL2, tmp);
}
-
- return false;
}
bool rtc_check_alarm_started(bool release_alarm)
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)
/* turn alarm on or off by setting the alarm flag enable */
/* the alarm is automatically disabled when the RTC gets Vcc power at startup */
/* avoid that an alarm occurs when the device is on because this locks the ON key forever */
-/* returns false if alarm was set and alarm flag (output) is off */
-/* returns true if alarm flag went on, which would lock the device, so the alarm was disabled again */
-bool rtc_enable_alarm(bool enable)
+void rtc_enable_alarm(bool enable)
{
unsigned char data = rtc_read(0x0a);
if (enable)
@@ -164,8 +162,6 @@ bool rtc_enable_alarm(bool enable)
data |= 0xa0; /* turn bit d7=AFE and d5=ABE on */
rtc_write(0x0a, data);
}
-
- return false; /* all ok */
}
#endif /* HAVE_RTC_ALARM */
diff --git a/firmware/drivers/rtc/rtc_mc13783.c b/firmware/drivers/rtc/rtc_mc13783.c
index 9cef3e904c..d98ae9ba06 100644
--- a/firmware/drivers/rtc/rtc_mc13783.c
+++ b/firmware/drivers/rtc/rtc_mc13783.c
@@ -218,14 +218,12 @@ bool rtc_check_alarm_flag(void)
return false;
}
-bool rtc_enable_alarm(bool enable)
+void rtc_enable_alarm(bool enable)
{
if (enable)
mc13783_clear(MC13783_INTERRUPT_MASK1, MC13783_TODAM);
else
mc13783_set(MC13783_INTERRUPT_MASK1, MC13783_TODAM);
-
- return false;
}
bool rtc_check_alarm_started(bool release_alarm)
diff --git a/firmware/drivers/rtc/rtc_pcf50605.c b/firmware/drivers/rtc/rtc_pcf50605.c
index b030fba37a..8c54a590c6 100644
--- a/firmware/drivers/rtc/rtc_pcf50605.c
+++ b/firmware/drivers/rtc/rtc_pcf50605.c
@@ -92,9 +92,8 @@ bool rtc_check_alarm_flag(void)
* The Ipod bootloader clears all PCF interrupt registers and always enables
* the "wake on RTC" bit on OOCC1, so we have to rely on other means to find
* out if we just woke from an alarm.
- * Return value is always false for us.
*/
-bool rtc_enable_alarm(bool enable)
+void rtc_enable_alarm(bool enable)
{
if (enable) {
/* Tell the PCF to ignore everything but second, minute and hour, so
@@ -114,7 +113,6 @@ bool rtc_enable_alarm(bool enable)
/* Make sure we don't wake on RTC after shutting down */
pcf50605_wakeup_flags &= ~0x10;
}
- return false;
}
/**
diff --git a/firmware/drivers/rtc/rtc_s3c2440.c b/firmware/drivers/rtc/rtc_s3c2440.c
index 9b449052a9..52ba75345c 100644
--- a/firmware/drivers/rtc/rtc_s3c2440.c
+++ b/firmware/drivers/rtc/rtc_s3c2440.c
@@ -100,9 +100,8 @@ void rtc_get_alarm(int *h, int *m)
}
/* turn alarm on or off by setting the alarm flag enable
- * returns false if alarm was set and alarm flag (output) is off
*/
-bool rtc_enable_alarm(bool enable)
+vodi rtc_enable_alarm(bool enable)
{
if (enable)
{
@@ -112,7 +111,5 @@ bool rtc_enable_alarm(bool enable)
{
RTCALM=0x00;
}
-
- return false; /* all ok */
}
#endif
diff --git a/firmware/drivers/rtc/rtc_tcc77x.c b/firmware/drivers/rtc/rtc_tcc77x.c
index ae1c74f8ae..0ae4059f8a 100644
--- a/firmware/drivers/rtc/rtc_tcc77x.c
+++ b/firmware/drivers/rtc/rtc_tcc77x.c
@@ -48,7 +48,7 @@ bool rtc_check_alarm_flag(void)
/**
* Enables or disables the alarm.
*/
-bool rtc_enable_alarm(bool enable)
+void rtc_enable_alarm(bool enable)
{
}