summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/settings.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/apps/settings.c b/apps/settings.c
index 2d38c4a5ef..2841133957 100644
--- a/apps/settings.c
+++ b/apps/settings.c
@@ -89,7 +89,12 @@ struct system_status global_status;
#include "pcm_sampr.h"
#endif /* CONFIG_CODEC == SWCODEC */
+#define NVRAM_DATA_START 8
+#ifdef HAVE_RTC_RAM
#define NVRAM_BLOCK_SIZE 44
+#else
+#define NVRAM_BLOCK_SIZE (sizeof(struct system_status) + NVRAM_DATA_START)
+#endif
#ifdef HAVE_LCD_BITMAP
#define MAX_LINES 10
@@ -118,7 +123,6 @@ long lasttime = 0;
[4-7] crc32 checksum
[8-NVRAM_BLOCK_SIZE] data
*/
-#define NVRAM_DATA_START 8
static char nvram_buffer[NVRAM_BLOCK_SIZE];
static bool read_nvram_data(char* buf, int max_len)