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

USBKeyboardMouse/USBKeyboard.h

Committer:
llumpu
Date:
2011-09-08
Revision:
0:f97b1f255167

File content as of revision 0:f97b1f255167:

#include "usbhid.h"

#ifndef MBED_USBKEYBOARD_H
#define MBED_USBKEYBOARD_H

/* Class: USBKeyboard
 * Emulate a USB Keyboard HID device
 *
 * Example:
 * > #include "mbed.h"
 * > #include "USBKeyboard.h"
 * > 
 * > USBKeyboard kb;
 * >
 * > int main() {
 * >     while(1) {
 * >         kb.sendKeys("Foo goes here!");
 * >         wait(2);
 * >     }
 * > }
 */
class USBKeyboard : private usbhid {
public:
    /* Constructor: USBKeyboard
     * Create a USB Keyboard using the mbed USB Device interface
     */
    USBKeyboard();

    void sendKeys(char *szString);
    void sendKey(char c);
    

private:

};

#endif