use FLASH_BASE instead of completely magic numbers

This commit is contained in:
Matthew Kennedy 2023-11-02 15:45:21 -04:00 committed by rusefillc
parent e1e5333a32
commit 37810323e2
1 changed files with 5 additions and 1 deletions

View File

@ -11,7 +11,11 @@ void FlashInit() {
}
blt_addr FlashGetUserProgBaseAddress() {
return 0x08008000;
#ifdef STM32H7XX
return FLASH_BASE + 128 * 1024;
#else // not STM32H7
return FLASH_BASE + 32 * 1024;
#endif
}
blt_bool FlashWrite(blt_addr addr, blt_int32u len, blt_int8u *data) {