mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-09 13:12:37 -05:00
remove runtime detection of h1x0 series RTC MOD, but leave driver code
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12554 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
909b9462da
commit
ae08eeb4ff
11 changed files with 11 additions and 120 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue