summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorDave Chapman <dave@dchapman.com>2005-12-04 15:23:47 +0000
committerDave Chapman <dave@dchapman.com>2005-12-04 15:23:47 +0000
commit8c800cf59af23eaa22b97e89556640f63998b9bd (patch)
tree96115da5d0597b7625c637158364866d365258e1 /apps
parent0ea71be34895a225e137af20faea2adc9f113853 (diff)
downloadrockbox-8c800cf59af23eaa22b97e89556640f63998b9bd.tar.gz
rockbox-8c800cf59af23eaa22b97e89556640f63998b9bd.zip
Replace references to HAVE_RTC with CONFIG_RTC and remove the HAVE_RTC defines from config-*.h
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8147 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/debug_menu.h2
-rw-r--r--apps/gui/statusbar.c14
-rw-r--r--apps/gui/statusbar.h4
-rw-r--r--apps/main.c2
-rw-r--r--apps/main_menu.c2
-rw-r--r--apps/misc.c6
-rw-r--r--apps/misc.h2
-rw-r--r--apps/plugins/SOURCES4
-rw-r--r--apps/plugins/battery_test.c2
-rw-r--r--apps/plugins/bounce.c8
-rw-r--r--apps/plugins/calendar.c6
-rw-r--r--apps/plugins/clock.c2
-rw-r--r--apps/recorder/icons.h2
-rw-r--r--apps/recorder/recording.c2
-rw-r--r--apps/screens.c4
-rw-r--r--apps/screens.h2
-rw-r--r--apps/settings_menu.c6
-rw-r--r--apps/status.c2
18 files changed, 36 insertions, 36 deletions
diff --git a/apps/debug_menu.h b/apps/debug_menu.h
index 4b2c193662..e3f2eb4ebd 100644
--- a/apps/debug_menu.h
+++ b/apps/debug_menu.h
@@ -23,7 +23,7 @@ bool debug_menu(void);
#ifndef SIMULATOR
extern bool dbg_ports(void);
-#ifdef HAVE_RTC
+#ifdef CONFIG_RTC
extern bool dbg_rtc(void);
#endif
#endif
diff --git a/apps/gui/statusbar.c b/apps/gui/statusbar.c
index d336d8ad0e..fda54a610e 100644
--- a/apps/gui/statusbar.c
+++ b/apps/gui/statusbar.c
@@ -112,9 +112,9 @@ void gui_statusbar_init(struct gui_statusbar * bar)
void gui_statusbar_draw(struct gui_statusbar * bar, bool force_redraw)
{
struct screen * display = bar->display;
-#ifdef HAVE_RTC
+#ifdef CONFIG_RTC
struct tm* tm; /* For Time */
-#endif /* HAVE_RTC */
+#endif /* CONFIG_RTC */
#ifdef HAVE_LCD_CHARCELLS
(void)force_redraw; /* players always "redraw" */
@@ -126,11 +126,11 @@ void gui_statusbar_draw(struct gui_statusbar * bar, bool force_redraw)
bar->info.battery_safe = battery_level_safe();
#ifdef HAVE_LCD_BITMAP
-#ifdef HAVE_RTC
+#ifdef CONFIG_RTC
tm = get_time();
bar->info.hour = tm->tm_hour;
bar->info.minute = tm->tm_min;
-#endif /* HAVE_RTC */
+#endif /* CONFIG_RTC */
bar->info.shuffle = global_settings.playlist_shuffle;
#ifdef HAS_BUTTON_HOLD
@@ -257,9 +257,9 @@ void gui_statusbar_draw(struct gui_statusbar * bar, bool force_redraw)
if (bar->info.keylockremote)
gui_statusbar_icon_lock_remote(display);
#endif
-#ifdef HAVE_RTC
+#ifdef CONFIG_RTC
gui_statusbar_time(display, bar->info.hour, bar->info.minute);
-#endif /* HAVE_RTC */
+#endif /* CONFIG_RTC */
#if (CONFIG_LED == LED_VIRTUAL) || defined(HAVE_REMOTE_LCD)
if(!display->has_disk_led && bar->info.led)
gui_statusbar_led(display);
@@ -482,7 +482,7 @@ void gui_statusbar_led(struct screen * display)
}
#endif
-#ifdef HAVE_RTC
+#ifdef CONFIG_RTC
/*
* Print time to status bar
*/
diff --git a/apps/gui/statusbar.h b/apps/gui/statusbar.h
index 62f6b90820..6b8e49a838 100644
--- a/apps/gui/statusbar.h
+++ b/apps/gui/statusbar.h
@@ -32,7 +32,7 @@
struct status_info {
int battlevel;
int volume;
-#ifdef HAVE_RTC
+#ifdef CONFIG_RTC
int hour;
int minute;
#endif
@@ -111,7 +111,7 @@ void gui_statusbar_icon_lock_remote(struct screen * display);
void gui_statusbar_led(struct screen * display);
-#ifdef HAVE_RTC
+#ifdef CONFIG_RTC
void gui_statusbar_time(struct screen * display, int hour, int minute);
#endif
diff --git a/apps/main.c b/apps/main.c
index 94d6f70577..a0cab20dd7 100644
--- a/apps/main.c
+++ b/apps/main.c
@@ -226,7 +226,7 @@ void init(void)
i2c_init();
-#ifdef HAVE_RTC
+#ifdef CONFIG_RTC
rtc_init();
#endif
#ifdef HAVE_RTC_RAM
diff --git a/apps/main_menu.c b/apps/main_menu.c
index 262dd61a20..8bdb6fec2e 100644
--- a/apps/main_menu.c
+++ b/apps/main_menu.c
@@ -125,7 +125,7 @@ bool show_info(void)
output_dyn_value(NULL, 0, free, kbyte_units, true); /* NULL == talk */
#endif
-#ifdef HAVE_RTC
+#ifdef CONFIG_RTC
{
struct tm* tm = get_time();
talk_id(VOICE_CURRENT_TIME, true);
diff --git a/apps/misc.c b/apps/misc.c
index 6f55b6f6b5..c40eac0def 100644
--- a/apps/misc.c
+++ b/apps/misc.c
@@ -154,7 +154,7 @@ char *create_numbered_filename(char *buffer, const char *path,
return buffer;
}
-#ifdef HAVE_RTC
+#ifdef CONFIG_RTC
/* Create a filename with a date+time part.
It is allowed that buffer and path point to the same memory location,
saving a strcpy(). Path must always be given without trailing slash. */
@@ -175,7 +175,7 @@ char *create_datetime_filename(char *buffer, const char *path,
return buffer;
}
-#endif /* HAVE_RTC */
+#endif /* CONFIG_RTC */
/* Read (up to) a line of text from fd into buffer and return number of bytes
* read (which may be larger than the number of bytes stored in buffer). If
@@ -300,7 +300,7 @@ void screen_dump(void)
static unsigned short line_block[BMP_LINESIZE/2];
#endif
-#ifdef HAVE_RTC
+#ifdef CONFIG_RTC
create_datetime_filename(filename, "", "dump ", ".bmp");
#else
create_numbered_filename(filename, "", "dump_", ".bmp", 4);
diff --git a/apps/misc.h b/apps/misc.h
index 5af2568f7b..c5a89901ee 100644
--- a/apps/misc.h
+++ b/apps/misc.h
@@ -30,7 +30,7 @@ void output_dyn_value(char *buf, int buf_size, int value,
char *create_numbered_filename(char *buffer, const char *path,
const char *prefix, const char *suffix,
int numberlen);
-#ifdef HAVE_RTC
+#ifdef CONFIG_RTC
char *create_datetime_filename(char *buffer, const char *path,
const char *prefix, const char *suffix);
#endif
diff --git a/apps/plugins/SOURCES b/apps/plugins/SOURCES
index b335a068f4..c2ddc3d42b 100644
--- a/apps/plugins/SOURCES
+++ b/apps/plugins/SOURCES
@@ -56,10 +56,10 @@ video.c
#endif
vu_meter.c
-#ifdef HAVE_RTC /* Recorder models only */
+#ifdef CONFIG_RTC /* Recorder models only */
calendar.c
clock.c
-#endif /* #ifdef HAVE_RTC */
+#endif /* #ifdef CONFIG_RTC */
#if CONFIG_KEYPAD != ONDIO_PAD
/* gradually bring in the ones not working yet */
diff --git a/apps/plugins/battery_test.c b/apps/plugins/battery_test.c
index adb1a2d86e..31ae801934 100644
--- a/apps/plugins/battery_test.c
+++ b/apps/plugins/battery_test.c
@@ -87,7 +87,7 @@ enum plugin_status loop(void)
rb->splash(HZ, true, "Failed creating /battery.log");
break;
}
-#ifdef HAVE_RTC
+#ifdef CONFIG_RTC
t = rb->get_time();
#else
{
diff --git a/apps/plugins/bounce.c b/apps/plugins/bounce.c
index 3a44a4cc46..487965a4cf 100644
--- a/apps/plugins/bounce.c
+++ b/apps/plugins/bounce.c
@@ -230,7 +230,7 @@ struct counter values[]={
{"ydist", -6},
};
-#ifdef HAVE_RTC
+#ifdef CONFIG_RTC
static unsigned char yminute[]={
53,53,52,52,51,50,49,47,46,44,42,40,38,36,34,32,29,27,25,23,21,19,17,16,14,13,12,11,11,10,10,10,11,11,12,13,14,16,17,19,21,23,25,27,29,31,34,36,38,40,42,44,46,47,49,50,51,52,52,53,
};
@@ -277,7 +277,7 @@ static void addclock(void)
yminute[(i+1)%60]);
}
}
-#endif /* HAVE_RTC */
+#endif /* CONFIG_RTC */
#define DRAW_WIDTH (LCD_WIDTH + LETTER_WIDTH*2)
@@ -330,7 +330,7 @@ static int scrollit(void)
yy += YADD;
xx+= DRAW_WIDTH/LETTERS_ON_SCREEN;
}
-#ifdef HAVE_RTC
+#ifdef CONFIG_RTC
addclock();
#endif
rb->lcd_update();
@@ -385,7 +385,7 @@ static int loopit(void)
x+= speed[xsanke&15] + values[NUM_XADD].num;
rb->lcd_clear_display();
-#ifdef HAVE_RTC
+#ifdef CONFIG_RTC
addclock();
#endif
if(timeout) {
diff --git a/apps/plugins/calendar.c b/apps/plugins/calendar.c
index df23afd721..5cb04b565c 100644
--- a/apps/plugins/calendar.c
+++ b/apps/plugins/calendar.c
@@ -19,7 +19,7 @@
****************************************************************************/
#include "plugin.h"
-#if defined(HAVE_LCD_BITMAP) && defined(HAVE_RTC)
+#if defined(HAVE_LCD_BITMAP) && defined(CONFIG_RTC)
#include <timefuncs.h>
@@ -69,7 +69,7 @@ static int calc_weekday( struct shown *shown )
static void calendar_init(struct today *today, struct shown *shown)
{
int w,h;
-#ifdef HAVE_RTC
+#ifdef CONFIG_RTC
struct tm *tm;
#else
(void)today;
@@ -81,7 +81,7 @@ static void calendar_init(struct today *today, struct shown *shown)
use_system_font = true;
}
rb->lcd_clear_display();
-#ifdef HAVE_RTC
+#ifdef CONFIG_RTC
tm = rb->get_time();
today->mon = tm->tm_mon +1;
today->year = 2000+tm->tm_year%100;
diff --git a/apps/plugins/clock.c b/apps/plugins/clock.c
index 6b06b1a74e..9c940dc7c3 100644
--- a/apps/plugins/clock.c
+++ b/apps/plugins/clock.c
@@ -78,7 +78,7 @@ Original release, featuring analog / digital modes and a few options.
#include "plugin.h"
#include "time.h"
-#if defined(HAVE_LCD_BITMAP) && defined(HAVE_RTC)
+#if defined(HAVE_LCD_BITMAP) && defined(CONFIG_RTC)
#define CLOCK_VERSION "2.60"
diff --git a/apps/recorder/icons.h b/apps/recorder/icons.h
index a21b801cb9..72dc70a95c 100644
--- a/apps/recorder/icons.h
+++ b/apps/recorder/icons.h
@@ -122,7 +122,7 @@ extern void statusbar_icon_play_state(int state);
extern void statusbar_icon_play_mode(int mode);
extern void statusbar_icon_shuffle(void);
extern void statusbar_icon_lock(void);
-#ifdef HAVE_RTC
+#ifdef CONFIG_RTC
extern void statusbar_time(int hour, int minute);
#endif
#if CONFIG_LED == LED_VIRTUAL
diff --git a/apps/recorder/recording.c b/apps/recorder/recording.c
index c7da2bbb9f..4ca4bcb925 100644
--- a/apps/recorder/recording.c
+++ b/apps/recorder/recording.c
@@ -210,7 +210,7 @@ char *rec_create_filename(char *buffer)
else
strncpy(buffer, rec_base_directory, MAX_PATH);
-#ifdef HAVE_RTC
+#ifdef CONFIG_RTC
create_datetime_filename(buffer, buffer, "R", REC_FILE_ENDING);
#else
create_numbered_filename(buffer, buffer, "rec_", REC_FILE_ENDING, 4);
diff --git a/apps/screens.c b/apps/screens.c
index 8bf18dc6c6..d8bfb56500 100644
--- a/apps/screens.c
+++ b/apps/screens.c
@@ -624,7 +624,7 @@ void charging_splash(void)
#endif
-#if defined(HAVE_LCD_BITMAP) && defined (HAVE_RTC)
+#if defined(HAVE_LCD_BITMAP) && defined (CONFIG_RTC)
/* little helper function for voice output */
static void say_time(int cursorpos, const struct tm *tm)
@@ -923,7 +923,7 @@ bool set_time_screen(const char* string, struct tm *tm)
lcd_set_drawmode(lastmode);
return false;
}
-#endif /* defined(HAVE_LCD_BITMAP) && defined (HAVE_RTC) */
+#endif /* defined(HAVE_LCD_BITMAP) && defined (CONFIG_RTC) */
#if (CONFIG_KEYPAD == RECORDER_PAD) && !defined(HAVE_SW_POWEROFF)
bool shutdown_screen(void)
diff --git a/apps/screens.h b/apps/screens.h
index ea5e9440c8..c8e5c320f5 100644
--- a/apps/screens.h
+++ b/apps/screens.h
@@ -41,7 +41,7 @@ extern bool quick_screen_f3(int button_enter);
#endif
extern bool quick_screen_quick(int button_enter);
-#ifdef HAVE_RTC
+#ifdef CONFIG_RTC
bool set_time_screen(const char* string, struct tm *tm);
#endif
diff --git a/apps/settings_menu.c b/apps/settings_menu.c
index 3553c01f09..88b246fec4 100644
--- a/apps/settings_menu.c
+++ b/apps/settings_menu.c
@@ -829,7 +829,7 @@ static bool battery_type(void)
#endif
#endif
-#ifdef HAVE_RTC
+#ifdef CONFIG_RTC
static bool timedate_set(void)
{
struct tm tm;
@@ -1682,7 +1682,7 @@ static bool disk_settings_menu(void)
}
#endif /* !HAVE_MMC */
-#ifdef HAVE_RTC
+#ifdef CONFIG_RTC
static bool time_settings_menu(void)
{
int m;
@@ -1748,7 +1748,7 @@ static bool system_settings_menu(void)
#ifndef HAVE_MMC
{ ID2P(LANG_DISK_MENU), disk_settings_menu },
#endif
-#ifdef HAVE_RTC
+#ifdef CONFIG_RTC
{ ID2P(LANG_TIME_MENU), time_settings_menu },
#endif
{ ID2P(LANG_POWEROFF_IDLE), poweroff_idle_timer },
diff --git a/apps/status.c b/apps/status.c
index 296b7aaf0e..5c5fb3eaa6 100644
--- a/apps/status.c
+++ b/apps/status.c
@@ -29,7 +29,7 @@
#include "gwps.h"
#include "abrepeat.h"
#include "statusbar.h"
-#ifdef HAVE_RTC
+#ifdef CONFIG_RTC
#include "timefuncs.h"
#endif
#ifdef HAVE_LCD_BITMAP