mirror of
https://github.com/Thealexbarney/LibHac.git
synced 2024-11-14 10:49:41 +01:00
Diff GcSrv and SdmmcSrv with FS 16
This commit is contained in:
parent
7005676777
commit
e2cbb0898c
21 changed files with 32 additions and 32 deletions
|
@ -13,7 +13,7 @@ namespace LibHac.GcSrv;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The game card manager used on consoles without a game card slot.
|
/// The game card manager used on consoles without a game card slot.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>Based on nnSdk 15.3.0 (FS 15.0.0)</remarks>
|
/// <remarks>Based on nnSdk 16.2.0 (FS 16.0.0)</remarks>
|
||||||
public class DummyGameCardManager : IStorageDeviceManager, IStorageDeviceOperator, IGameCardKeyManager
|
public class DummyGameCardManager : IStorageDeviceManager, IStorageDeviceOperator, IGameCardKeyManager
|
||||||
{
|
{
|
||||||
private SharedRef<DummyEventNotifier> _eventNotifier;
|
private SharedRef<DummyEventNotifier> _eventNotifier;
|
||||||
|
|
|
@ -6,7 +6,7 @@ namespace LibHac.GcSrv;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Manages registering events and signaling them when a game card is inserted or removed.
|
/// Manages registering events and signaling them when a game card is inserted or removed.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>Based on nnSdk 15.3.0 (FS 15.0.0)</remarks>
|
/// <remarks>Based on nnSdk 16.2.0 (FS 16.0.0)</remarks>
|
||||||
internal class GameCardDetectionEventManager : CardDeviceDetectionEventManager
|
internal class GameCardDetectionEventManager : CardDeviceDetectionEventManager
|
||||||
{
|
{
|
||||||
private IGcApi _gc;
|
private IGcApi _gc;
|
||||||
|
|
|
@ -14,7 +14,7 @@ namespace LibHac.GcSrv;
|
||||||
/// Performs various operations on the inserted game card.
|
/// Performs various operations on the inserted game card.
|
||||||
/// All available operations are listed in <see cref="GameCardOperationIdValue"/>.
|
/// All available operations are listed in <see cref="GameCardOperationIdValue"/>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>Based on nnSdk 15.3.0 (FS 15.0.0)</remarks>
|
/// <remarks>Based on nnSdk 16.2.0 (FS 16.0.0)</remarks>
|
||||||
internal class GameCardDeviceOperator : IStorageDeviceOperator
|
internal class GameCardDeviceOperator : IStorageDeviceOperator
|
||||||
{
|
{
|
||||||
private SharedRef<GameCardStorageDevice> _storageDevice;
|
private SharedRef<GameCardStorageDevice> _storageDevice;
|
||||||
|
|
|
@ -29,7 +29,7 @@ namespace LibHac.GcSrv;
|
||||||
/// from the game card after the card has been swapped.</para>
|
/// from the game card after the card has been swapped.</para>
|
||||||
/// <para>This class implements the <see cref="IStorageDeviceOperator"/> interface, and all available operations are
|
/// <para>This class implements the <see cref="IStorageDeviceOperator"/> interface, and all available operations are
|
||||||
/// listed in <see cref="GameCardManagerOperationIdValue"/>.</para>
|
/// listed in <see cref="GameCardManagerOperationIdValue"/>.</para>
|
||||||
/// <para>Based on nnSdk 15.3.0 (FS 15.0.0)</para></remarks>
|
/// <para>Based on nnSdk 16.2.0 (FS 16.0.0)</para></remarks>
|
||||||
public class GameCardManager : IStorageDeviceManager, IStorageDeviceOperator, IGameCardManager, IGameCardKeyManager
|
public class GameCardManager : IStorageDeviceManager, IStorageDeviceOperator, IGameCardManager, IGameCardKeyManager
|
||||||
{
|
{
|
||||||
private enum CardState
|
private enum CardState
|
||||||
|
|
|
@ -14,7 +14,7 @@ namespace LibHac.GcSrv;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Provides an <see cref="IStorage"/> interface for reading from the game card.
|
/// Provides an <see cref="IStorage"/> interface for reading from the game card.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>Based on nnSdk 15.3.0 (FS 15.0.0)</remarks>
|
/// <remarks>Based on nnSdk 16.2.0 (FS 16.0.0)</remarks>
|
||||||
internal class ReadOnlyGameCardStorage : IStorage
|
internal class ReadOnlyGameCardStorage : IStorage
|
||||||
{
|
{
|
||||||
private SharedRef<IGameCardManager> _deviceManager;
|
private SharedRef<IGameCardManager> _deviceManager;
|
||||||
|
@ -97,7 +97,7 @@ internal class ReadOnlyGameCardStorage : IStorage
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Provides an <see cref="IStorage"/> interface for writing to the game card.
|
/// Provides an <see cref="IStorage"/> interface for writing to the game card.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>Based on nnSdk 15.3.0 (FS 15.0.0)</remarks>
|
/// <remarks>Based on nnSdk 16.2.0 (FS 16.0.0)</remarks>
|
||||||
internal class WriteOnlyGameCardStorage : IStorage
|
internal class WriteOnlyGameCardStorage : IStorage
|
||||||
{
|
{
|
||||||
private SharedRef<IGameCardManager> _deviceManager;
|
private SharedRef<IGameCardManager> _deviceManager;
|
||||||
|
@ -168,7 +168,7 @@ internal class WriteOnlyGameCardStorage : IStorage
|
||||||
/// An adapter that directly translates <see cref="IStorageSf"/> sf calls to <see cref="IStorage"/> calls with no checks
|
/// An adapter that directly translates <see cref="IStorageSf"/> sf calls to <see cref="IStorage"/> calls with no checks
|
||||||
/// or validations.
|
/// or validations.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>Based on nnSdk 15.3.0 (FS 15.0.0)</remarks>
|
/// <remarks>Based on nnSdk 16.2.0 (FS 16.0.0)</remarks>
|
||||||
internal abstract class GameCardStorageInterfaceAdapter : IStorageSf
|
internal abstract class GameCardStorageInterfaceAdapter : IStorageSf
|
||||||
{
|
{
|
||||||
private SharedRef<IStorage> _baseStorage;
|
private SharedRef<IStorage> _baseStorage;
|
||||||
|
|
|
@ -13,7 +13,7 @@ namespace LibHac.GcSrv;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// An <see cref="IStorageDevice"/> that handles interacting with the currently inserted game card.
|
/// An <see cref="IStorageDevice"/> that handles interacting with the currently inserted game card.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>Based on nnSdk 15.3.0 (FS 15.0.0)</remarks>
|
/// <remarks>Based on nnSdk 16.2.0 (FS 16.0.0)</remarks>
|
||||||
internal class GameCardStorageDevice : GameCardStorageInterfaceAdapter, IStorageDevice
|
internal class GameCardStorageDevice : GameCardStorageInterfaceAdapter, IStorageDevice
|
||||||
{
|
{
|
||||||
private SharedRef<IGameCardManager> _manager;
|
private SharedRef<IGameCardManager> _manager;
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The operations that <see cref="GameCardManager"/> can perform on the game card ASIC and writable game cards.
|
/// The operations that <see cref="GameCardManager"/> can perform on the game card ASIC and writable game cards.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>Based on nnSdk 15.3.0 (FS 15.0.0)</remarks>
|
/// <remarks>Based on nnSdk 16.2.0 (FS 16.0.0)</remarks>
|
||||||
public enum GameCardManagerOperationIdValue
|
public enum GameCardManagerOperationIdValue
|
||||||
{
|
{
|
||||||
Finalize = 1,
|
Finalize = 1,
|
||||||
|
@ -25,7 +25,7 @@ public enum GameCardManagerOperationIdValue
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The operations that <see cref="GameCardDeviceOperator"/> can perform on the inserted game card.
|
/// The operations that <see cref="GameCardDeviceOperator"/> can perform on the inserted game card.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>Based on nnSdk 15.3.0 (FS 15.0.0)</remarks>
|
/// <remarks>Based on nnSdk 16.2.0 (FS 16.0.0)</remarks>
|
||||||
public enum GameCardOperationIdValue
|
public enum GameCardOperationIdValue
|
||||||
{
|
{
|
||||||
EraseGameCard = 1,
|
EraseGameCard = 1,
|
||||||
|
@ -40,7 +40,7 @@ public enum GameCardOperationIdValue
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Specifies which mode the game card storage should be opened as.
|
/// Specifies which mode the game card storage should be opened as.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>Based on nnSdk 15.3.0 (FS 15.0.0)</remarks>
|
/// <remarks>Based on nnSdk 16.2.0 (FS 16.0.0)</remarks>
|
||||||
public enum OpenGameCardAttribute : long
|
public enum OpenGameCardAttribute : long
|
||||||
{
|
{
|
||||||
ReadOnly = 0,
|
ReadOnly = 0,
|
||||||
|
|
|
@ -5,7 +5,7 @@ namespace LibHac.GcSrv;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Sets the certificate and key used for communicating with the game card ASIC.
|
/// Sets the certificate and key used for communicating with the game card ASIC.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>Based on nnSdk 15.3.0 (FS 15.0.0)</remarks>
|
/// <remarks>Based on nnSdk 16.2.0 (FS 16.0.0)</remarks>
|
||||||
public interface IGameCardKeyManager : IDisposable
|
public interface IGameCardKeyManager : IDisposable
|
||||||
{
|
{
|
||||||
void PresetInternalKeys(ReadOnlySpan<byte> gameCardKey, ReadOnlySpan<byte> gameCardCertificate);
|
void PresetInternalKeys(ReadOnlySpan<byte> gameCardKey, ReadOnlySpan<byte> gameCardCertificate);
|
||||||
|
|
|
@ -6,7 +6,7 @@ namespace LibHac.GcSrv;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Handles granting access to the game card, and keeps track of the current game card handle.
|
/// Handles granting access to the game card, and keeps track of the current game card handle.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>Based on nnSdk 15.3.0 (FS 15.0.0)</remarks>
|
/// <remarks>Based on nnSdk 16.2.0 (FS 16.0.0)</remarks>
|
||||||
internal interface IGameCardManager : IDisposable
|
internal interface IGameCardManager : IDisposable
|
||||||
{
|
{
|
||||||
Result AcquireReadLock(ref SharedLock<ReaderWriterLock> outLock, GameCardHandle handle);
|
Result AcquireReadLock(ref SharedLock<ReaderWriterLock> outLock, GameCardHandle handle);
|
||||||
|
|
|
@ -8,7 +8,7 @@ namespace LibHac.SdmmcSrv;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Manages locking and getting the storage from sdmmc devices.
|
/// Manages locking and getting the storage from sdmmc devices.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>Based on nnSdk 15.3.0 (FS 15.0.0)</remarks>
|
/// <remarks>Based on nnSdk 16.2.0 (FS 16.0.0)</remarks>
|
||||||
internal interface ISdmmcDeviceManager : IDisposable
|
internal interface ISdmmcDeviceManager : IDisposable
|
||||||
{
|
{
|
||||||
Result Lock(ref UniqueLockRef<SdkMutexType> outLock, SdmmcHandle handle);
|
Result Lock(ref UniqueLockRef<SdkMutexType> outLock, SdmmcHandle handle);
|
||||||
|
|
|
@ -16,7 +16,7 @@ namespace LibHac.SdmmcSrv;
|
||||||
/// Performs various operations on the internal MMC storage.
|
/// Performs various operations on the internal MMC storage.
|
||||||
/// All available operations are listed in <see cref="MmcOperationIdValue"/>.
|
/// All available operations are listed in <see cref="MmcOperationIdValue"/>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>Based on nnSdk 15.3.0 (FS 15.0.0)</remarks>
|
/// <remarks>Based on nnSdk 16.2.0 (FS 16.0.0)</remarks>
|
||||||
internal class MmcDeviceOperator : IStorageDeviceOperator
|
internal class MmcDeviceOperator : IStorageDeviceOperator
|
||||||
{
|
{
|
||||||
private SharedRef<MmcPartitionStorageDevice> _storageDevice;
|
private SharedRef<MmcPartitionStorageDevice> _storageDevice;
|
||||||
|
|
|
@ -16,7 +16,7 @@ namespace LibHac.SdmmcSrv;
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks><para>This class implements the <see cref="IStorageDeviceOperator"/> interface, and all available
|
/// <remarks><para>This class implements the <see cref="IStorageDeviceOperator"/> interface, and all available
|
||||||
/// operations are listed in <see cref="MmcManagerOperationIdValue"/>.</para>
|
/// operations are listed in <see cref="MmcManagerOperationIdValue"/>.</para>
|
||||||
/// <para>Based on nnSdk 15.3.0 (FS 15.0.0)</para></remarks>
|
/// <para>Based on nnSdk 16.2.0 (FS 16.0.0)</para></remarks>
|
||||||
internal class MmcManager : IStorageDeviceManager, IStorageDeviceOperator, ISdmmcDeviceManager
|
internal class MmcManager : IStorageDeviceManager, IStorageDeviceOperator, ISdmmcDeviceManager
|
||||||
{
|
{
|
||||||
private const SdmmcHandle MmcHandle = 1;
|
private const SdmmcHandle MmcHandle = 1;
|
||||||
|
|
|
@ -15,7 +15,7 @@ namespace LibHac.SdmmcSrv;
|
||||||
/// Provides base functionality for MMC <see cref="IStorageDevice"/> classes. Derived classes will need to provide
|
/// Provides base functionality for MMC <see cref="IStorageDevice"/> classes. Derived classes will need to provide
|
||||||
/// methods for reading/writing the MMC storage.
|
/// methods for reading/writing the MMC storage.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>Based on nnSdk 15.3.0 (FS 15.0.0)</remarks>
|
/// <remarks>Based on nnSdk 16.2.0 (FS 16.0.0)</remarks>
|
||||||
internal abstract class MmcPartitionStorageDevice : IDisposable
|
internal abstract class MmcPartitionStorageDevice : IDisposable
|
||||||
{
|
{
|
||||||
private SharedRef<ISdmmcDeviceManager> _manager;
|
private SharedRef<ISdmmcDeviceManager> _manager;
|
||||||
|
@ -95,7 +95,7 @@ internal abstract class MmcPartitionStorageDevice : IDisposable
|
||||||
/// and <see cref="MmcPartitionStorageDevice"/>. Because C# doesn't have multiple inheritance, we make a copy of the
|
/// and <see cref="MmcPartitionStorageDevice"/>. Because C# doesn't have multiple inheritance, we make a copy of the
|
||||||
/// <see cref="SdmmcStorageInterfaceAdapter"/> class that inherits from <see cref="MmcPartitionStorageDevice"/>.
|
/// <see cref="SdmmcStorageInterfaceAdapter"/> class that inherits from <see cref="MmcPartitionStorageDevice"/>.
|
||||||
/// This class must mirror any changes made to <see cref="SdmmcStorageInterfaceAdapter"/>.</para>
|
/// This class must mirror any changes made to <see cref="SdmmcStorageInterfaceAdapter"/>.</para>
|
||||||
/// <para>Based on nnSdk 15.3.0 (FS 15.0.0)</para></remarks>
|
/// <para>Based on nnSdk 16.2.0 (FS 16.0.0)</para></remarks>
|
||||||
internal abstract class MmcPartitionStorageDeviceInterfaceAdapter : MmcPartitionStorageDevice, IStorageDevice
|
internal abstract class MmcPartitionStorageDeviceInterfaceAdapter : MmcPartitionStorageDevice, IStorageDevice
|
||||||
{
|
{
|
||||||
private readonly IStorage _baseStorage;
|
private readonly IStorage _baseStorage;
|
||||||
|
@ -145,7 +145,7 @@ internal abstract class MmcPartitionStorageDeviceInterfaceAdapter : MmcPartition
|
||||||
/// An <see cref="IStorageDevice"/> that handles interacting with the <see cref="MmcPartition.UserData"/> partition
|
/// An <see cref="IStorageDevice"/> that handles interacting with the <see cref="MmcPartition.UserData"/> partition
|
||||||
/// on the internal MMC.
|
/// on the internal MMC.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>Based on nnSdk 15.3.0 (FS 15.0.0)</remarks>
|
/// <remarks>Based on nnSdk 16.2.0 (FS 16.0.0)</remarks>
|
||||||
internal class MmcUserDataPartitionStorageDevice : MmcPartitionStorageDeviceInterfaceAdapter
|
internal class MmcUserDataPartitionStorageDevice : MmcPartitionStorageDeviceInterfaceAdapter
|
||||||
{
|
{
|
||||||
private MmcUserDataPartitionStorageDevice(ref SharedRef<ISdmmcDeviceManager> manager, SdmmcHandle handle,
|
private MmcUserDataPartitionStorageDevice(ref SharedRef<ISdmmcDeviceManager> manager, SdmmcHandle handle,
|
||||||
|
@ -209,7 +209,7 @@ internal class MmcUserDataPartitionStorageDevice : MmcPartitionStorageDeviceInte
|
||||||
/// An <see cref="IStorageDevice"/> that handles interacting with the <see cref="MmcPartition.BootPartition1"/> and
|
/// An <see cref="IStorageDevice"/> that handles interacting with the <see cref="MmcPartition.BootPartition1"/> and
|
||||||
/// <see cref="MmcPartition.BootPartition2"/> partitions on the internal MMC.
|
/// <see cref="MmcPartition.BootPartition2"/> partitions on the internal MMC.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>Based on nnSdk 15.3.0 (FS 15.0.0)</remarks>
|
/// <remarks>Based on nnSdk 16.2.0 (FS 16.0.0)</remarks>
|
||||||
internal class MmcBootPartitionStorageDevice : MmcPartitionStorageDeviceInterfaceAdapter
|
internal class MmcBootPartitionStorageDevice : MmcPartitionStorageDeviceInterfaceAdapter
|
||||||
{
|
{
|
||||||
private MmcBootPartitionStorageDevice(Fs.MmcPartition partition, ref SharedRef<ISdmmcDeviceManager> manager,
|
private MmcBootPartitionStorageDevice(Fs.MmcPartition partition, ref SharedRef<ISdmmcDeviceManager> manager,
|
||||||
|
|
|
@ -21,7 +21,7 @@ namespace LibHac.SdmmcSrv;
|
||||||
/// Every 2 hours it will save the current state of the patrol read to Boot Partition 1 on the MMC.
|
/// Every 2 hours it will save the current state of the patrol read to Boot Partition 1 on the MMC.
|
||||||
/// This state contains the next sector index to be read and the number of times the MMC has been patrolled
|
/// This state contains the next sector index to be read and the number of times the MMC has been patrolled
|
||||||
/// from start to finish.</para>
|
/// from start to finish.</para>
|
||||||
/// <para>Based on nnSdk 15.3.0 (FS 15.0.0)</para></remarks>
|
/// <para>Based on nnSdk 16.2.0 (FS 16.0.0)</para></remarks>
|
||||||
internal class PatrolReader
|
internal class PatrolReader
|
||||||
{
|
{
|
||||||
// Note: This class won't work until events and timer events are properly implemented.
|
// Note: This class won't work until events and timer events are properly implemented.
|
||||||
|
|
|
@ -6,7 +6,7 @@ namespace LibHac.SdmmcSrv;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Registers an sdmmc detection callback when constructed, and unregisters the callback when disposed.
|
/// Registers an sdmmc detection callback when constructed, and unregisters the callback when disposed.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>Based on nnSdk 15.3.0 (FS 15.0.0)</remarks>
|
/// <remarks>Based on nnSdk 16.2.0 (FS 16.0.0)</remarks>
|
||||||
internal class SdCardDetectionEventManager : CardDeviceDetectionEventManager
|
internal class SdCardDetectionEventManager : CardDeviceDetectionEventManager
|
||||||
{
|
{
|
||||||
// LibHac addition
|
// LibHac addition
|
||||||
|
|
|
@ -13,7 +13,7 @@ namespace LibHac.SdmmcSrv;
|
||||||
/// Performs various operations on the inserted SD card.
|
/// Performs various operations on the inserted SD card.
|
||||||
/// All available operations are listed in <see cref="SdCardOperationIdValue"/>.
|
/// All available operations are listed in <see cref="SdCardOperationIdValue"/>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>Based on nnSdk 15.3.0 (FS 15.0.0)</remarks>
|
/// <remarks>Based on nnSdk 16.2.0 (FS 16.0.0)</remarks>
|
||||||
internal class SdCardDeviceOperator : IStorageDeviceOperator
|
internal class SdCardDeviceOperator : IStorageDeviceOperator
|
||||||
{
|
{
|
||||||
private SharedRef<SdCardStorageDevice> _storageDevice;
|
private SharedRef<SdCardStorageDevice> _storageDevice;
|
||||||
|
|
|
@ -18,7 +18,7 @@ namespace LibHac.SdmmcSrv;
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks><para>This class implements the <see cref="IStorageDeviceOperator"/> interface, and all available
|
/// <remarks><para>This class implements the <see cref="IStorageDeviceOperator"/> interface, and all available
|
||||||
/// operations are listed in <see cref="SdCardManagerOperationIdValue"/>.</para>
|
/// operations are listed in <see cref="SdCardManagerOperationIdValue"/>.</para>
|
||||||
/// <para>Based on nnSdk 15.3.0 (FS 15.0.0)</para></remarks>
|
/// <para>Based on nnSdk 16.2.0 (FS 16.0.0)</para></remarks>
|
||||||
public class SdCardManager : IStorageDeviceManager, IStorageDeviceOperator, ISdmmcDeviceManager
|
public class SdCardManager : IStorageDeviceManager, IStorageDeviceOperator, ISdmmcDeviceManager
|
||||||
{
|
{
|
||||||
private const SdmmcHandle InvalidHandle = 0;
|
private const SdmmcHandle InvalidHandle = 0;
|
||||||
|
|
|
@ -10,7 +10,7 @@ namespace LibHac.SdmmcSrv;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// An <see cref="IStorageDevice"/> that handles interacting with the currently inserted game card.
|
/// An <see cref="IStorageDevice"/> that handles interacting with the currently inserted game card.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>Based on nnSdk 15.3.0 (FS 15.0.0)</remarks>
|
/// <remarks>Based on nnSdk 16.2.0 (FS 16.0.0)</remarks>
|
||||||
internal class SdCardStorageDevice : SdmmcStorageInterfaceAdapter, IStorageDevice
|
internal class SdCardStorageDevice : SdmmcStorageInterfaceAdapter, IStorageDevice
|
||||||
{
|
{
|
||||||
private SharedRef<ISdmmcDeviceManager> _manager;
|
private SharedRef<ISdmmcDeviceManager> _manager;
|
||||||
|
|
|
@ -6,7 +6,7 @@ namespace LibHac.SdmmcSrv;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Contains functions to convert <see cref="ResultSdmmc"/> <see cref="Result"/>s to their <see cref="ResultFs"/> equivalent.
|
/// Contains functions to convert <see cref="ResultSdmmc"/> <see cref="Result"/>s to their <see cref="ResultFs"/> equivalent.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>Based on nnSdk 15.3.0 (FS 15.0.0)</remarks>
|
/// <remarks>Based on nnSdk 16.2.0 (FS 16.0.0)</remarks>
|
||||||
public static class SdmmcResultConverter
|
public static class SdmmcResultConverter
|
||||||
{
|
{
|
||||||
public static Result GetFsResult(Port port, Result result)
|
public static Result GetFsResult(Port port, Result result)
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The operations that <see cref="SdCardManager"/> can perform on the SD card device.
|
/// The operations that <see cref="SdCardManager"/> can perform on the SD card device.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>Based on nnSdk 15.3.0 (FS 15.0.0)</remarks>
|
/// <remarks>Based on nnSdk 16.2.0 (FS 16.0.0)</remarks>
|
||||||
public enum SdCardManagerOperationIdValue
|
public enum SdCardManagerOperationIdValue
|
||||||
{
|
{
|
||||||
GetAndClearErrorInfo = 1,
|
GetAndClearErrorInfo = 1,
|
||||||
|
@ -15,7 +15,7 @@ public enum SdCardManagerOperationIdValue
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The operations that <see cref="SdCardDeviceOperator"/> can perform on the inserted SD card.
|
/// The operations that <see cref="SdCardDeviceOperator"/> can perform on the inserted SD card.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>Based on nnSdk 15.3.0 (FS 15.0.0)</remarks>
|
/// <remarks>Based on nnSdk 16.2.0 (FS 16.0.0)</remarks>
|
||||||
public enum SdCardOperationIdValue
|
public enum SdCardOperationIdValue
|
||||||
{
|
{
|
||||||
GetSpeedMode = 1,
|
GetSpeedMode = 1,
|
||||||
|
@ -29,7 +29,7 @@ public enum SdCardOperationIdValue
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The operations that <see cref="MmcManager"/> can perform on the internal MMC device.
|
/// The operations that <see cref="MmcManager"/> can perform on the internal MMC device.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>Based on nnSdk 15.3.0 (FS 15.0.0)</remarks>
|
/// <remarks>Based on nnSdk 16.2.0 (FS 16.0.0)</remarks>
|
||||||
public enum MmcManagerOperationIdValue
|
public enum MmcManagerOperationIdValue
|
||||||
{
|
{
|
||||||
GetAndClearErrorInfo = 1,
|
GetAndClearErrorInfo = 1,
|
||||||
|
@ -44,7 +44,7 @@ public enum MmcManagerOperationIdValue
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The operations that <see cref="MmcDeviceOperator"/> can perform on the internal MMC storage.
|
/// The operations that <see cref="MmcDeviceOperator"/> can perform on the internal MMC storage.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>Based on nnSdk 15.3.0 (FS 15.0.0)</remarks>
|
/// <remarks>Based on nnSdk 16.2.0 (FS 16.0.0)</remarks>
|
||||||
public enum MmcOperationIdValue
|
public enum MmcOperationIdValue
|
||||||
{
|
{
|
||||||
GetSpeedMode = 1,
|
GetSpeedMode = 1,
|
||||||
|
|
|
@ -18,7 +18,7 @@ namespace LibHac.SdmmcSrv;
|
||||||
/// Provides an <see cref="IStorage"/> interface for calling the sdmmc Read and Write functions.
|
/// Provides an <see cref="IStorage"/> interface for calling the sdmmc Read and Write functions.
|
||||||
/// The offset and size of reads and writes must be aligned to 0x200 bytes (<see cref="SdmmcApi.SectorSize"/>).
|
/// The offset and size of reads and writes must be aligned to 0x200 bytes (<see cref="SdmmcApi.SectorSize"/>).
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>Based on nnSdk 15.3.0 (FS 15.0.0)</remarks>
|
/// <remarks>Based on nnSdk 16.2.0 (FS 16.0.0)</remarks>
|
||||||
internal class SdmmcStorage : IStorage
|
internal class SdmmcStorage : IStorage
|
||||||
{
|
{
|
||||||
private Port _port;
|
private Port _port;
|
||||||
|
@ -151,7 +151,7 @@ internal class SdmmcStorage : IStorage
|
||||||
/// An adapter that directly translates <see cref="IStorageSf"/> sf calls to <see cref="IStorage"/> calls with no checks
|
/// An adapter that directly translates <see cref="IStorageSf"/> sf calls to <see cref="IStorage"/> calls with no checks
|
||||||
/// or validations.
|
/// or validations.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>Based on nnSdk 15.3.0 (FS 15.0.0)</remarks>
|
/// <remarks>Based on nnSdk 16.2.0 (FS 16.0.0)</remarks>
|
||||||
internal class SdmmcStorageInterfaceAdapter : IStorageSf
|
internal class SdmmcStorageInterfaceAdapter : IStorageSf
|
||||||
{
|
{
|
||||||
private IStorage _baseStorage;
|
private IStorage _baseStorage;
|
||||||
|
|
Loading…
Reference in a new issue