USBMSD SD card Hello World for Mbed platforms

Dependencies:   mbed USBMSD_SD USBDevice

main.cpp

Committer:
samux
Date:
2011-11-16
Revision:
11:a26e7b7a1221
Parent:
10:cf8fd2b6ca23
Child:
12:a12eb1fc05f3

File content as of revision 11:a26e7b7a1221:

#include "mbed.h"
#include "SDFileSystem.h"

SDFileSystem sd(p5, p6, p7, p8, "sd");

//This report will contain data to be sent
HID_REPORT send_report;

int main() {

    while (1) {
        //Fill the report
        for (int i = 0; i < 64; i++)
            send_report.data[i] = rand() % 100;
        send_report.length = 64;
        
        //Send the report
        sd.send(&send_report);
        wait(2);
    }
}