1 #include "projectconfig.h"
4 #if CFG_HAVE_SDCARD == 1
8 #include "at45db041d.h"
10 /* diskio interface */
12 DSTATUS
disk_initialize(BYTE drv
) {
13 #if CFG_HAVE_SDCARD == 1
17 return dataflash_initialize();
18 #if CFG_HAVE_SDCARD == 1
20 return mmc_initialize();
27 DSTATUS
disk_status(BYTE drv
) {
28 #if CFG_HAVE_SDCARD == 1
32 return dataflash_status();
33 #if CFG_HAVE_SDCARD == 1
42 DRESULT
disk_read(BYTE drv
, BYTE
*buff
, DWORD sector
, BYTE count
) {
43 #if CFG_HAVE_SDCARD == 1
47 return dataflash_read(buff
, sector
, count
);
48 #if CFG_HAVE_SDCARD == 1
50 return mmc_read(buff
, sector
, count
);
58 DRESULT
disk_write(BYTE drv
, const BYTE
*buff
, DWORD sector
, BYTE count
) {
59 #if CFG_HAVE_SDCARD == 1
63 return dataflash_write(buff
, sector
, count
);
64 #if CFG_HAVE_SDCARD == 1
66 return mmc_write(buff
, sector
, count
);
72 #endif /* _READONLY == 0 */
75 DRESULT
disk_ioctl(BYTE drv
, BYTE ctrl
, void *buff
) {
76 #if CFG_HAVE_SDCARD == 1
80 return dataflash_ioctl(ctrl
, buff
);
81 #if CFG_HAVE_SDCARD == 1
83 return mmc_ioctl(ctrl
, buff
);
89 #endif /* _USE_IOCTL != 0 */
This page took 0.045515 seconds and 5 git commands to generate.