Luth Haroon / SD_modified
Embed: (wiki syntax)

« Back to documentation index

USBMSD_SD Class Reference

USBMSD_SD Class Reference

Use the SDcard as mass storage device using the USBMSD class. More...

#include <USBMSD_SD.h>

Inherits USBMSD.

Public Member Functions

 USBMSD_SD (PinName mosi, PinName miso, PinName sclk, PinName cs, PinName ncardpresent, PinName activity, PinName test)
 Create the File System for accessing an SD Card using SPI.
bool connect ()
 Connect the USB MSD device.

Detailed Description

Use the SDcard as mass storage device using the USBMSD class.

 #include "mbed.h"
 #include "USBMSD_SD.h"

 USBMSD_SD sd(p5, p6, p7, p8);

 int main() {
   while(1);
 }

Definition at line 46 of file USBMSD_SD.h.


Constructor & Destructor Documentation

USBMSD_SD ( PinName  mosi,
PinName  miso,
PinName  sclk,
PinName  cs,
PinName  ncardpresent,
PinName  activity,
PinName  test 
)

Create the File System for accessing an SD Card using SPI.

Parameters:
mosiSPI mosi pin connected to SD Card
misoSPI miso pin conencted to SD Card
sclkSPI sclk pin connected to SD Card
csDigitalOut pin used as SD Card chip select
nameThe name used to access the virtual filesystem

Definition at line 130 of file USBMSD_SD.cpp.


Member Function Documentation

bool connect ( void   ) [inherited]

Connect the USB MSD device.

Establish disk initialization before really connect the device.

Returns:
true if successful

Definition at line 99 of file USBMSD.cpp.