Skip to main content

IStorageControllerProvider Interface

Namespace: GHIElectronics.TinyCLR.Devices.Storage.Provider · Assembly: GHIElectronics.TinyCLR.Devices.Storage

Provider contract for a block-storage controller.

public interface IStorageControllerProvider : IDisposable

Properties

Descriptor

StorageDescriptor Descriptor { get; }

Media geometry and capabilities.

Methods

Open()

void Open()

Powers on and initializes the media.

Close()

void Close()

Powers off the media.

Read(long address, int count, byte[] buffer, int offset, TimeSpan timeout)

int Read(long address, int count, byte[] buffer, int offset, TimeSpan timeout)

Reads count bytes from address into buffer+offset.

ParameterTypeDescription
addresslong
countint
bufferbyte[]
offsetint
timeoutTimeSpan

Returns int

Write(long address, int count, byte[] buffer, int offset, TimeSpan timeout)

int Write(long address, int count, byte[] buffer, int offset, TimeSpan timeout)

Writes count bytes from buffer+offset to address.

ParameterTypeDescription
addresslong
countint
bufferbyte[]
offsetint
timeoutTimeSpan

Returns int

Erase(long address, int count, TimeSpan timeout)

int Erase(long address, int count, TimeSpan timeout)

Erases count sectors starting at address.

ParameterTypeDescription
addresslong
countint
timeoutTimeSpan

Returns int

IsErased(long address, int count)

bool IsErased(long address, int count)

True when the addressed span is in its erased (all-0xFF) state.

ParameterTypeDescription
addresslong
countint

Returns bool

EraseAll(TimeSpan timeout)

void EraseAll(TimeSpan timeout)

Erases every sector on the media.

ParameterTypeDescription
timeoutTimeSpan