1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

stm32/flashpage: use void pointer for flash address

This commit is contained in:
Koen Zandberg 2020-11-09 14:28:42 +01:00
parent c6b1b3b06f
commit d2a46f58c2
No known key found for this signature in database
GPG Key ID: 0895A893E6D2985B

View File

@ -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);