Fork of the SD file system library from simon. Changed constructor allows to inject the SPI handler in order to reuse it.

Fork of SDFileSystem by Simon Ford

Revision:
4:498b360ea482
Parent:
0:b1ddfc9a9b25
diff -r 93796e8ed42f -r 498b360ea482 SDFileSystem.h
--- a/SDFileSystem.h	Sun Mar 02 12:44:07 2014 +0000
+++ b/SDFileSystem.h	Sun Mar 02 18:14:50 2014 +0000
@@ -51,7 +51,7 @@
      * @param cs   DigitalOut pin used as SD Card chip select
      * @param name The name used to access the virtual filesystem
      */
-    SDFileSystem(PinName mosi, PinName miso, PinName sclk, PinName cs, const char* name);
+    SDFileSystem(SPI* spiHandler, PinName cs, const char* name);
     virtual int disk_initialize();
     virtual int disk_write(const char *buffer, int block_number);
     virtual int disk_read(char *buffer, int block_number);    
@@ -74,7 +74,7 @@
     int _sd_sectors();
     int _sectors;
     
-    SPI _spi;
+    SPI* _spi;
     DigitalOut _cs;     
 };