From 5a4cc8da3fd4fa7cd3b89ac8d636fe8ef77ee9e0 Mon Sep 17 00:00:00 2001 From: Aidan MacDonald Date: Sun, 15 Aug 2021 17:14:06 +0100 Subject: Drop HAVE_RTC_RAM Only Archos players ever used this feature and it isn't implemented on any current targets. Change-Id: I39c8455480a3fe33cd25b667e8d4d6ff3a092d3e --- apps/gui/wps.c | 4 ++-- apps/main.c | 5 ----- apps/settings.c | 39 ++------------------------------------- 3 files changed, 4 insertions(+), 44 deletions(-) (limited to 'apps') diff --git a/apps/gui/wps.c b/apps/gui/wps.c index e491d6f35b..cdb34ab447 100644 --- a/apps/gui/wps.c +++ b/apps/gui/wps.c @@ -584,7 +584,7 @@ void wps_do_playpause(bool updatewps) state->paused = true; pause_action(true, updatewps); settings_save(); -#if !defined(HAVE_RTC_RAM) && !defined(HAVE_SW_POWEROFF) +#if !defined(HAVE_SW_POWEROFF) call_storage_idle_notifys(true); /* make sure resume info is saved */ #endif } @@ -630,7 +630,7 @@ long gui_wps_show(void) about to shut down. lets save the settings. */ if (state->paused) { settings_save(); -#if !defined(HAVE_RTC_RAM) && !defined(HAVE_SW_POWEROFF) +#if !defined(HAVE_SW_POWEROFF) call_storage_idle_notifys(true); #endif } diff --git a/apps/main.c b/apps/main.c index 483d280204..3b7ec6d4c1 100644 --- a/apps/main.c +++ b/apps/main.c @@ -444,11 +444,6 @@ static void init(void) #if CONFIG_RTC rtc_init(); #endif -#ifdef HAVE_RTC_RAM - CHART(">settings_load(RTC)"); - settings_load(SETTINGS_RTC); /* early load parts of global_settings */ - CHART("= 0) { @@ -204,16 +190,6 @@ static bool write_nvram_data(char* buf, int max_len) if (len < 8) return false; } -#else - /* FIXME: okay, it _would_ be cleaner and faster to implement rtc_write so - that it would write a number of bytes at a time since the RTC chip - supports that, but this will have to do for now 8-) */ - for (i=0; i < NVRAM_BLOCK_SIZE; i++ ) { - int r = rtc_write(0x14+i, buf[i]); - if (r) - return false; - } -#endif return true; } @@ -586,12 +562,12 @@ static bool settings_write_config(const char* filename, int options) close(fd); return true; } -#ifndef HAVE_RTC_RAM + static void flush_global_status_callback(void) { write_nvram_data(nvram_buffer,NVRAM_BLOCK_SIZE); } -#endif + static void flush_config_block_callback(void) { write_nvram_data(nvram_buffer,NVRAM_BLOCK_SIZE); @@ -621,23 +597,12 @@ static void update_runtime(void) void status_save(void) { update_runtime(); -#ifdef HAVE_RTC_RAM - /* this will be done in the storage_callback if - target doesnt have rtc ram */ - write_nvram_data(nvram_buffer,NVRAM_BLOCK_SIZE); -#else register_storage_idle_func(flush_global_status_callback); -#endif } int settings_save(void) { update_runtime(); -#ifdef HAVE_RTC_RAM - /* this will be done in the storage_callback if - target doesnt have rtc ram */ - write_nvram_data(nvram_buffer,NVRAM_BLOCK_SIZE); -#endif register_storage_idle_func(flush_config_block_callback); return 0; } -- cgit v1.2.3