This commit is contained in:
andreika-git 2024-02-08 19:30:48 +02:00 committed by rusefillc
parent f508d98288
commit bcf8a8826f
2 changed files with 4 additions and 4 deletions

View File

@ -39,7 +39,7 @@ blt_bool FlashWriteChecksum(void);
blt_bool FlashVerifyChecksum(void);
blt_bool FlashDone(void);
blt_addr FlashGetUserProgBaseAddress(void);
bool isFlashDualBank(void);
blt_bool isFlashDualBank(void);
#endif /* FLASH_H */
/*********************************** end of flash.h ************************************/

View File

@ -45,11 +45,11 @@ blt_bool FlashVerifyChecksum() {
return intFlashIsErased(FlashGetUserProgBaseAddress(), 4) ? BLT_FALSE : BLT_TRUE;
}
bool isFlashDualBank(void) {
blt_bool isFlashDualBank(void) {
#ifdef STM32F7XX
// cleared bit indicates dual bank
return (FLASH->OPTCR & FLASH_OPTCR_nDBANK) == 0;
return (FLASH->OPTCR & FLASH_OPTCR_nDBANK) == 0 ? BLT_TRUE : BLT_FALSE;
#else
return true;
return BLT_TRUE;
#endif
}