Fixed system state information loss when it is saved in file
Change-Id: If2aca712af4152e144ec919cfc4b4d9cb23bf4f2
This commit is contained in:
parent
553f218026
commit
f26cf6a3ec
1 changed files with 5 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue