Add packet to retrieve SD/MMC boot registers.

This commit is contained in:
2019-10-14 01:11:20 +01:00
parent 3df019304f
commit ef92d42641
3 changed files with 31 additions and 1 deletions

View File

@@ -18,7 +18,9 @@ namespace DiscImageChef.Devices.Remote
CommandSdhci = 13, CommandSdhci = 13,
ResponseSdhci = 14, ResponseSdhci = 14,
CommandGetType = 15, CommandGetType = 15,
ResponseGetType = 16 ResponseGetType = 16,
CommandGetSdhciRegisters = 17,
ResponseGetSdhciRegisters = 18
} }
public enum DicNopReason : byte public enum DicNopReason : byte

View File

@@ -373,5 +373,10 @@ namespace DiscImageChef.Devices.Remote
{ {
throw new NotImplementedException("Getting remote device type not yet implemented..."); throw new NotImplementedException("Getting remote device type not yet implemented...");
} }
public bool GetSdhciRegisters(out byte[] csd, out byte[] cid, out byte[] ocr, out byte[] scr)
{
throw new NotImplementedException("Getting SDHCI registers not yet implemented...");
}
} }
} }

View File

@@ -215,4 +215,27 @@ namespace DiscImageChef.Devices.Remote
private readonly DicPacketHeader hdr; private readonly DicPacketHeader hdr;
private readonly DeviceType device_type; private readonly DeviceType device_type;
} }
public struct DicPacketCmdGetSdhciRegisters
{
private DicPacketHeader hdr;
}
public struct DicPacketResGetSdhciRegisters
{
private DicPacketHeader hdr;
[MarshalAs(UnmanagedType.U1)] public bool isSdhci;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)]
public byte[] csd;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)]
public byte[] cid;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)]
public byte[] ocr;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)]
public byte[] scr;
}
} }