Table of Contents

Class SDCard

Namespace
nanoFramework.System.IO.FileSystem
Assembly
System.IO.FileSystem.dll

Class to allow a SD memory card to be configured and mounted on the system.

public class SDCard : IDisposable
Inheritance
SDCard
Implements
Inherited Members
Extension Methods

Constructors

SDCard()

Creates an instance of SDcard where parameters have already been defined in firmware.

public SDCard()

SDCard(SDCardMmcParameters)

Create an instance of SDCard for a MMC connected SD card.

public SDCard(SDCard.SDCardMmcParameters parameters)

Parameters

parameters SDCard.SDCardMmcParameters

Connection parameters

SDCard(SDCardSpiParameters)

Create an instance of SDCard for a SPI connected SD card.

public SDCard(SDCard.SDCardSpiParameters parameters)

Parameters

parameters SDCard.SDCardSpiParameters

Connection parameters

Properties

CardDetectEnabled

Return true if Card detection is enabled

public bool CardDetectEnabled { get; }

Property Value

bool

CardType

Type of interface used by SDCard.

public SDCard.SDInterfaceType CardType { get; }

Property Value

SDCard.SDInterfaceType

IsCardDetected

Indicates if SD card has been detected if optional cardDetectPin parameter is enabled with a valid GPIO pin. If not enabled will always return false.

public bool IsCardDetected { get; }

Property Value

bool

Remarks

Not all SD Card modules have a card detect pin or the pin connected to a GPIO pin.

IsMounted

Indicates if the SD card has been mounted

public bool IsMounted { get; }

Property Value

bool

MmcParameters

The parameters for a MMC connected SD card.

public SDCard.SDCardMmcParameters MmcParameters { get; }

Property Value

SDCard.SDCardMmcParameters

SpiParameters

The parameters for a SPI connected SD card.

public SDCard.SDCardSpiParameters SpiParameters { get; }

Property Value

SDCard.SDCardSpiParameters

Methods

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()

Finalize()

protected override void Finalize()

Mount()

Mount the SD memory card device

public void Mount()

Remarks

This will try to mount the SD memory card on the specified interface. If the Card is not present or the card is unable to be read then an exception will be thrown.

Unmount()

Unmount a mounted SD memory card.

public void Unmount()