Based on USBKeyboardMouse example. I added USB String Descriptor so mbed reports itself to host not only with VID & PID but also with name of manufacturer, product name, serial number, configuration number and interface name. These can be changed to matching Yours in USBhid.cpp file on lines 88 - 122.

Dependencies:   mbed

Committer:
llumpu
Date:
Thu Sep 08 15:01:33 2011 +0000
Revision:
0:f97b1f255167
Added USB String Descriptor

Who changed what in which revision?

UserRevisionLine numberNew contents of line
llumpu 0:f97b1f255167 1 #include "usbhid.h"
llumpu 0:f97b1f255167 2
llumpu 0:f97b1f255167 3 #ifndef MBED_USBKEYBOARD_H
llumpu 0:f97b1f255167 4 #define MBED_USBKEYBOARD_H
llumpu 0:f97b1f255167 5
llumpu 0:f97b1f255167 6 /* Class: USBKeyboard
llumpu 0:f97b1f255167 7 * Emulate a USB Keyboard HID device
llumpu 0:f97b1f255167 8 *
llumpu 0:f97b1f255167 9 * Example:
llumpu 0:f97b1f255167 10 * > #include "mbed.h"
llumpu 0:f97b1f255167 11 * > #include "USBKeyboard.h"
llumpu 0:f97b1f255167 12 * >
llumpu 0:f97b1f255167 13 * > USBKeyboard kb;
llumpu 0:f97b1f255167 14 * >
llumpu 0:f97b1f255167 15 * > int main() {
llumpu 0:f97b1f255167 16 * > while(1) {
llumpu 0:f97b1f255167 17 * > kb.sendKeys("Foo goes here!");
llumpu 0:f97b1f255167 18 * > wait(2);
llumpu 0:f97b1f255167 19 * > }
llumpu 0:f97b1f255167 20 * > }
llumpu 0:f97b1f255167 21 */
llumpu 0:f97b1f255167 22 class USBKeyboard : private usbhid {
llumpu 0:f97b1f255167 23 public:
llumpu 0:f97b1f255167 24 /* Constructor: USBKeyboard
llumpu 0:f97b1f255167 25 * Create a USB Keyboard using the mbed USB Device interface
llumpu 0:f97b1f255167 26 */
llumpu 0:f97b1f255167 27 USBKeyboard();
llumpu 0:f97b1f255167 28
llumpu 0:f97b1f255167 29 void sendKeys(char *szString);
llumpu 0:f97b1f255167 30 void sendKey(char c);
llumpu 0:f97b1f255167 31
llumpu 0:f97b1f255167 32
llumpu 0:f97b1f255167 33 private:
llumpu 0:f97b1f255167 34
llumpu 0:f97b1f255167 35 };
llumpu 0:f97b1f255167 36
llumpu 0:f97b1f255167 37 #endif