MassStorage Class
Namespace: GHIElectronics.TinyCLR.Devices.UsbClient · Assembly: GHIElectronics.TinyCLR.Devices.UsbClient
This device emulates a mass storage. Your Micro Framework device will appear as a virtual mass storage device similar to a USB Drive. This works by exposing the storage connected to this device, such as SD card or USB sticks, to the host.
public class MassStorage : RawDevice
Constructors
MassStorage(UsbClientController usbClientController)
public MassStorage(UsbClientController usbClientController) : this(usbClientController, new UsbClientSetting()
Creates a new mass storage with default parameters.
| Parameter | Type | Description |
|---|---|---|
usbClientController | UsbClientController |
MassStorage(UsbClientController usbClientController, UsbClientSetting usbClientSetting)
public MassStorage(UsbClientController usbClientController, UsbClientSetting usbClientSetting) : base(usbClientController, usbClientSetting)
Creates a new mass storage.
| Parameter | Type | Description |
|---|---|---|
usbClientController | UsbClientController | USBClient controller. |
usbClientSetting | UsbClientSetting | USBClient setting. |
Properties
MaximumSupportedLogicalUnits
public static int MaximumSupportedLogicalUnits { get; }
The maximum number of logical units that any mass storage can support.
LogicalUnitCount
public int LogicalUnitCount { get; }
The number of logical units assocaited with this mass storage.
Methods
AttachLogicalUnit(IntPtr storage)
public void AttachLogicalUnit(IntPtr storage)
Attaches a removable storage device.
| Parameter | Type | Description |
|---|---|---|
storage | IntPtr | The storage device (hdc )to attach. |
RemoveLogicalUnit(IntPtr storage)
public void RemoveLogicalUnit(IntPtr storage)
Remove a removable storage device.
| Parameter | Type | Description |
|---|---|---|
storage | IntPtr | The storage device (hdc )to attach. |
Enable()
public override void Enable()
Enable a removable storage device.
Disable()
public override void Disable()
Disable a removable storage device.