case SPI_FLASH:
/* 扇区偏移2MB,外部Flash文件系统空间放在SPI Flash后面6MB空间 */
sector+=512;
write_addr = sector<<12;
SPI_FLASH_SectorErase(write_addr);
SPI_FLASH_BufferWrite((u8 *)buff,write_addr,count<<12);
status = RES_OK;
break;
SPI_FLASH_SectorErase(write_addr);不是应该只是擦除了一个扇区,如何能够在后面写多个扇区? |