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.
Dependencies: EthernetInterface SDFileSystem mbed-rtos mbed
main.cpp@0:1649f66cf32a, 2016-12-03 (annotated)
- Committer:
- micbio
- Date:
- Sat Dec 03 23:49:02 2016 +0000
- Revision:
- 0:1649f66cf32a
- Child:
- 1:58d2021e301d
my card init
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
micbio | 0:1649f66cf32a | 1 | #include "mbed.h" |
micbio | 0:1649f66cf32a | 2 | #include "SDFileSystem.h" |
micbio | 0:1649f66cf32a | 3 | |
micbio | 0:1649f66cf32a | 4 | SDFileSystem sd(p11, p12, p13, p10, "sd"); |
micbio | 0:1649f66cf32a | 5 | |
micbio | 0:1649f66cf32a | 6 | int main() { |
micbio | 0:1649f66cf32a | 7 | while(1) { |
micbio | 0:1649f66cf32a | 8 | FILE *fp = fopen("/sd/testfile.txt", "a"); |
micbio | 0:1649f66cf32a | 9 | fprintf(fp, "hello world!\n"); |
micbio | 0:1649f66cf32a | 10 | fclose(fp); |
micbio | 0:1649f66cf32a | 11 | wait(1); |
micbio | 0:1649f66cf32a | 12 | } |
micbio | 0:1649f66cf32a | 13 | } |