mirror of
https://github.com/micropython/micropython.git
synced 2026-01-06 20:20:14 +01:00
stm32/flash: Remove FLASH_OPTR_DBANK condition in L4, H7 get_bank func.
This was added by mistake in 8f68e26f79 when
adding support for G4 MCUs, which does not using this get_bank() function.
FLASH_OPTR_DBANK is only defined on G4 and L4 MCUs, so on H7 this
FLASH_BANK_2 code was being wrongly excluded.
Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
@@ -140,20 +140,12 @@ static uint32_t get_bank(uint32_t addr) {
|
||||
if (addr < (FLASH_BASE + FLASH_BANK_SIZE)) {
|
||||
return FLASH_BANK_1;
|
||||
} else {
|
||||
#if defined(FLASH_OPTR_DBANK)
|
||||
return FLASH_BANK_2;
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
} else {
|
||||
// bank swap
|
||||
if (addr < (FLASH_BASE + FLASH_BANK_SIZE)) {
|
||||
#if defined(FLASH_OPTR_DBANK)
|
||||
return FLASH_BANK_2;
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
} else {
|
||||
return FLASH_BANK_1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user