From 173b611921db2d353d977dc617a8288345f5e6ed Mon Sep 17 00:00:00 2001 From: Karl Kurbjun Date: Mon, 7 May 2007 19:34:34 +0000 Subject: 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 --- firmware/drivers/rtc/rtc_s3c2440.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'firmware/drivers/rtc') 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 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 */ } -- cgit v1.1