Oscar de Jesus Vasquez
/
USBHID_TestCase_LV
-----
Fork of USBHID_TestCase by
Revision 1:07d521565fd7, committed 2011-11-18
- Comitter:
- samux
- Date:
- Fri Nov 18 09:34:41 2011 +0000
- Parent:
- 0:53dfbb3eae55
- Child:
- 2:1db77338562f
- Commit message:
Changed in this revision
USBDevice.lib | Show annotated file Show diff for this revision Revisions of this file |
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/USBDevice.lib Thu Nov 17 11:29:46 2011 +0000 +++ b/USBDevice.lib Fri Nov 18 09:34:41 2011 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/samux/code/USBDevice/#98311370c1eb +http://mbed.org/users/samux/code/USBDevice/#ef8c6751b185
--- a/main.cpp Thu Nov 17 11:29:46 2011 +0000 +++ b/main.cpp Fri Nov 18 09:34:41 2011 +0000 @@ -1,8 +1,8 @@ #include "mbed.h" #include "USBHID.h" -//We declare a USBHID device. By default input and output reports are 64 bytes long. -USBHID hid; +//We declare a USBHID device. Input out output reports have a length of 8 bytes +USBHID hid(8, 8); //This report will contain data to be sent HID_REPORT send_report; @@ -11,7 +11,7 @@ Serial pc(USBTX, USBRX); int main(void) { - send_report.length = 64; + send_report.length = 8; while (1) { //Fill the report @@ -24,6 +24,7 @@ //try to read a msg if(hid.readNB(&recv_report)) { + pc.printf("recv: "); for(int i = 0; i < recv_report.length; i++) { pc.printf("%d ", recv_report.data[i]); }