【修正】log 模块在开启编译优化时,可能运行不正常的问题。

Signed-off-by: armink <armink.ztl@gmail.com>
pull/61/head
armink 7 years ago
parent 4461259169
commit 64e35aedb0

@ -201,7 +201,7 @@ static uint32_t find_sec_using_end_addr(uint32_t addr) {
EF_ASSERT(READ_BUF_SIZE % 4 == 0); EF_ASSERT(READ_BUF_SIZE % 4 == 0);
/* calculate the sector start and data start address */ /* calculate the sector start and data start address */
sector_start = addr / EF_ERASE_MIN_SIZE * EF_ERASE_MIN_SIZE; sector_start = addr & (~(EF_ERASE_MIN_SIZE - 1));
data_start = sector_start + LOG_SECTOR_HEADER_SIZE; data_start = sector_start + LOG_SECTOR_HEADER_SIZE;
/* counts continuous 0xFF which is end of sector */ /* counts continuous 0xFF which is end of sector */

Loading…
Cancel
Save