mirror of
https://gitee.com/Armink/EasyFlash.git
synced 2024-11-29 18:57:41 +08:00
【完善】env 初始化断言检查。
Signed-off-by: armink <armink.ztl@gmail.com>
This commit is contained in:
parent
435b1ffa3a
commit
1e8ae53e7d
@ -1402,9 +1402,10 @@ EfErrCode ef_env_init(ef_env const *default_env, size_t default_env_size) {
|
||||
|
||||
EF_ASSERT(default_env);
|
||||
EF_ASSERT(ENV_AREA_SIZE);
|
||||
EF_ASSERT(EF_ERASE_MIN_SIZE);
|
||||
/* must be aligned with erase_min_size */
|
||||
EF_ASSERT(ENV_AREA_SIZE % EF_ERASE_MIN_SIZE == 0);
|
||||
/* sector number must be greater than or equal to 2 */
|
||||
EF_ASSERT(SECTOR_NUM >= 2);
|
||||
/* must be aligned with write granularity */
|
||||
EF_ASSERT((EF_STR_ENV_VALUE_MAX_SIZE * 8) % EF_WRITE_GRAN == 0);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user