From d2a46f58c23005cef5c4cd903eae18e963d182b5 Mon Sep 17 00:00:00 2001 From: Koen Zandberg Date: Mon, 9 Nov 2020 14:28:42 +0100 Subject: [PATCH] stm32/flashpage: use void pointer for flash address --- cpu/stm32/periph/flashpage.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/cpu/stm32/periph/flashpage.c b/cpu/stm32/periph/flashpage.c index e7856eb00b..bf39b136d4 100644 --- a/cpu/stm32/periph/flashpage.c +++ b/cpu/stm32/periph/flashpage.c @@ -248,16 +248,7 @@ void flashpage_write(int page, const void *data) assert(page < (int)(FLASH->SFR & FLASH_SFR_SFSA)); #endif -#if defined(CPU_FAM_STM32L0) || defined(CPU_FAM_STM32L1) - /* STM32L0/L1 only supports word sizes */ - uint32_t *page_addr = flashpage_addr(page); -#elif defined(CPU_FAM_STM32L4) || defined(CPU_FAM_STM32G4) || \ - defined(CPU_FAM_STM32G0) || defined(CPU_FAM_STM32L5) - uint64_t *page_addr = flashpage_addr(page); -#else - /* Default is to support half-word sizes */ - uint16_t *page_addr = flashpage_addr(page); -#endif + void *page_addr = flashpage_addr(page); /* ERASE sequence */ _erase_page(page_addr);