From a38947114da645af2b5eec83b5216dcf2afc35aa Mon Sep 17 00:00:00 2001 From: Christi Scarborough Date: Wed, 16 Feb 2005 12:18:16 +0000 Subject: Turn off the RTC alarm if it's gone off. Best not to have alarm events unless the user has specifically asked for them. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5973 a1c6a512-1295-4272-9138-f99709370657 --- apps/tree.c | 4 +++- firmware/powermgmt.c | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/apps/tree.c b/apps/tree.c index 4ccd702..f8459ee 100644 --- a/apps/tree.c +++ b/apps/tree.c @@ -436,8 +436,10 @@ static bool ask_resume(bool ask_once) } #ifdef HAVE_ALARM_MOD - if ( rtc_check_alarm_started(true) ) + if ( rtc_check_alarm_started(true) ) { + rtc_enable_alarm(false); return true; + } #endif /* always resume? */ diff --git a/firmware/powermgmt.c b/firmware/powermgmt.c index ede0a50..2a15b9d 100644 --- a/firmware/powermgmt.c +++ b/firmware/powermgmt.c @@ -447,7 +447,9 @@ static void car_adapter_mode_processing(void) static void power_thread_rtc_process(void) { - rtc_check_alarm_flag(); + if (rtc_check_alarm_flag()) { + rtc_enable_alarm(false); + } } #endif -- cgit v1.1