This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Host driver for HID device

Hi I want to interface to a HID USB device. I had thought that I could use the Standard HID driver within the RL-USB library, but it seems that my device does not work with this as the usb_hid_status() returns 0 even when the device is plugged into the board (I am using the MCB1700 Keil demo board btw).

Obviously I need to write a new driver to handle this, I have studied the documentation, such as it is, and it seems I need to provide a new USBH_DCD structure:

USBH_DCD usbh_dcd_cls = { DEVICE_CLASS_ID, Config, UnConfig, Init, UnInit, GetLastError
};

However there is no real documentation I have found that shows how I should construct these functions within this structure.

Is there a template or example code showing this? The existing code for the HID keyboard would be a great place to start, but this does not seem to be included in source form with the latest version of the library.

I have used USBView to see the make up of the device I want to use, and can post hat if it would help.