feat: SPI flash driver (#4012)

Co-authored-by: Richard Li <richard.li@ces.hk>
This commit is contained in:
Raphael Coeffic
2023-10-13 19:51:11 +10:00
committed by GitHub
co-authored by Richard Li
parent 7400a598a1
commit cb16786a74
17 changed files with 1977 additions and 31 deletions
+5
View File
@@ -28,6 +28,8 @@ struct diskio_driver_t
{
DSTATUS (*initialize)(BYTE pdrv);
DSTATUS (*deinit)(BYTE pdrv);
DSTATUS (*status)(BYTE pdrv);
DRESULT (*read)(BYTE pdrv, BYTE* buff, DWORD sector, UINT count);
@@ -40,6 +42,9 @@ struct diskio_driver_t
// returns 1 if successful, 0 otherwise
int fatfsRegisterDriver(const diskio_driver_t* drv, uint8_t lun);
// gracefully tear down all drivers
void fatfsUnregisterDrivers();
// returns a pyhsical disk driver or NULL
const diskio_driver_t* fatfsGetDriver(uint8_t pdrv);