flash_internal: fix error return code

This commit is contained in:
King Kévin 2020-01-04 14:35:28 +01:00
parent 0aab25e870
commit f85a3d2439
1 changed files with 1 additions and 1 deletions

View File

@ -122,7 +122,7 @@ int32_t flash_internal_write(uint32_t address, const uint8_t *buffer, size_t siz
if (address < FLASH_BASE) {
return -3;
} else if ((uint32_t)&__flash_end >= FLASH_BASE && (address + size) > (uint32_t)&__flash_end) {
return 4;
return -4;
} else if ((uint32_t)&__flash_end < FLASH_BASE && (address + size) > (FLASH_BASE + DESIG_FLASH_SIZE * 1024)) {
return -5;
}