/* Return next page address after/start at input address */
void* mem_flash_page_next(void *addr)
/* Return next page address after/start at input address */
void* mem_flash_page_next(void *addr)
{
	uint32_t address = (uint32_t)addr;
	uint32_t offset = address % IFLASH_PAGE_SIZE;
	if (offset) {
		address += (IFLASH_PAGE_SIZE - offset);
	}
	if (address < IFLASH_ADDR) {
		address += IFLASH_ADDR;
	}
	return (void*)address;
}