fatfs: re-enable TRIM support for SPI mode

Previously this didn't work because MMC_ERASE implementation for SPI
didn't wait for the busy status indication.
This commit is contained in:
Ivan Grokhotkov
2022-04-10 21:47:39 +02:00
parent 36e3043306
commit a28828a6f4

View File

@@ -101,13 +101,6 @@ DRESULT ff_sdmmc_ioctl (BYTE pdrv, BYTE cmd, void* buff)
return RES_ERROR;
#if FF_USE_TRIM
case CTRL_TRIM:
/*
* limitation with sector erase when used in SDSPI mode
* hence return if host is SPI.
*/
if ((card->host.flags & SDMMC_HOST_FLAG_SPI) != 0) {
return RES_ERROR;
}
return ff_sdmmc_trim (pdrv, *((DWORD*)buff), //start_sector
(*((DWORD*)buff + 1) - *((DWORD*)buff) + 1)); //sector_count
#endif //FF_USE_TRIM