#ifndef GD32_FLASH_H
#define GD32_FLASH_H
#include "stdint.h"

#define FMC_PAGE_SIZE           ((uint16_t)0x1000U)
#define FMC_WRITE_START_ADDR    ((uint32_t)0x08038800U)
#define FMC_WRITE_END_ADDR      ((uint32_t)0x0803FFFFU)
void gd32_flash_test();

void GD32_EraseFlash(uint16_t start, uint16_t num);
int save_config_params(char *params);
int read_data_from_flash(void *buffer);
#endif
