diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/gui/gwps-common.c | 7 | ||||
-rw-r--r-- | apps/gui/statusbar.c | 9 | ||||
-rw-r--r-- | apps/menus/settings_menu.c | 30 | ||||
-rw-r--r-- | apps/misc.c | 7 | ||||
-rw-r--r-- | apps/recorder/recording.c | 9 | ||||
-rw-r--r-- | apps/scrobbler.c | 6 |
6 files changed, 2 insertions, 66 deletions
diff --git a/apps/gui/gwps-common.c b/apps/gui/gwps-common.c index d59ac130fc..b321d3b133 100644 --- a/apps/gui/gwps-common.c +++ b/apps/gui/gwps-common.c @@ -23,9 +23,7 @@ #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" @@ -974,11 +972,6 @@ 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 a36ae15974..fbd8943315 100644 --- a/apps/gui/statusbar.c +++ b/apps/gui/statusbar.c @@ -28,9 +28,6 @@ #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 */ @@ -242,9 +239,6 @@ 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; @@ -330,9 +324,6 @@ 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) diff --git a/apps/menus/settings_menu.c b/apps/menus/settings_menu.c index 050bf88d82..8caa5fd8b0 100644 --- a/apps/menus/settings_menu.c +++ b/apps/menus/settings_menu.c @@ -38,12 +38,6 @@ #ifdef HAVE_RTC_ALARM #include "alarm_menu.h" #endif -#ifdef CONFIG_RTC -#include "rtc.h" -#endif - -/* callback to display rtc menus dynamically */ -int rtc_detect_callback(int action,const struct menu_item_ex *this_item); /***********************************/ /* TAGCACHE MENU */ @@ -208,7 +202,7 @@ static int timedate_set(void) MENUITEM_FUNCTION(time_set, ID2P(LANG_TIME), timedate_set, NULL, NOICON); MENUITEM_SETTING(timeformat, &global_settings.timeformat, NULL); -MAKE_MENU(time_menu, ID2P(LANG_TIME_MENU), rtc_detect_callback, NOICON, &time_set, &timeformat); +MAKE_MENU(time_menu, ID2P(LANG_TIME_MENU), 0, NOICON, &time_set, &timeformat); #endif /* System menu */ @@ -216,7 +210,7 @@ MENUITEM_SETTING(poweroff, &global_settings.poweroff, NULL); #ifdef HAVE_RTC_ALARM MENUITEM_FUNCTION(alarm_screen_call, ID2P(LANG_ALARM_MOD_ALARM_MENU), - (menu_function)alarm_screen, rtc_detect_callback, NOICON); + (menu_function)alarm_screen, NULL, NOICON); #endif /* Limits menu */ @@ -358,23 +352,3 @@ MAKE_MENU(settings_menu_item, ID2P(LANG_GENERAL_SETTINGS), 0, &bookmark_settings_menu, &browse_langs, &voice_settings_menu ); /* SETTINGS MENU */ /***********************************/ - -/* callback to display rtc menus dynamically */ -int rtc_detect_callback(int action,const struct menu_item_ex *this_item) -{ - if (action != ACTION_REQUEST_MENUITEM) - return action; - -#if defined(CONFIG_RTC) && CONFIG_RTC == RTC_DS1339_DS3231 - if ((this_item == &time_menu) || - (this_item == &alarm_screen_call)) - { - if (!rtc_detected) - return ACTION_EXIT_MENUITEM; - } -#else - (void)this_item; -#endif - - return action; -} diff --git a/apps/misc.c b/apps/misc.c index 339bc1d0b7..22f6fb50a6 100644 --- a/apps/misc.c +++ b/apps/misc.c @@ -60,7 +60,6 @@ #include "gui/gwps-common.h" #include "misc.h" -#include "rtc.h" /* Format a large-range value for output, using the appropriate unit so that * the displayed value is in the range 1 <= display < 1000 (1024 for "binary" @@ -415,12 +414,6 @@ void screen_dump(void) #endif #ifdef CONFIG_RTC -#if CONFIG_RTC == RTC_DS1339_DS3231 - if(!rtc_detected) - create_numbered_filename(filename, "", "dump_", ".bmp", 4 - IF_CNFN_NUM_(, NULL)); - else -#endif create_datetime_filename(filename, "", "dump ", ".bmp", false); #else create_numbered_filename(filename, "", "dump_", ".bmp", 4 diff --git a/apps/recorder/recording.c b/apps/recorder/recording.c index 2c5fc32b28..8eea24d82d 100644 --- a/apps/recorder/recording.c +++ b/apps/recorder/recording.c @@ -68,9 +68,6 @@ #include "screen_access.h" #include "action.h" #include "radio.h" -#ifdef CONFIG_RTC -#include "rtc.h" -#endif #ifdef HAVE_RECORDING static bool in_screen = false; @@ -524,12 +521,6 @@ char *rec_create_filename(char *buffer) #ifdef CONFIG_RTC /* We'll wait at least up to the start of the next second so no duplicate names are created */ -#if CONFIG_RTC == RTC_DS1339_DS3231 - if(!rtc_detected) - return create_numbered_filename(buffer, buffer, "rec_", ext, 4 - IF_CNFN_NUM_(, &file_number)); - else -#endif return create_datetime_filename(buffer, buffer, "R", ext, true); #else return create_numbered_filename(buffer, buffer, "rec_", ext, 4 diff --git a/apps/scrobbler.c b/apps/scrobbler.c index 1c0d98cbc6..a339429cab 100644 --- a/apps/scrobbler.c +++ b/apps/scrobbler.c @@ -35,7 +35,6 @@ http://www.audioscrobbler.net/wiki/Portable_Player_Logging #ifdef CONFIG_RTC #include "time.h" #include "timefuncs.h" -#include "rtc.h" #endif #include "scrobbler.h" @@ -209,11 +208,6 @@ void scrobbler_change_event(struct mp3entry *id) logf("SCROBBLER: add pending"); copy_mp3entry(&scrobbler_entry, id); #ifdef CONFIG_RTC -#if CONFIG_RTC == RTC_DS1339_DS3231 - if(!rtc_detected) - timestamp = 0; - else -#endif timestamp = mktime(get_time()); #else timestamp = 0; |