diff options
| author | Robert Kukla <roolku@rockbox.org> | 2007-02-28 13:20:36 +0000 |
|---|---|---|
| committer | Robert Kukla <roolku@rockbox.org> | 2007-02-28 13:20:36 +0000 |
| commit | 50b5ee4781a44234b4ea5dccf3be6ae5ec9fd324 (patch) | |
| tree | d5197ea90c5dcfa574b84743ecbbd7fa2a754e55 /apps/gui | |
| parent | 343c428f2cf97c82540aecf07d154e43ff40e79a (diff) | |
| download | rockbox-50b5ee4781a44234b4ea5dccf3be6ae5ec9fd324.zip rockbox-50b5ee4781a44234b4ea5dccf3be6ae5ec9fd324.tar.gz rockbox-50b5ee4781a44234b4ea5dccf3be6ae5ec9fd324.tar.bz2 rockbox-50b5ee4781a44234b4ea5dccf3be6ae5ec9fd324.tar.xz | |
FS#6419 - driver for H1x0 series RTC Mod with runtime detection
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12520 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui')
| -rw-r--r-- | apps/gui/gwps-common.c | 7 | ||||
| -rw-r--r-- | apps/gui/statusbar.c | 9 |
2 files changed, 16 insertions, 0 deletions
diff --git a/apps/gui/gwps-common.c b/apps/gui/gwps-common.c index 70f5565..8fa80c7 100644 --- a/apps/gui/gwps-common.c +++ b/apps/gui/gwps-common.c @@ -23,7 +23,9 @@ #include <stdlib.h> #include "system.h" #include "settings.h" +#ifdef CONFIG_RTC #include "rtc.h" +#endif #include "audio.h" #include "status.h" #include "power.h" @@ -972,6 +974,11 @@ static char* get_tag(struct wps_data* wps_data, #ifdef CONFIG_RTC case 'c': /* Real Time Clock display */ *flags |= WPS_REFRESH_DYNAMIC; +#if CONFIG_RTC == RTC_DS1339_DS3231 + if(!rtc_detected) + return NULL; + else +#endif { int value; char *format = 0; diff --git a/apps/gui/statusbar.c b/apps/gui/statusbar.c index fbd8943..a36ae15 100644 --- a/apps/gui/statusbar.c +++ b/apps/gui/statusbar.c @@ -28,6 +28,9 @@ #include "powermgmt.h" #include "usb.h" #include "led.h" +#ifdef CONFIG_RTC +#include "rtc.h" +#endif #include "status.h" /* needed for battery_state global var */ #include "action.h" /* for keys_locked */ @@ -239,6 +242,9 @@ void gui_statusbar_draw(struct gui_statusbar * bar, bool force_redraw) bar->info.led = led_read(HZ/2); /* delay should match polling interval */ #endif #ifdef CONFIG_RTC +#if CONFIG_RTC == RTC_DS1339_DS3231 + if(rtc_detected) +#endif { struct tm* tm = get_time(); bar->info.hour = tm->tm_hour; @@ -324,6 +330,9 @@ void gui_statusbar_draw(struct gui_statusbar * bar, bool force_redraw) gui_statusbar_icon_lock_remote(display); #endif #ifdef CONFIG_RTC +#if CONFIG_RTC == RTC_DS1339_DS3231 + if(rtc_detected) +#endif gui_statusbar_time(display, bar->info.hour, bar->info.minute); #endif /* CONFIG_RTC */ #if (CONFIG_LED == LED_VIRTUAL) || defined(HAVE_REMOTE_LCD) |