本帖最后由 与时俱进 于 2014-4-26 20:53 编辑
DataFlashProg.c文件修改成只剩下面两个子程序:
void DataFlashRead(uint32_t addr, uint32_t size, uint32_t buffer)
{
/* This is low level read function of USB Mass Storage */
if(size >FLASH_PAGE_SIZE)
read_nSECTOR(addr,size,(uint32_t *)buffer);
else
readSECTOR(addr, (uint32_t *)buffer);
}
void DataFlashWrite(uint32_t addr, uint32_t size, uint32_t buffer)
{
/* This is low level write function of USB Mass Storage */
if(size > FLASH_PAGE_SIZE)
write_nSECTOR(addr, size,(uint32_t *) buffer);
else
writeSECTOR(addr, (uint32_t *) buffer);
}
|