summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/gui/gwps.c4
-rw-r--r--apps/main.c2
-rw-r--r--apps/settings.c6
-rw-r--r--firmware/SOURCES2
-rw-r--r--firmware/export/config-fmrecorder.h6
-rw-r--r--firmware/export/config-gmini120.h6
-rw-r--r--firmware/export/config-recorder.h6
-rw-r--r--firmware/export/config-recorderv2.h6
-rw-r--r--firmware/export/config.h5
9 files changed, 38 insertions, 5 deletions
diff --git a/apps/gui/gwps.c b/apps/gui/gwps.c
index 6e0551745a..05c33a0568 100644
--- a/apps/gui/gwps.c
+++ b/apps/gui/gwps.c
@@ -135,7 +135,7 @@ long gui_wps_show(void)
135 about to shut down. lets save the settings. */ 135 about to shut down. lets save the settings. */
136 if (wps_state.paused) { 136 if (wps_state.paused) {
137 settings_save(); 137 settings_save();
138#if !defined(HAVE_RTC) && !defined(HAVE_SW_POWEROFF) 138#if !defined(HAVE_RTC_RAM) && !defined(HAVE_SW_POWEROFF)
139 ata_flush(); 139 ata_flush();
140#endif 140#endif
141 } 141 }
@@ -293,7 +293,7 @@ long gui_wps_show(void)
293 else 293 else
294 audio_pause(); 294 audio_pause();
295 settings_save(); 295 settings_save();
296#if !defined(HAVE_RTC) && !defined(HAVE_SW_POWEROFF) 296#if !defined(HAVE_RTC_RAM) && !defined(HAVE_SW_POWEROFF)
297 ata_flush(); /* make sure resume info is saved */ 297 ata_flush(); /* make sure resume info is saved */
298#endif 298#endif
299 } 299 }
diff --git a/apps/main.c b/apps/main.c
index f11706ef93..94d6f70577 100644
--- a/apps/main.c
+++ b/apps/main.c
@@ -228,6 +228,8 @@ void init(void)
228 228
229#ifdef HAVE_RTC 229#ifdef HAVE_RTC
230 rtc_init(); 230 rtc_init();
231#endif
232#ifdef HAVE_RTC_RAM
231 settings_load(SETTINGS_RTC); /* early load parts of global_settings */ 233 settings_load(SETTINGS_RTC); /* early load parts of global_settings */
232#endif 234#endif
233 235
diff --git a/apps/settings.c b/apps/settings.c
index 49423ab629..edcef4a271 100644
--- a/apps/settings.c
+++ b/apps/settings.c
@@ -574,7 +574,7 @@ static void init_config_buffer( void )
574static int save_config_buffer( void ) 574static int save_config_buffer( void )
575{ 575{
576 unsigned short chksum; 576 unsigned short chksum;
577#ifdef HAVE_RTC 577#ifdef HAVE_RTC_RAM
578 unsigned int i; 578 unsigned int i;
579#endif 579#endif
580 580
@@ -583,7 +583,7 @@ static int save_config_buffer( void )
583 config_block[ RTC_BLOCK_SIZE - 2 ] = chksum >> 8; 583 config_block[ RTC_BLOCK_SIZE - 2 ] = chksum >> 8;
584 config_block[ RTC_BLOCK_SIZE - 1 ] = chksum & 0xff; 584 config_block[ RTC_BLOCK_SIZE - 1 ] = chksum & 0xff;
585 585
586#ifdef HAVE_RTC 586#ifdef HAVE_RTC_RAM
587 /* FIXME: okay, it _would_ be cleaner and faster to implement rtc_write so 587 /* FIXME: okay, it _would_ be cleaner and faster to implement rtc_write so
588 that it would write a number of bytes at a time since the RTC chip 588 that it would write a number of bytes at a time since the RTC chip
589 supports that, but this will have to do for now 8-) */ 589 supports that, but this will have to do for now 8-) */
@@ -637,7 +637,7 @@ static int load_config_buffer(int which)
637 } 637 }
638 } 638 }
639 639
640#ifdef HAVE_RTC 640#ifdef HAVE_RTC_RAM
641 if(!correct) 641 if(!correct)
642 { 642 {
643 /* If the disk sector was incorrect, reinit the buffer */ 643 /* If the disk sector was incorrect, reinit the buffer */
diff --git a/firmware/SOURCES b/firmware/SOURCES
index aba4e3b622..086501cc30 100644
--- a/firmware/SOURCES
+++ b/firmware/SOURCES
@@ -98,8 +98,10 @@ drivers/mas.c
98drivers/pcf50606.c 98drivers/pcf50606.c
99#endif 99#endif
100#ifdef HAVE_RTC 100#ifdef HAVE_RTC
101#if CONFIG_RTC == RTC_M41ST84W
101drivers/rtc.c 102drivers/rtc.c
102#endif 103#endif
104#endif
103drivers/serial.c 105drivers/serial.c
104#endif /* !SIMULATOR */ 106#endif /* !SIMULATOR */
105#ifdef HAVE_LCD_BITMAP 107#ifdef HAVE_LCD_BITMAP
diff --git a/firmware/export/config-fmrecorder.h b/firmware/export/config-fmrecorder.h
index 28d8239c22..221472a179 100644
--- a/firmware/export/config-fmrecorder.h
+++ b/firmware/export/config-fmrecorder.h
@@ -15,6 +15,12 @@
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 HAVE_RTC 1
17 17
18/* define this if you have RTC RAM available for settings */
19#define HAVE_RTC_RAM 1
20
21/* define this to the type of RTC hardware */
22#define CONFIG_RTC RTC_M41ST84W
23
18/* Define this if you have a software controlled poweroff */ 24/* Define this if you have a software controlled poweroff */
19#define HAVE_SW_POWEROFF 25#define HAVE_SW_POWEROFF
20 26
diff --git a/firmware/export/config-gmini120.h b/firmware/export/config-gmini120.h
index c833435dea..a7566649b5 100644
--- a/firmware/export/config-gmini120.h
+++ b/firmware/export/config-gmini120.h
@@ -10,6 +10,12 @@
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 HAVE_RTC 1
12 12
13/* define this if you have RTC RAM available for settings */
14#define HAVE_RTC_RAM 1
15
16/* define this to the type of RTC hardware */
17#define CONFIG_RTC RTC_M41ST84W
18
13/* LCD dimensions */ 19/* LCD dimensions */
14#define LCD_WIDTH 128 20#define LCD_WIDTH 128
15#define LCD_HEIGHT 64 21#define LCD_HEIGHT 64
diff --git a/firmware/export/config-recorder.h b/firmware/export/config-recorder.h
index 32c29b2ec5..97062c168c 100644
--- a/firmware/export/config-recorder.h
+++ b/firmware/export/config-recorder.h
@@ -15,6 +15,12 @@
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 HAVE_RTC 1
17 17
18/* define this if you have RTC RAM available for settings */
19#define HAVE_RTC_RAM 1
20
21/* define this to the type of RTC hardware */
22#define CONFIG_RTC RTC_M41ST84W
23
18/* The number of bytes reserved for loadable plugins */ 24/* The number of bytes reserved for loadable plugins */
19#define PLUGIN_BUFFER_SIZE 0x8000 25#define PLUGIN_BUFFER_SIZE 0x8000
20 26
diff --git a/firmware/export/config-recorderv2.h b/firmware/export/config-recorderv2.h
index fbe99812dc..21fe0b20c2 100644
--- a/firmware/export/config-recorderv2.h
+++ b/firmware/export/config-recorderv2.h
@@ -15,6 +15,12 @@
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 HAVE_RTC 1
17 17
18/* define this if you have RTC RAM available for settings */
19#define HAVE_RTC_RAM 1
20
21/* define this to the type of RTC hardware */
22#define CONFIG_RTC RTC_M41ST84W
23
18/* Define this if you have a software controlled poweroff */ 24/* Define this if you have a software controlled poweroff */
19#define HAVE_SW_POWEROFF 25#define HAVE_SW_POWEROFF
20 26
diff --git a/firmware/export/config.h b/firmware/export/config.h
index 9764afde05..555e062eb4 100644
--- a/firmware/export/config.h
+++ b/firmware/export/config.h
@@ -100,6 +100,11 @@
100/* CONFIG_LED */ 100/* CONFIG_LED */
101#define LED_REAL 1 /* SW controlled LED (Archos recorders, player, Gmini) */ 101#define LED_REAL 1 /* SW controlled LED (Archos recorders, player, Gmini) */
102#define LED_VIRTUAL 2 /* Virtual LED (icon) (Archos Ondio) */ 102#define LED_VIRTUAL 2 /* Virtual LED (icon) (Archos Ondio) */
103
104/* CONFIG_RTC */
105#define RTC_M41ST84W 1
106#define RTC_PCF50606 2
107
103/* else HW controlled LED (iRiver H1x0) */ 108/* else HW controlled LED (iRiver H1x0) */
104 109
105/* now go and pick yours */ 110/* now go and pick yours */