Joost Tromp
/
SDHCFileSystem
main.cpp@0:aa9931e79e3f, 2011-06-17 (annotated)
- Committer:
- joosttromp
- Date:
- Fri Jun 17 11:30:43 2011 +0000
- Revision:
- 0:aa9931e79e3f
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
joosttromp | 0:aa9931e79e3f | 1 | #include "mbed.h" |
joosttromp | 0:aa9931e79e3f | 2 | #include "SDHCFileSystem.h" |
joosttromp | 0:aa9931e79e3f | 3 | |
joosttromp | 0:aa9931e79e3f | 4 | SDFileSystem sd(p5, p6, p7, p8, "sd"); // mosi, miso, sclk, cs |
joosttromp | 0:aa9931e79e3f | 5 | |
joosttromp | 0:aa9931e79e3f | 6 | int main() { |
joosttromp | 0:aa9931e79e3f | 7 | FILE *fp = fopen("/sd/myfile.txt", "w"); |
joosttromp | 0:aa9931e79e3f | 8 | fprintf(fp, "\n\rHello World!\n\r"); |
joosttromp | 0:aa9931e79e3f | 9 | fclose(fp); |
joosttromp | 0:aa9931e79e3f | 10 | } |