mirror of
https://gitee.com/Armink/EasyFlash.git
synced 2024-11-29 18:57:41 +08:00
1、【完善】Flash Log功能,避免在极端情况下出现起始地址无法获取的问题。
Signed-off-by: armink <armink.ztl@gmail.com>
This commit is contained in:
parent
332632864e
commit
f1a12822d4
@ -67,7 +67,7 @@ if (!(EXPR)) \
|
||||
while (1); \
|
||||
}
|
||||
/* EasyFlash software version number */
|
||||
#define EF_SW_VERSION "1.09.12"
|
||||
#define EF_SW_VERSION "1.09.16"
|
||||
|
||||
typedef struct _eflash_env{
|
||||
char *key;
|
||||
|
@ -173,7 +173,12 @@ static void find_start_and_end_addr(void) {
|
||||
log_start_addr = log_area_start_addr;
|
||||
cur_using_sec_addr = log_area_start_addr + cur_size;
|
||||
} else {
|
||||
/* state 1 or 2*/
|
||||
/* like state 2 when the sector is the last one */
|
||||
if (cur_size + EF_ERASE_MIN_SIZE >= LOG_AREA_SIZE) {
|
||||
cur_log_sec_state = 2;
|
||||
log_start_addr = log_area_start_addr + cur_size;
|
||||
cur_using_sec_addr = log_area_start_addr + cur_size - EF_ERASE_MIN_SIZE;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case FLASH_SECTOR_FULL:
|
||||
|
Loading…
Reference in New Issue
Block a user