diff options
author | Dave Chapman <dave@dchapman.com> | 2005-12-04 15:23:47 +0000 |
---|---|---|
committer | Dave Chapman <dave@dchapman.com> | 2005-12-04 15:23:47 +0000 |
commit | 8c800cf59af23eaa22b97e89556640f63998b9bd (patch) | |
tree | 96115da5d0597b7625c637158364866d365258e1 | |
parent | 0ea71be34895a225e137af20faea2adc9f113853 (diff) | |
download | rockbox-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
-rw-r--r-- | apps/debug_menu.h | 2 | ||||
-rw-r--r-- | apps/gui/statusbar.c | 14 | ||||
-rw-r--r-- | apps/gui/statusbar.h | 4 | ||||
-rw-r--r-- | apps/main.c | 2 | ||||
-rw-r--r-- | apps/main_menu.c | 2 | ||||
-rw-r--r-- | apps/misc.c | 6 | ||||
-rw-r--r-- | apps/misc.h | 2 | ||||
-rw-r--r-- | apps/plugins/SOURCES | 4 | ||||
-rw-r--r-- | apps/plugins/battery_test.c | 2 | ||||
-rw-r--r-- | apps/plugins/bounce.c | 8 | ||||
-rw-r--r-- | apps/plugins/calendar.c | 6 | ||||
-rw-r--r-- | apps/plugins/clock.c | 2 | ||||
-rw-r--r-- | apps/recorder/icons.h | 2 | ||||
-rw-r--r-- | apps/recorder/recording.c | 2 | ||||
-rw-r--r-- | apps/screens.c | 4 | ||||
-rw-r--r-- | apps/screens.h | 2 | ||||
-rw-r--r-- | apps/settings_menu.c | 6 | ||||
-rw-r--r-- | apps/status.c | 2 | ||||
-rw-r--r-- | firmware/SOURCES | 2 | ||||
-rw-r--r-- | firmware/common/timefuncs.c | 4 | ||||
-rw-r--r-- | firmware/drivers/fat.c | 6 | ||||
-rw-r--r-- | firmware/drivers/rtc.c | 2 | ||||
-rw-r--r-- | firmware/export/config-fmrecorder.h | 5 | ||||
-rw-r--r-- | firmware/export/config-gmini120.h | 5 | ||||
-rw-r--r-- | firmware/export/config-recorder.h | 5 | ||||
-rw-r--r-- | firmware/export/config-recorderv2.h | 5 | ||||
-rw-r--r-- | firmware/export/rtc.h | 4 |
27 files changed, 48 insertions, 62 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); | |||
23 | 23 | ||
24 | #ifndef SIMULATOR | 24 | #ifndef SIMULATOR |
25 | extern bool dbg_ports(void); | 25 | extern bool dbg_ports(void); |
26 | #ifdef HAVE_RTC | 26 | #ifdef CONFIG_RTC |
27 | extern bool dbg_rtc(void); | 27 | extern bool dbg_rtc(void); |
28 | #endif | 28 | #endif |
29 | #endif | 29 | #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) | |||
112 | void gui_statusbar_draw(struct gui_statusbar * bar, bool force_redraw) | 112 | void gui_statusbar_draw(struct gui_statusbar * bar, bool force_redraw) |
113 | { | 113 | { |
114 | struct screen * display = bar->display; | 114 | struct screen * display = bar->display; |
115 | #ifdef HAVE_RTC | 115 | #ifdef CONFIG_RTC |
116 | struct tm* tm; /* For Time */ | 116 | struct tm* tm; /* For Time */ |
117 | #endif /* HAVE_RTC */ | 117 | #endif /* CONFIG_RTC */ |
118 | 118 | ||
119 | #ifdef HAVE_LCD_CHARCELLS | 119 | #ifdef HAVE_LCD_CHARCELLS |
120 | (void)force_redraw; /* players always "redraw" */ | 120 | (void)force_redraw; /* players always "redraw" */ |
@@ -126,11 +126,11 @@ void gui_statusbar_draw(struct gui_statusbar * bar, bool force_redraw) | |||
126 | bar->info.battery_safe = battery_level_safe(); | 126 | bar->info.battery_safe = battery_level_safe(); |
127 | 127 | ||
128 | #ifdef HAVE_LCD_BITMAP | 128 | #ifdef HAVE_LCD_BITMAP |
129 | #ifdef HAVE_RTC | 129 | #ifdef CONFIG_RTC |
130 | tm = get_time(); | 130 | tm = get_time(); |
131 | bar->info.hour = tm->tm_hour; | 131 | bar->info.hour = tm->tm_hour; |
132 | bar->info.minute = tm->tm_min; | 132 | bar->info.minute = tm->tm_min; |
133 | #endif /* HAVE_RTC */ | 133 | #endif /* CONFIG_RTC */ |
134 | 134 | ||
135 | bar->info.shuffle = global_settings.playlist_shuffle; | 135 | bar->info.shuffle = global_settings.playlist_shuffle; |
136 | #ifdef HAS_BUTTON_HOLD | 136 | #ifdef HAS_BUTTON_HOLD |
@@ -257,9 +257,9 @@ void gui_statusbar_draw(struct gui_statusbar * bar, bool force_redraw) | |||
257 | if (bar->info.keylockremote) | 257 | if (bar->info.keylockremote) |
258 | gui_statusbar_icon_lock_remote(display); | 258 | gui_statusbar_icon_lock_remote(display); |
259 | #endif | 259 | #endif |
260 | #ifdef HAVE_RTC | 260 | #ifdef CONFIG_RTC |
261 | gui_statusbar_time(display, bar->info.hour, bar->info.minute); | 261 | gui_statusbar_time(display, bar->info.hour, bar->info.minute); |
262 | #endif /* HAVE_RTC */ | 262 | #endif /* CONFIG_RTC */ |
263 | #if (CONFIG_LED == LED_VIRTUAL) || defined(HAVE_REMOTE_LCD) | 263 | #if (CONFIG_LED == LED_VIRTUAL) || defined(HAVE_REMOTE_LCD) |
264 | if(!display->has_disk_led && bar->info.led) | 264 | if(!display->has_disk_led && bar->info.led) |
265 | gui_statusbar_led(display); | 265 | gui_statusbar_led(display); |
@@ -482,7 +482,7 @@ void gui_statusbar_led(struct screen * display) | |||
482 | } | 482 | } |
483 | #endif | 483 | #endif |
484 | 484 | ||
485 | #ifdef HAVE_RTC | 485 | #ifdef CONFIG_RTC |
486 | /* | 486 | /* |
487 | * Print time to status bar | 487 | * Print time to status bar |
488 | */ | 488 | */ |
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 @@ | |||
32 | struct status_info { | 32 | struct status_info { |
33 | int battlevel; | 33 | int battlevel; |
34 | int volume; | 34 | int volume; |
35 | #ifdef HAVE_RTC | 35 | #ifdef CONFIG_RTC |
36 | int hour; | 36 | int hour; |
37 | int minute; | 37 | int minute; |
38 | #endif | 38 | #endif |
@@ -111,7 +111,7 @@ void gui_statusbar_icon_lock_remote(struct screen * display); | |||
111 | void gui_statusbar_led(struct screen * display); | 111 | void gui_statusbar_led(struct screen * display); |
112 | 112 | ||
113 | 113 | ||
114 | #ifdef HAVE_RTC | 114 | #ifdef CONFIG_RTC |
115 | void gui_statusbar_time(struct screen * display, int hour, int minute); | 115 | void gui_statusbar_time(struct screen * display, int hour, int minute); |
116 | #endif | 116 | #endif |
117 | 117 | ||
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) | |||
226 | 226 | ||
227 | i2c_init(); | 227 | i2c_init(); |
228 | 228 | ||
229 | #ifdef HAVE_RTC | 229 | #ifdef CONFIG_RTC |
230 | rtc_init(); | 230 | rtc_init(); |
231 | #endif | 231 | #endif |
232 | #ifdef HAVE_RTC_RAM | 232 | #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) | |||
125 | output_dyn_value(NULL, 0, free, kbyte_units, true); /* NULL == talk */ | 125 | output_dyn_value(NULL, 0, free, kbyte_units, true); /* NULL == talk */ |
126 | #endif | 126 | #endif |
127 | 127 | ||
128 | #ifdef HAVE_RTC | 128 | #ifdef CONFIG_RTC |
129 | { | 129 | { |
130 | struct tm* tm = get_time(); | 130 | struct tm* tm = get_time(); |
131 | talk_id(VOICE_CURRENT_TIME, true); | 131 | 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, | |||
154 | return buffer; | 154 | return buffer; |
155 | } | 155 | } |
156 | 156 | ||
157 | #ifdef HAVE_RTC | 157 | #ifdef CONFIG_RTC |
158 | /* Create a filename with a date+time part. | 158 | /* Create a filename with a date+time part. |
159 | It is allowed that buffer and path point to the same memory location, | 159 | It is allowed that buffer and path point to the same memory location, |
160 | saving a strcpy(). Path must always be given without trailing slash. */ | 160 | saving a strcpy(). Path must always be given without trailing slash. */ |
@@ -175,7 +175,7 @@ char *create_datetime_filename(char *buffer, const char *path, | |||
175 | 175 | ||
176 | return buffer; | 176 | return buffer; |
177 | } | 177 | } |
178 | #endif /* HAVE_RTC */ | 178 | #endif /* CONFIG_RTC */ |
179 | 179 | ||
180 | /* Read (up to) a line of text from fd into buffer and return number of bytes | 180 | /* Read (up to) a line of text from fd into buffer and return number of bytes |
181 | * read (which may be larger than the number of bytes stored in buffer). If | 181 | * read (which may be larger than the number of bytes stored in buffer). If |
@@ -300,7 +300,7 @@ void screen_dump(void) | |||
300 | static unsigned short line_block[BMP_LINESIZE/2]; | 300 | static unsigned short line_block[BMP_LINESIZE/2]; |
301 | #endif | 301 | #endif |
302 | 302 | ||
303 | #ifdef HAVE_RTC | 303 | #ifdef CONFIG_RTC |
304 | create_datetime_filename(filename, "", "dump ", ".bmp"); | 304 | create_datetime_filename(filename, "", "dump ", ".bmp"); |
305 | #else | 305 | #else |
306 | create_numbered_filename(filename, "", "dump_", ".bmp", 4); | 306 | 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, | |||
30 | char *create_numbered_filename(char *buffer, const char *path, | 30 | char *create_numbered_filename(char *buffer, const char *path, |
31 | const char *prefix, const char *suffix, | 31 | const char *prefix, const char *suffix, |
32 | int numberlen); | 32 | int numberlen); |
33 | #ifdef HAVE_RTC | 33 | #ifdef CONFIG_RTC |
34 | char *create_datetime_filename(char *buffer, const char *path, | 34 | char *create_datetime_filename(char *buffer, const char *path, |
35 | const char *prefix, const char *suffix); | 35 | const char *prefix, const char *suffix); |
36 | #endif | 36 | #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 | |||
56 | #endif | 56 | #endif |
57 | vu_meter.c | 57 | vu_meter.c |
58 | 58 | ||
59 | #ifdef HAVE_RTC /* Recorder models only */ | 59 | #ifdef CONFIG_RTC /* Recorder models only */ |
60 | calendar.c | 60 | calendar.c |
61 | clock.c | 61 | clock.c |
62 | #endif /* #ifdef HAVE_RTC */ | 62 | #endif /* #ifdef CONFIG_RTC */ |
63 | 63 | ||
64 | #if CONFIG_KEYPAD != ONDIO_PAD | 64 | #if CONFIG_KEYPAD != ONDIO_PAD |
65 | /* gradually bring in the ones not working yet */ | 65 | /* 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) | |||
87 | rb->splash(HZ, true, "Failed creating /battery.log"); | 87 | rb->splash(HZ, true, "Failed creating /battery.log"); |
88 | break; | 88 | break; |
89 | } | 89 | } |
90 | #ifdef HAVE_RTC | 90 | #ifdef CONFIG_RTC |
91 | t = rb->get_time(); | 91 | t = rb->get_time(); |
92 | #else | 92 | #else |
93 | { | 93 | { |
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[]={ | |||
230 | {"ydist", -6}, | 230 | {"ydist", -6}, |
231 | }; | 231 | }; |
232 | 232 | ||
233 | #ifdef HAVE_RTC | 233 | #ifdef CONFIG_RTC |
234 | static unsigned char yminute[]={ | 234 | static unsigned char yminute[]={ |
235 | 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, | 235 | 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, |
236 | }; | 236 | }; |
@@ -277,7 +277,7 @@ static void addclock(void) | |||
277 | yminute[(i+1)%60]); | 277 | yminute[(i+1)%60]); |
278 | } | 278 | } |
279 | } | 279 | } |
280 | #endif /* HAVE_RTC */ | 280 | #endif /* CONFIG_RTC */ |
281 | 281 | ||
282 | #define DRAW_WIDTH (LCD_WIDTH + LETTER_WIDTH*2) | 282 | #define DRAW_WIDTH (LCD_WIDTH + LETTER_WIDTH*2) |
283 | 283 | ||
@@ -330,7 +330,7 @@ static int scrollit(void) | |||
330 | yy += YADD; | 330 | yy += YADD; |
331 | xx+= DRAW_WIDTH/LETTERS_ON_SCREEN; | 331 | xx+= DRAW_WIDTH/LETTERS_ON_SCREEN; |
332 | } | 332 | } |
333 | #ifdef HAVE_RTC | 333 | #ifdef CONFIG_RTC |
334 | addclock(); | 334 | addclock(); |
335 | #endif | 335 | #endif |
336 | rb->lcd_update(); | 336 | rb->lcd_update(); |
@@ -385,7 +385,7 @@ static int loopit(void) | |||
385 | x+= speed[xsanke&15] + values[NUM_XADD].num; | 385 | x+= speed[xsanke&15] + values[NUM_XADD].num; |
386 | 386 | ||
387 | rb->lcd_clear_display(); | 387 | rb->lcd_clear_display(); |
388 | #ifdef HAVE_RTC | 388 | #ifdef CONFIG_RTC |
389 | addclock(); | 389 | addclock(); |
390 | #endif | 390 | #endif |
391 | if(timeout) { | 391 | 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 @@ | |||
19 | ****************************************************************************/ | 19 | ****************************************************************************/ |
20 | #include "plugin.h" | 20 | #include "plugin.h" |
21 | 21 | ||
22 | #if defined(HAVE_LCD_BITMAP) && defined(HAVE_RTC) | 22 | #if defined(HAVE_LCD_BITMAP) && defined(CONFIG_RTC) |
23 | 23 | ||
24 | #include <timefuncs.h> | 24 | #include <timefuncs.h> |
25 | 25 | ||
@@ -69,7 +69,7 @@ static int calc_weekday( struct shown *shown ) | |||
69 | static void calendar_init(struct today *today, struct shown *shown) | 69 | static void calendar_init(struct today *today, struct shown *shown) |
70 | { | 70 | { |
71 | int w,h; | 71 | int w,h; |
72 | #ifdef HAVE_RTC | 72 | #ifdef CONFIG_RTC |
73 | struct tm *tm; | 73 | struct tm *tm; |
74 | #else | 74 | #else |
75 | (void)today; | 75 | (void)today; |
@@ -81,7 +81,7 @@ static void calendar_init(struct today *today, struct shown *shown) | |||
81 | use_system_font = true; | 81 | use_system_font = true; |
82 | } | 82 | } |
83 | rb->lcd_clear_display(); | 83 | rb->lcd_clear_display(); |
84 | #ifdef HAVE_RTC | 84 | #ifdef CONFIG_RTC |
85 | tm = rb->get_time(); | 85 | tm = rb->get_time(); |
86 | today->mon = tm->tm_mon +1; | 86 | today->mon = tm->tm_mon +1; |
87 | today->year = 2000+tm->tm_year%100; | 87 | 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. | |||
78 | #include "plugin.h" | 78 | #include "plugin.h" |
79 | #include "time.h" | 79 | #include "time.h" |
80 | 80 | ||
81 | #if defined(HAVE_LCD_BITMAP) && defined(HAVE_RTC) | 81 | #if defined(HAVE_LCD_BITMAP) && defined(CONFIG_RTC) |
82 | 82 | ||
83 | #define CLOCK_VERSION "2.60" | 83 | #define CLOCK_VERSION "2.60" |
84 | 84 | ||
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); | |||
122 | extern void statusbar_icon_play_mode(int mode); | 122 | extern void statusbar_icon_play_mode(int mode); |
123 | extern void statusbar_icon_shuffle(void); | 123 | extern void statusbar_icon_shuffle(void); |
124 | extern void statusbar_icon_lock(void); | 124 | extern void statusbar_icon_lock(void); |
125 | #ifdef HAVE_RTC | 125 | #ifdef CONFIG_RTC |
126 | extern void statusbar_time(int hour, int minute); | 126 | extern void statusbar_time(int hour, int minute); |
127 | #endif | 127 | #endif |
128 | #if CONFIG_LED == LED_VIRTUAL | 128 | #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) | |||
210 | else | 210 | else |
211 | strncpy(buffer, rec_base_directory, MAX_PATH); | 211 | strncpy(buffer, rec_base_directory, MAX_PATH); |
212 | 212 | ||
213 | #ifdef HAVE_RTC | 213 | #ifdef CONFIG_RTC |
214 | create_datetime_filename(buffer, buffer, "R", REC_FILE_ENDING); | 214 | create_datetime_filename(buffer, buffer, "R", REC_FILE_ENDING); |
215 | #else | 215 | #else |
216 | create_numbered_filename(buffer, buffer, "rec_", REC_FILE_ENDING, 4); | 216 | 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) | |||
624 | #endif | 624 | #endif |
625 | 625 | ||
626 | 626 | ||
627 | #if defined(HAVE_LCD_BITMAP) && defined (HAVE_RTC) | 627 | #if defined(HAVE_LCD_BITMAP) && defined (CONFIG_RTC) |
628 | 628 | ||
629 | /* little helper function for voice output */ | 629 | /* little helper function for voice output */ |
630 | static void say_time(int cursorpos, const struct tm *tm) | 630 | static void say_time(int cursorpos, const struct tm *tm) |
@@ -923,7 +923,7 @@ bool set_time_screen(const char* string, struct tm *tm) | |||
923 | lcd_set_drawmode(lastmode); | 923 | lcd_set_drawmode(lastmode); |
924 | return false; | 924 | return false; |
925 | } | 925 | } |
926 | #endif /* defined(HAVE_LCD_BITMAP) && defined (HAVE_RTC) */ | 926 | #endif /* defined(HAVE_LCD_BITMAP) && defined (CONFIG_RTC) */ |
927 | 927 | ||
928 | #if (CONFIG_KEYPAD == RECORDER_PAD) && !defined(HAVE_SW_POWEROFF) | 928 | #if (CONFIG_KEYPAD == RECORDER_PAD) && !defined(HAVE_SW_POWEROFF) |
929 | bool shutdown_screen(void) | 929 | 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); | |||
41 | #endif | 41 | #endif |
42 | extern bool quick_screen_quick(int button_enter); | 42 | extern bool quick_screen_quick(int button_enter); |
43 | 43 | ||
44 | #ifdef HAVE_RTC | 44 | #ifdef CONFIG_RTC |
45 | bool set_time_screen(const char* string, struct tm *tm); | 45 | bool set_time_screen(const char* string, struct tm *tm); |
46 | #endif | 46 | #endif |
47 | 47 | ||
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) | |||
829 | #endif | 829 | #endif |
830 | #endif | 830 | #endif |
831 | 831 | ||
832 | #ifdef HAVE_RTC | 832 | #ifdef CONFIG_RTC |
833 | static bool timedate_set(void) | 833 | static bool timedate_set(void) |
834 | { | 834 | { |
835 | struct tm tm; | 835 | struct tm tm; |
@@ -1682,7 +1682,7 @@ static bool disk_settings_menu(void) | |||
1682 | } | 1682 | } |
1683 | #endif /* !HAVE_MMC */ | 1683 | #endif /* !HAVE_MMC */ |
1684 | 1684 | ||
1685 | #ifdef HAVE_RTC | 1685 | #ifdef CONFIG_RTC |
1686 | static bool time_settings_menu(void) | 1686 | static bool time_settings_menu(void) |
1687 | { | 1687 | { |
1688 | int m; | 1688 | int m; |
@@ -1748,7 +1748,7 @@ static bool system_settings_menu(void) | |||
1748 | #ifndef HAVE_MMC | 1748 | #ifndef HAVE_MMC |
1749 | { ID2P(LANG_DISK_MENU), disk_settings_menu }, | 1749 | { ID2P(LANG_DISK_MENU), disk_settings_menu }, |
1750 | #endif | 1750 | #endif |
1751 | #ifdef HAVE_RTC | 1751 | #ifdef CONFIG_RTC |
1752 | { ID2P(LANG_TIME_MENU), time_settings_menu }, | 1752 | { ID2P(LANG_TIME_MENU), time_settings_menu }, |
1753 | #endif | 1753 | #endif |
1754 | { ID2P(LANG_POWEROFF_IDLE), poweroff_idle_timer }, | 1754 | { 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 @@ | |||
29 | #include "gwps.h" | 29 | #include "gwps.h" |
30 | #include "abrepeat.h" | 30 | #include "abrepeat.h" |
31 | #include "statusbar.h" | 31 | #include "statusbar.h" |
32 | #ifdef HAVE_RTC | 32 | #ifdef CONFIG_RTC |
33 | #include "timefuncs.h" | 33 | #include "timefuncs.h" |
34 | #endif | 34 | #endif |
35 | #ifdef HAVE_LCD_BITMAP | 35 | #ifdef HAVE_LCD_BITMAP |
diff --git a/firmware/SOURCES b/firmware/SOURCES index 086501cc30..e2e0e44e5d 100644 --- a/firmware/SOURCES +++ b/firmware/SOURCES | |||
@@ -97,11 +97,9 @@ drivers/mas.c | |||
97 | #ifdef IRIVER_H300_SERIES | 97 | #ifdef IRIVER_H300_SERIES |
98 | drivers/pcf50606.c | 98 | drivers/pcf50606.c |
99 | #endif | 99 | #endif |
100 | #ifdef HAVE_RTC | ||
101 | #if CONFIG_RTC == RTC_M41ST84W | 100 | #if CONFIG_RTC == RTC_M41ST84W |
102 | drivers/rtc.c | 101 | drivers/rtc.c |
103 | #endif | 102 | #endif |
104 | #endif | ||
105 | drivers/serial.c | 103 | drivers/serial.c |
106 | #endif /* !SIMULATOR */ | 104 | #endif /* !SIMULATOR */ |
107 | #ifdef HAVE_LCD_BITMAP | 105 | #ifdef HAVE_LCD_BITMAP |
diff --git a/firmware/common/timefuncs.c b/firmware/common/timefuncs.c index 1a256cc05e..c40ff2880c 100644 --- a/firmware/common/timefuncs.c +++ b/firmware/common/timefuncs.c | |||
@@ -46,7 +46,7 @@ bool valid_time(const struct tm *tm) | |||
46 | struct tm *get_time(void) | 46 | struct tm *get_time(void) |
47 | { | 47 | { |
48 | #ifndef SIMULATOR | 48 | #ifndef SIMULATOR |
49 | #ifdef HAVE_RTC | 49 | #ifdef CONFIG_RTC |
50 | char rtcbuf[8]; | 50 | char rtcbuf[8]; |
51 | 51 | ||
52 | /* We don't need the first byte, but we want the indexes in the | 52 | /* We don't need the first byte, but we want the indexes in the |
@@ -84,7 +84,7 @@ struct tm *get_time(void) | |||
84 | 84 | ||
85 | int set_time(const struct tm *tm) | 85 | int set_time(const struct tm *tm) |
86 | { | 86 | { |
87 | #ifdef HAVE_RTC | 87 | #ifdef CONFIG_RTC |
88 | int rc; | 88 | int rc; |
89 | int tmp; | 89 | int tmp; |
90 | 90 | ||
diff --git a/firmware/drivers/fat.c b/firmware/drivers/fat.c index 758e48cdbd..fd09bff0da 100644 --- a/firmware/drivers/fat.c +++ b/firmware/drivers/fat.c | |||
@@ -1010,7 +1010,7 @@ static void fat_time(unsigned short* date, | |||
1010 | unsigned short* time, | 1010 | unsigned short* time, |
1011 | unsigned short* tenth ) | 1011 | unsigned short* tenth ) |
1012 | { | 1012 | { |
1013 | #ifdef HAVE_RTC | 1013 | #ifdef CONFIG_RTC |
1014 | struct tm* tm = get_time(); | 1014 | struct tm* tm = get_time(); |
1015 | 1015 | ||
1016 | if (date) | 1016 | if (date) |
@@ -1092,7 +1092,7 @@ static void fat_time(unsigned short* date, | |||
1092 | } | 1092 | } |
1093 | if (tenth) | 1093 | if (tenth) |
1094 | *tenth = 0; | 1094 | *tenth = 0; |
1095 | #endif /* HAVE_RTC */ | 1095 | #endif /* CONFIG_RTC */ |
1096 | } | 1096 | } |
1097 | 1097 | ||
1098 | static int write_long_name(struct fat_file* file, | 1098 | static int write_long_name(struct fat_file* file, |
@@ -1529,7 +1529,7 @@ static int update_short_entry( struct fat_file* file, long size, int attr ) | |||
1529 | *sizeptr = htole32(size); | 1529 | *sizeptr = htole32(size); |
1530 | 1530 | ||
1531 | { | 1531 | { |
1532 | #ifdef HAVE_RTC | 1532 | #ifdef CONFIG_RTC |
1533 | unsigned short time = 0; | 1533 | unsigned short time = 0; |
1534 | unsigned short date = 0; | 1534 | unsigned short date = 0; |
1535 | #else | 1535 | #else |
diff --git a/firmware/drivers/rtc.c b/firmware/drivers/rtc.c index 0e65a8be5b..30bbb6dfcb 100644 --- a/firmware/drivers/rtc.c +++ b/firmware/drivers/rtc.c | |||
@@ -17,7 +17,7 @@ | |||
17 | * | 17 | * |
18 | ****************************************************************************/ | 18 | ****************************************************************************/ |
19 | #include "config.h" | 19 | #include "config.h" |
20 | #ifdef HAVE_RTC | 20 | #ifdef CONFIG_RTC |
21 | #include "i2c.h" | 21 | #include "i2c.h" |
22 | #include "rtc.h" | 22 | #include "rtc.h" |
23 | #include "kernel.h" | 23 | #include "kernel.h" |
diff --git a/firmware/export/config-fmrecorder.h b/firmware/export/config-fmrecorder.h index 221472a179..a96da0a352 100644 --- a/firmware/export/config-fmrecorder.h +++ b/firmware/export/config-fmrecorder.h | |||
@@ -13,14 +13,11 @@ | |||
13 | #define CONFIG_KEYPAD RECORDER_PAD | 13 | #define CONFIG_KEYPAD RECORDER_PAD |
14 | 14 | ||
15 | /* define this if you have a real-time clock */ | 15 | /* define this if you have a real-time clock */ |
16 | #define HAVE_RTC 1 | 16 | #define CONFIG_RTC RTC_M41ST84W |
17 | 17 | ||
18 | /* define this if you have RTC RAM available for settings */ | 18 | /* define this if you have RTC RAM available for settings */ |
19 | #define HAVE_RTC_RAM 1 | 19 | #define HAVE_RTC_RAM 1 |
20 | 20 | ||
21 | /* define this to the type of RTC hardware */ | ||
22 | #define CONFIG_RTC RTC_M41ST84W | ||
23 | |||
24 | /* Define this if you have a software controlled poweroff */ | 21 | /* Define this if you have a software controlled poweroff */ |
25 | #define HAVE_SW_POWEROFF | 22 | #define HAVE_SW_POWEROFF |
26 | 23 | ||
diff --git a/firmware/export/config-gmini120.h b/firmware/export/config-gmini120.h index a7566649b5..29066ecae3 100644 --- a/firmware/export/config-gmini120.h +++ b/firmware/export/config-gmini120.h | |||
@@ -8,14 +8,11 @@ | |||
8 | #define HAVE_LCD_BITMAP 1 | 8 | #define HAVE_LCD_BITMAP 1 |
9 | 9 | ||
10 | /* define this if you have a real-time clock */ | 10 | /* define this if you have a real-time clock */ |
11 | #define HAVE_RTC 1 | 11 | #define CONFIG_RTC RTC_M41ST84W |
12 | 12 | ||
13 | /* define this if you have RTC RAM available for settings */ | 13 | /* define this if you have RTC RAM available for settings */ |
14 | #define HAVE_RTC_RAM 1 | 14 | #define HAVE_RTC_RAM 1 |
15 | 15 | ||
16 | /* define this to the type of RTC hardware */ | ||
17 | #define CONFIG_RTC RTC_M41ST84W | ||
18 | |||
19 | /* LCD dimensions */ | 16 | /* LCD dimensions */ |
20 | #define LCD_WIDTH 128 | 17 | #define LCD_WIDTH 128 |
21 | #define LCD_HEIGHT 64 | 18 | #define LCD_HEIGHT 64 |
diff --git a/firmware/export/config-recorder.h b/firmware/export/config-recorder.h index 97062c168c..fee2b2a2e0 100644 --- a/firmware/export/config-recorder.h +++ b/firmware/export/config-recorder.h | |||
@@ -13,14 +13,11 @@ | |||
13 | #define CONFIG_KEYPAD RECORDER_PAD | 13 | #define CONFIG_KEYPAD RECORDER_PAD |
14 | 14 | ||
15 | /* define this if you have a real-time clock */ | 15 | /* define this if you have a real-time clock */ |
16 | #define HAVE_RTC 1 | 16 | #define CONFIG_RTC RTC_M41ST84W |
17 | 17 | ||
18 | /* define this if you have RTC RAM available for settings */ | 18 | /* define this if you have RTC RAM available for settings */ |
19 | #define HAVE_RTC_RAM 1 | 19 | #define HAVE_RTC_RAM 1 |
20 | 20 | ||
21 | /* define this to the type of RTC hardware */ | ||
22 | #define CONFIG_RTC RTC_M41ST84W | ||
23 | |||
24 | /* The number of bytes reserved for loadable plugins */ | 21 | /* The number of bytes reserved for loadable plugins */ |
25 | #define PLUGIN_BUFFER_SIZE 0x8000 | 22 | #define PLUGIN_BUFFER_SIZE 0x8000 |
26 | 23 | ||
diff --git a/firmware/export/config-recorderv2.h b/firmware/export/config-recorderv2.h index 21fe0b20c2..dd0f550626 100644 --- a/firmware/export/config-recorderv2.h +++ b/firmware/export/config-recorderv2.h | |||
@@ -13,14 +13,11 @@ | |||
13 | #define CONFIG_KEYPAD RECORDER_PAD | 13 | #define CONFIG_KEYPAD RECORDER_PAD |
14 | 14 | ||
15 | /* define this if you have a real-time clock */ | 15 | /* define this if you have a real-time clock */ |
16 | #define HAVE_RTC 1 | 16 | #define CONFIG_RTC RTC_M41ST84W |
17 | 17 | ||
18 | /* define this if you have RTC RAM available for settings */ | 18 | /* define this if you have RTC RAM available for settings */ |
19 | #define HAVE_RTC_RAM 1 | 19 | #define HAVE_RTC_RAM 1 |
20 | 20 | ||
21 | /* define this to the type of RTC hardware */ | ||
22 | #define CONFIG_RTC RTC_M41ST84W | ||
23 | |||
24 | /* Define this if you have a software controlled poweroff */ | 21 | /* Define this if you have a software controlled poweroff */ |
25 | #define HAVE_SW_POWEROFF | 22 | #define HAVE_SW_POWEROFF |
26 | 23 | ||
diff --git a/firmware/export/rtc.h b/firmware/export/rtc.h index fd793bc887..88413c795f 100644 --- a/firmware/export/rtc.h +++ b/firmware/export/rtc.h | |||
@@ -21,7 +21,7 @@ | |||
21 | 21 | ||
22 | #include <stdbool.h> | 22 | #include <stdbool.h> |
23 | 23 | ||
24 | #ifdef HAVE_RTC | 24 | #ifdef CONFIG_RTC |
25 | void rtc_init(void); | 25 | void rtc_init(void); |
26 | int rtc_read(unsigned char address); | 26 | int rtc_read(unsigned char address); |
27 | int rtc_read_multiple(unsigned char address, unsigned char *buf, int numbytes); | 27 | int rtc_read_multiple(unsigned char address, unsigned char *buf, int numbytes); |
@@ -35,6 +35,6 @@ bool rtc_check_alarm_started(bool release_alarm); | |||
35 | bool rtc_check_alarm_flag(void); | 35 | bool rtc_check_alarm_flag(void); |
36 | #endif /* HAVE_ALARM_MOD */ | 36 | #endif /* HAVE_ALARM_MOD */ |
37 | 37 | ||
38 | #endif /* HAVE_RTC */ | 38 | #endif /* CONFIG_RTC */ |
39 | 39 | ||
40 | #endif | 40 | #endif |