diff options
Diffstat (limited to 'firmware/drivers')
-rw-r--r-- | firmware/drivers/rtc/rtc_as3514.c | 4 | ||||
-rw-r--r-- | firmware/drivers/rtc/rtc_ds1339_ds3231.c | 6 | ||||
-rw-r--r-- | firmware/drivers/rtc/rtc_e8564.c | 6 | ||||
-rw-r--r-- | firmware/drivers/rtc/rtc_m41st84w.c | 6 | ||||
-rw-r--r-- | firmware/drivers/rtc/rtc_mc13783.c | 4 | ||||
-rw-r--r-- | firmware/drivers/rtc/rtc_pcf50605.c | 4 | ||||
-rw-r--r-- | firmware/drivers/rtc/rtc_s3c2440.c | 5 | ||||
-rw-r--r-- | firmware/drivers/rtc/rtc_tcc77x.c | 2 |
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) | |||
111 | while(1); | 111 | while(1); |
112 | } | 112 | } |
113 | 113 | ||
114 | bool rtc_enable_alarm(bool enable) | 114 | void rtc_enable_alarm(bool enable) |
115 | { | 115 | { |
116 | return alarm_enabled = enable; | 116 | alarm_enabled = enable; |
117 | } | 117 | } |
118 | 118 | ||
119 | bool rtc_check_alarm_started(bool release_alarm) | 119 | 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) | |||
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 */ | 102 | void rtc_enable_alarm(bool enable) |
103 | /* returns true if alarm flag went on, which would lock the device, so the alarm was disabled again */ | ||
104 | bool 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 */ |
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 | ||
157 | bool rtc_enable_alarm(bool enable) | 157 | void 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 | ||
184 | bool rtc_check_alarm_started(bool release_alarm) | 182 | 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) | |||
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 */ |
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) | |||
218 | return false; | 218 | return false; |
219 | } | 219 | } |
220 | 220 | ||
221 | bool rtc_enable_alarm(bool enable) | 221 | void rtc_enable_alarm(bool enable) |
222 | { | 222 | { |
223 | if (enable) | 223 | if (enable) |
224 | mc13783_clear(MC13783_INTERRUPT_MASK1, MC13783_TODAM); | 224 | mc13783_clear(MC13783_INTERRUPT_MASK1, MC13783_TODAM); |
225 | else | 225 | else |
226 | mc13783_set(MC13783_INTERRUPT_MASK1, MC13783_TODAM); | 226 | mc13783_set(MC13783_INTERRUPT_MASK1, MC13783_TODAM); |
227 | |||
228 | return false; | ||
229 | } | 227 | } |
230 | 228 | ||
231 | bool rtc_check_alarm_started(bool release_alarm) | 229 | 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) | |||
92 | * The Ipod bootloader clears all PCF interrupt registers and always enables | 92 | * The Ipod bootloader clears all PCF interrupt registers and always enables |
93 | * the "wake on RTC" bit on OOCC1, so we have to rely on other means to find | 93 | * the "wake on RTC" bit on OOCC1, so we have to rely on other means to find |
94 | * out if we just woke from an alarm. | 94 | * out if we just woke from an alarm. |
95 | * Return value is always false for us. | ||
96 | */ | 95 | */ |
97 | bool rtc_enable_alarm(bool enable) | 96 | void rtc_enable_alarm(bool enable) |
98 | { | 97 | { |
99 | if (enable) { | 98 | if (enable) { |
100 | /* Tell the PCF to ignore everything but second, minute and hour, so | 99 | /* Tell the PCF to ignore everything but second, minute and hour, so |
@@ -114,7 +113,6 @@ bool rtc_enable_alarm(bool enable) | |||
114 | /* Make sure we don't wake on RTC after shutting down */ | 113 | /* Make sure we don't wake on RTC after shutting down */ |
115 | pcf50605_wakeup_flags &= ~0x10; | 114 | pcf50605_wakeup_flags &= ~0x10; |
116 | } | 115 | } |
117 | return false; | ||
118 | } | 116 | } |
119 | 117 | ||
120 | /** | 118 | /** |
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) | |||
100 | } | 100 | } |
101 | 101 | ||
102 | /* turn alarm on or off by setting the alarm flag enable | 102 | /* turn alarm on or off by setting the alarm flag enable |
103 | * returns false if alarm was set and alarm flag (output) is off | ||
104 | */ | 103 | */ |
105 | bool rtc_enable_alarm(bool enable) | 104 | vodi rtc_enable_alarm(bool enable) |
106 | { | 105 | { |
107 | if (enable) | 106 | if (enable) |
108 | { | 107 | { |
@@ -112,7 +111,5 @@ bool rtc_enable_alarm(bool enable) | |||
112 | { | 111 | { |
113 | RTCALM=0x00; | 112 | RTCALM=0x00; |
114 | } | 113 | } |
115 | |||
116 | return false; /* all ok */ | ||
117 | } | 114 | } |
118 | #endif | 115 | #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) | |||
48 | /** | 48 | /** |
49 | * Enables or disables the alarm. | 49 | * Enables or disables the alarm. |
50 | */ | 50 | */ |
51 | bool rtc_enable_alarm(bool enable) | 51 | void rtc_enable_alarm(bool enable) |
52 | { | 52 | { |
53 | } | 53 | } |
54 | 54 | ||