diff options
author | Nebuleon Fumika | 2013-02-08 05:50:22 -0500 |
---|---|---|
committer | Nebuleon Fumika | 2013-02-08 05:50:22 -0500 |
commit | 927d456306672110870eb3386742c1c1ef8eb4f6 (patch) | |
tree | 509da9ac1727570b02572068aefb9cdf102ad75b /sdk-modifications/libsrc/fs/disc_io/io_ds2_mmcf.h | |
parent | 433749b6ef1e2b070755c3bb7fc0d81b5ecaa7b1 (diff) | |
parent | d4fcf2697c9a45594e3ee0b8bf82e480ddd0b69b (diff) | |
download | snes9x2005-927d456306672110870eb3386742c1c1ef8eb4f6.tar.gz snes9x2005-927d456306672110870eb3386742c1c1ef8eb4f6.tar.bz2 snes9x2005-927d456306672110870eb3386742c1c1ef8eb4f6.zip |
Merge branch 'master' into 8bitsound
Conflicts:
source/nds/entry.cpp
Diffstat (limited to 'sdk-modifications/libsrc/fs/disc_io/io_ds2_mmcf.h')
-rwxr-xr-x | sdk-modifications/libsrc/fs/disc_io/io_ds2_mmcf.h | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/sdk-modifications/libsrc/fs/disc_io/io_ds2_mmcf.h b/sdk-modifications/libsrc/fs/disc_io/io_ds2_mmcf.h new file mode 100755 index 0000000..334a9bc --- /dev/null +++ b/sdk-modifications/libsrc/fs/disc_io/io_ds2_mmcf.h @@ -0,0 +1,63 @@ +#ifndef __IO_DS2_H__
+#define __IO_DS2_H__
+
+// 'DS2F'
+#define DEVICE_TYPE_DS2_MMCF 0x46434D4D
+
+#include "disc_io.h"
+#include "ds2_mmc_api.h"
+
+// export interface
+extern const IO_INTERFACE _io_ds2_mmcf ;
+
+/* initialize MMC/SD card */
+static inline bool _MMC_StartUp(void)
+{
+ return MMC_Initialize();
+}
+
+/* read multi blocks from MMC/SD card */
+/* read a single block from MMC/SD card */
+static inline bool _MMC_ReadSectors(u32 sector, u32 numSectors, void* buffer)
+{ + int flag; +
+ if(numSectors > 1)
+ flag= MMC_ReadMultiBlock(sector, numSectors, (unsigned char*)buffer);
+ else
+ flag= MMC_ReadBlock(sector, (unsigned char*)buffer); + return (flag==MMC_NO_ERROR);
+}
+
+/* write multi blocks from MMC/SD card */
+/* write a single block from MMC/SD card */
+static inline bool _MMC_WriteSectors(u32 sector, u32 numSectors, const void* buffer)
+{
+ int flag; + + if(numSectors > 1)
+ flag= MMC_WriteMultiBlock(sector, numSectors, (unsigned char*)buffer);
+ else
+ flag= MMC_WriteBlock(sector, (unsigned char*)buffer); + + return (flag==MMC_NO_ERROR);
+}
+
+static inline bool _MMC_ClearStatus(void)
+{
+ return true;
+}
+
+static inline bool _MMC_ShutDown(void)
+{
+ return true;
+}
+
+static inline bool _MMC_IsInserted(void)
+{
+ return true;
+}
+
+
+#endif //__IO_DS2_H__ + |