Fix compilation error

This commit is contained in:
Jack 2021-10-17 20:40:19 -07:00 committed by Dimitris Mantzouranis
parent 36a295e0d1
commit cda95f33c7
1 changed files with 2 additions and 4 deletions

View File

@ -40,8 +40,7 @@
FLASH_Status FLASH_EraseSector (uint32_t adr)
{
// never touch the jumploader
if (adr < SN32_JUMPLOADER_SIZE)
return FLASH_FAIL;
if (adr < SN32_JUMPLOADER_SIZE) return FLASH_FAIL;
SN_FLASH->CTRL = FLASH_PER; // Page Erase Enabled
SN_FLASH->ADDR = adr; // Page Address
@ -69,8 +68,7 @@ FLASH_Status FLASH_EraseSector (uint32_t adr)
FLASH_Status FLASH_ProgramPage (uint32_t adr, uint32_t sz, uint32_t Data)
{
// never touch the jumploader
if (adr < SN32_JUMPLOADER_SIZE)
return FLASH_FAIL;
if (adr < SN32_JUMPLOADER_SIZE) return FLASH_FAIL;
SN_FLASH->CTRL = FLASH_PG; // Programming Enabled
SN_FLASH->ADDR = adr;