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.
Fork of USBDevice by
Revision 42:7e7597ba0fac, committed 2015-02-16
- Comitter:
- modtronix
- Date:
- Mon Feb 16 02:10:27 2015 +0000
- Parent:
- 41:0ca6eeb54b97
- Commit message:
- USBDevice library with modifications required to work with Semtech GUI App for SX1276.
Changed in this revision
| USBHID/USBHID.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/USBHID/USBHID.cpp Mon Feb 09 09:15:46 2015 +0000
+++ b/USBHID/USBHID.cpp Mon Feb 16 02:10:27 2015 +0000
@@ -186,17 +186,28 @@
return stringIinterfaceDescriptor;
}
+//MODTRONIX - had to change following function as mentioned by program description:
+//See http://mbed.org/users/dudmuck/code/hid_test/
+//The pre-existing PC GUI checks for product device name of USB device to match a specific string of text.
+//After you import this program, you will have your own private copy of USB HID driver.
+//Edit the file USBDevice -> USBHID -> USBHID.cpp:
+//uint8_t * USBHID::stringIproductDesc() {
+// static uint8_t stringIproductDescriptor[] = {
+// 0x16, //bLength
+// STRING_DESCRIPTOR, //bDescriptorType 0x03
+// 'H',0,'I',0,'D',0,' ',0,'D',0,'E',0,'V',0,'I',0,'C',0,'E',0 //bString iProduct - HID device
+// };
+// return stringIproductDescriptor;
+//}
uint8_t * USBHID::stringIproductDesc() {
static uint8_t stringIproductDescriptor[] = {
- 0x16, //bLength
+ 0x18, //bLength
STRING_DESCRIPTOR, //bDescriptorType 0x03
- 'H',0,'I',0,'D',0,' ',0,'D',0,'E',0,'V',0,'I',0,'C',0,'E',0 //bString iProduct - HID device
+ 'S',0,'X',0,'1',0,'2',0,'x',0,'x',0,'E',0,'i',0,'g',0,'e',0,'r',0 //bString iProduct - HID device
};
return stringIproductDescriptor;
}
-
-
uint8_t * USBHID::reportDesc() {
static uint8_t reportDescriptor[] = {
0x06, LSB(0xFFAB), MSB(0xFFAB),
