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: USBDevice USBMSD_SD mbed
Fork of USBMSD_SD_HelloWorld_Mbed by
main.cpp@10:cf8fd2b6ca23, 2011-11-16 (annotated)
- Committer:
- samux
- Date:
- Wed Nov 16 11:06:27 2011 +0000
- Revision:
- 10:cf8fd2b6ca23
- Parent:
- 9:9c343b9ee6d8
- Child:
- 11:a26e7b7a1221
YES!!!!!!!!!!!!!!!!!! msd with sd card and hid generic device works
Who changed what in which revision?
| User | Revision | Line number | New 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 |
10:cf8fd2b6ca23 | 10 | //Fill the report |
| samux |
10:cf8fd2b6ca23 | 11 | for(int i = 0; i < 64; i++) |
| samux |
10:cf8fd2b6ca23 | 12 | send_report.data[i] = i; |
| samux |
10:cf8fd2b6ca23 | 13 | send_report.length = 64; |
| samux |
10:cf8fd2b6ca23 | 14 | |
| samux |
10:cf8fd2b6ca23 | 15 | while (1) { |
| samux |
10:cf8fd2b6ca23 | 16 | //Send the report |
| samux |
10:cf8fd2b6ca23 | 17 | sd.send(&send_report); |
| samux |
10:cf8fd2b6ca23 | 18 | wait(0.1); |
| samux |
10:cf8fd2b6ca23 | 19 | } |
| samux |
9:9c343b9ee6d8 | 20 | } |
