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
main.cpp
- Committer:
- tmasrat
- Date:
- 2016-11-15
- Revision:
- 0:b453be3137c7
- Child:
- 1:7827a11dc627
File content as of revision 0:b453be3137c7:
#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");
}
