RAMDisk example for the USBFileSystem

Dependencies:   mbed USBFileSystem

Fork of USBFileSystem_RAMDISK_HelloWorld by Erik -

main.cpp

Committer:
Sissors
Date:
2013-07-30
Revision:
1:e1b0157ce547
Parent:
0:fc0ff7c1656b
Child:
2:1c8a3c4ba703

File content as of revision 1:e1b0157ce547:

#include "mbed.h"
#include "USBMSD_Ram.h"

USBMSD_Ram sd;
DigitalOut led(LED_GREEN);
Serial pc(USBTX, USBRX);

int main() {
    pc.baud(115200);
    while(1) {
        led = 1;
        printf("Connecting!\n");
        if (!sd.connect())
            error("Failed to connect!\n");
        wait(5);
        led = 0;
        printf("Disconnecting!\n");
        sd.disconnect();
        wait(2);
        }
}