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: mbed-rtos mbed wolfSSL
Fork of sd_duplicator by
Diff: main.cpp
- Revision:
- 0:b453be3137c7
- Child:
- 1:7827a11dc627
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Tue Nov 15 13:04:32 2016 +0000
@@ -0,0 +1,24 @@
+#include "mbed.h"
+#include "SDFileSystem.h"
+
+SDFileSystem original(p5, p6, p7, p22, "original");
+SDFileSystem duplicate(p11, p12, p13, p21, "duplicate");
+
+DigitalOut myled(LED1);
+
+int main() {
+ printf("Hello World!\n");
+
+ FILE *fp = fopen("/original/fun.txt", "r");
+ if(fp == NULL) {
+ error("Could not open file for read.\n");
+ }
+ int c;
+ while((c = fgetc(fp)) != EOF){
+ putchar(c);
+ }
+ fclose(fp);
+
+ printf("Goodbye World!\n");
+
+}
