From f6c5a3806101a31a5e0ce9fbc53b265bf37d1208 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nima=20Askari=20-----=20=D9=86=DB=8C=D9=85=D8=A7=20=D8=B9?= =?UTF-8?q?=D8=B3=DA=A9=D8=B1=DB=8C?= Date: Thu, 19 Oct 2017 13:13:55 +0330 Subject: [PATCH] Fix a Bug --- eeprom.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eeprom.c b/eeprom.c index f7aac08..f9366a1 100644 --- a/eeprom.c +++ b/eeprom.c @@ -55,7 +55,7 @@ bool EE_Write(uint16_t VirtualAddress, uint32_t Data) HAL_FLASH_Unlock(); for(uint16_t i=0 ; i<_EEPROM_FLASH_PAGE_SIZE/4 ; i++) { - if(HAL_FLASH_Program(FLASH_TYPEPROGRAM_WORD,(i*4)+_EEPROM_FLASH_PAGE_ADDRESS,(uint64_t)EEPROMPageBackup[i])==false) + if(HAL_FLASH_Program(FLASH_TYPEPROGRAM_WORD,(i*4)+_EEPROM_FLASH_PAGE_ADDRESS,(uint64_t)EEPROMPageBackup[i])!=HAL_OK) { HAL_FLASH_Lock(); return false;