diff options
| author | Damien George <damien@micropython.org> | 2022-06-07 15:06:12 +1000 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2022-06-07 16:55:18 +1000 |
| commit | a0dae1dda21fc22517dccce3834af03714dadba4 (patch) | |
| tree | d8fd6c108d6b0c998690f51c9c447a3cb8049110 | |
| parent | 2fb413b265436087a64c63d4bc1a003c010a037e (diff) | |
stm32/flash: Remove FLASH_OPTR_DBANK condition in L4, H7 get_bank func.
This was added by mistake in 8f68e26f79ee325669fb7dc7bbd092fccd5b038f 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>
| -rw-r--r-- | ports/stm32/flash.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/ports/stm32/flash.c b/ports/stm32/flash.c index 2644e0f58..de537aba2 100644 --- a/ports/stm32/flash.c +++ b/ports/stm32/flash.c @@ -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; } |
