This is actually nonportable, e.g. STM32F2 and F4 have flash pages of various sizes. I'd be fine with the new functions going into the STM32F1 series header and a new libmaple/stm32f1/flash.c, though. We can move the declarations into the libmaple header once every series supports the new routines.