Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of SDFileSystem by
Revision 4:a525bb4acb05, committed 2015-02-05
- Comitter:
- vtraveller
- Date:
- Thu Feb 05 12:38:14 2015 +0000
- Parent:
- 3:7b35d1709458
- Commit message:
- Added pull up pin assignments
Changed in this revision
diff -r 7b35d1709458 -r a525bb4acb05 FATFileSystem.lib --- a/FATFileSystem.lib Mon Mar 17 14:34:01 2014 +0000 +++ b/FATFileSystem.lib Thu Feb 05 12:38:14 2015 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/mbed_official/code/FATFileSystem/#e960e2b81a3c +http://mbed.org/users/mbed_official/code/FATFileSystem/#3ff2606d5713
diff -r 7b35d1709458 -r a525bb4acb05 SDFileSystem.cpp
--- a/SDFileSystem.cpp Mon Mar 17 14:34:01 2014 +0000
+++ b/SDFileSystem.cpp Thu Feb 05 12:38:14 2015 +0000
@@ -122,6 +122,8 @@
SDFileSystem::SDFileSystem(PinName mosi, PinName miso, PinName sclk, PinName cs, const char* name) :
FATFileSystem(name), _spi(mosi, miso, sclk), _cs(cs) {
+ _cs.mode(PullUp);
+ _cs.output();
_cs = 1;
}
@@ -142,6 +144,9 @@
int SDFileSystem::initialise_card() {
// Set to 100kHz for initialisation, and clock card with cs = 1
_spi.frequency(100000);
+
+ _cs.mode(PullUp);
+ _cs.output();
_cs = 1;
for (int i = 0; i < 16; i++) {
_spi.write(0xFF);
diff -r 7b35d1709458 -r a525bb4acb05 SDFileSystem.h
--- a/SDFileSystem.h Mon Mar 17 14:34:01 2014 +0000
+++ b/SDFileSystem.h Thu Feb 05 12:38:14 2015 +0000
@@ -77,7 +77,7 @@
uint64_t _sectors;
SPI _spi;
- DigitalOut _cs;
+ DigitalInOut _cs;
int cdv;
};
