#ifndef FMC_H
#define FMC_H

#include "stdint.h"

void GD32_EraseFlash(uint16_t start, uint16_t num);                     //函数声明
void GD32_WriteFlash(uint32_t saddr, uint32_t *wdata, uint32_t wnum);   //函数声明



#include "gd32f10x.h"

/// 移植修改区 ///

/* FLASH大小：3MB */
#define GD32FLASH_SIZE  0X00300000UL

/* FLASH起始地址 */
#define GD32FLASH_BASE  FLASH_BASE

/* FLASH结束地址 */
#define GD32FLASH_END   (GD32FLASH_BASE | GD32FLASH_SIZE)

/* FALSH页大小 */
#define GD32FLASH_PAGE_SIZE 1024

/* FLASH总页数 */
#define GD32FLASH_PAGE_NUM  (GD32FLASH_SIZE / GD32FLASH_PAGE_SIZE)

/// 导出函数声明 
uint32_t FLASH_Read(uint32_t Address, void *Buffer, uint32_t Size);

#endif



