Skip to content

Commit

Permalink
use blt_bool rusefi#5922
Browse files Browse the repository at this point in the history
  • Loading branch information
andreika-git authored and rusefillc committed Feb 8, 2024
1 parent f508d98 commit bcf8a88
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion firmware/bootloader/openblt_chibios/flash.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 ************************************/
6 changes: 3 additions & 3 deletions firmware/bootloader/openblt_chibios/openblt_flash.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

0 comments on commit bcf8a88

Please sign in to comment.