diff options
| author | Karl Kurbjun <kkurbjun@gmail.com> | 2007-05-07 19:34:34 +0000 |
|---|---|---|
| committer | Karl Kurbjun <kkurbjun@gmail.com> | 2007-05-07 19:34:34 +0000 |
| commit | 173b611921db2d353d977dc617a8288345f5e6ed (patch) | |
| tree | 07927feefbc137db4f80f0e35f70da462063e376 /firmware/drivers/rtc | |
| parent | 7cdd0fe6ea8561a94862f0b0dd53fa8b5a7628e9 (diff) | |
| download | rockbox-173b611921db2d353d977dc617a8288345f5e6ed.zip rockbox-173b611921db2d353d977dc617a8288345f5e6ed.tar.gz rockbox-173b611921db2d353d977dc617a8288345f5e6ed.tar.bz2 rockbox-173b611921db2d353d977dc617a8288345f5e6ed.tar.xz | |
Basic gigabeat buttonlight support outside of debug menu FS#7112. Also disables USB PLL and the USB device clock (uneeded to connect to computer) - May offer some power savings. Changed how some pins are initialized.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13346 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/drivers/rtc')
| -rw-r--r-- | firmware/drivers/rtc/rtc_s3c2440.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/firmware/drivers/rtc/rtc_s3c2440.c b/firmware/drivers/rtc/rtc_s3c2440.c index ae422ff..b1bc622 100644 --- a/firmware/drivers/rtc/rtc_s3c2440.c +++ b/firmware/drivers/rtc/rtc_s3c2440.c @@ -21,7 +21,6 @@ #include "rtc.h" #include "kernel.h" #include "system.h" -#include <stdbool.h> void rtc_init(void) { @@ -55,7 +54,7 @@ int rtc_write_datetime(unsigned char* buf) return 1; } -#ifdef HAVE_RTC_ALARM +#ifdef HAVE_RTC_ALARM /* This alarm code works in that it at least triggers INT_RTC. I am guessing * that the OF bootloader for the Gigabeat detects the startup by alarm and shuts down. * This code is available for use once the OF bootloader is no longer required. @@ -110,13 +109,16 @@ void rtc_get_alarm(int *h, int *m) */ bool rtc_enable_alarm(bool enable) { - /* Note: The interupt for the alarm is normally masked. May want to enable ( INTMSK&=~(1<<30); ) - * it here if an alarm handler is desired (while the unit is not in sleep). - */ if (enable) + { RTCALM=0x46; + INTMSK&=~(1<<30); + } else + { RTCALM=0x00; + INTMSK|=(1<<30); + } return false; /* all ok */ } |