Samuel Mokrani
/
USBHID_HelloWorld
USBHID Hello World
Diff: main.cpp
- Revision:
- 3:8f52e961548d
- Parent:
- 2:d07a799c6926
- Child:
- 5:b1d34990a376
diff -r d07a799c6926 -r 8f52e961548d main.cpp --- a/main.cpp Thu Nov 03 12:30:56 2011 +0000 +++ b/main.cpp Fri Nov 11 12:15:20 2011 +0000 @@ -1,21 +1,21 @@ -#include "mbed.h" -#include "USBHID.h" - -//We declare a USBHID device -USBHID hid; - -//This report will contain data to be sent -HID_REPORT send_report; - -int main(void) { - //Fill the report - for(int i = 0; i < 64; i++) - send_report.data[i] = i; - send_report.length = 64; - - while (1) { - //Send the report - hid.send(&send_report); - wait(0.01); - } -} +#include "mbed.h" +#include "USBHID.h" + +//We declare a USBHID device +USBHID hid; + +//This report will contain data to be sent +HID_REPORT send_report; + +int main(void) { + //Fill the report + for(int i = 0; i < 64; i++) + send_report.data[i] = i; + send_report.length = 64; + + while (1) { + //Send the report + hid.send(&send_report); + wait(0.1); + } +} \ No newline at end of file