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

cpu/stm32: flashpage: use common helper functions

This commit is contained in:
Benjamin Valentin 2021-02-01 22:02:35 +01:00 committed by Benjamin Valentin
parent 917cf85225
commit 49585fc517
2 changed files with 1 additions and 10 deletions

View File

@ -130,6 +130,7 @@ extern "C" {
#if defined(CPU_FAM_STM32F2) || defined(CPU_FAM_STM32F4) || \
defined(CPU_FAM_STM32F7)
#define PERIPH_FLASHPAGE_CUSTOM_PAGESIZES
#define PERIPH_FLASHPAGE_NEEDS_FLASHPAGE_ADDR
/**
* @brief stm32 dual bank configuration

View File

@ -328,16 +328,6 @@ size_t flashpage_size(unsigned page)
}
}
void *flashpage_addr(unsigned page)
{
uintptr_t addr = CPU_FLASH_BASE;
while (page) {
addr += flashpage_size(--page);
}
return (void*)addr;
}
unsigned flashpage_page(void *addr)
{
/* Calculates the flashpage number based on the address for the