USBMSD SD card Hello World for Mbed platforms

Dependencies:   mbed USBMSD_SD USBDevice

Committer:
samux
Date:
Wed Nov 16 17:17:42 2011 +0000
Revision:
11:a26e7b7a1221
Parent:
10:cf8fd2b6ca23
Child:
12:a12eb1fc05f3
GOOD COMMIT: msd and hid work even on MAC...

Who changed what in which revision?

UserRevisionLine numberNew contents of line
samux 2:27a7e7f8d399 1 #include "mbed.h"
samux 7:6494da2a5c60 2 #include "SDFileSystem.h"
samux 2:27a7e7f8d399 3
samux 8:534fd41d8cc7 4 SDFileSystem sd(p5, p6, p7, p8, "sd");
samux 2:27a7e7f8d399 5
samux 10:cf8fd2b6ca23 6 //This report will contain data to be sent
samux 10:cf8fd2b6ca23 7 HID_REPORT send_report;
samux 10:cf8fd2b6ca23 8
samux 2:27a7e7f8d399 9 int main() {
samux 11:a26e7b7a1221 10
samux 10:cf8fd2b6ca23 11 while (1) {
samux 11:a26e7b7a1221 12 //Fill the report
samux 11:a26e7b7a1221 13 for (int i = 0; i < 64; i++)
samux 11:a26e7b7a1221 14 send_report.data[i] = rand() % 100;
samux 11:a26e7b7a1221 15 send_report.length = 64;
samux 11:a26e7b7a1221 16
samux 10:cf8fd2b6ca23 17 //Send the report
samux 10:cf8fd2b6ca23 18 sd.send(&send_report);
samux 11:a26e7b7a1221 19 wait(2);
samux 10:cf8fd2b6ca23 20 }
samux 9:9c343b9ee6d8 21 }