Added support for SecureDigital / MultiMediaCard on Windows.

This commit is contained in:
2017-12-06 23:05:59 +00:00
parent d660ec93d1
commit 4cd0ec53e9
6 changed files with 274 additions and 27 deletions

View File

@@ -343,6 +343,8 @@ namespace DiscImageChef.Devices.Windows
IOCTL_STORAGE_QUERY_PROPERTY = 0x2D1400,
IOCTL_IDE_PASS_THROUGH = 0x4D028,
IOCTL_STORAGE_GET_DEVICE_NUMBER = 0x2D1080,
IOCTL_SFFDISK_QUERY_DEVICE_PROTOCOL = 0x71E80,
IOCTL_SFFDISK_DEVICE_COMMAND = 0x79E84,
}
[Flags]
@@ -446,9 +448,54 @@ namespace DiscImageChef.Devices.Windows
/// </summary>
DeviceInterface = 0x10,
}
public enum SdCommandClass : uint
{
Standard,
AppCmd
}
public enum SdTransferDirection : uint
{
Unspecified,
Read,
Write
}
public enum SdTransferType : uint
{
Unspecified,
CmdOnly,
SingleBlock,
MultiBlock,
MultiBlockNoCmd12
}
public enum SdResponseType : uint
{
Unspecified,
None,
R1,
R1b,
R2,
R3,
R4,
R5,
R5b,
R6
}
public enum SffdiskDcmd : uint
{
GetVersion,
LockChannel,
UnlockChannel,
DeviceCommand
};
static class Consts
{
public static Guid GUID_SFF_PROTOCOL_SD = new Guid("AD7536A8-D055-4C40-AA4D-96312DDB6B38");
public static Guid GUID_DEVINTERFACE_DISK = new Guid(0x53F56307, 0xB6BF, 0x11D0, 0x94, 0xF2, 0x00, 0xA0, 0xC9, 0x1E, 0xFB, 0x8B);
}
}