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

Some fundamental questions regarding the USB HID example

Hi there!
I'm still trying to get around USB HID communication. To that end I've added Keil's HIB example to my project (some LPC2478). Since it's lacking the buttons and LEDs that the example is expecting, I've slightly modified the user interface: the data provided by my device is the RTC's seconds, while the data sent to the device gets output to the LCD. Now everything is fine, data gets transferred to the PC every 32ms (as specified by the descriptor).

My general questions are:
1. In terms of the example project, do I work in usbuser.c or hiduser.c? I've commented out HID_GetReport and HID_SetReport, and still my device works. So obviously what's being called is USB_EndPoint1. Why is it that I have to declare my device an HID, and in the end the HID stuff doesn't even execute?
2. The USB Set Configuration Request is issued once, during enumeration, isn't it?
3. After reading a lot of Tsuneo's posts, I think there's two different ways that I can transfer data to/from the device: either via the control endpoint, or via the endpoints specified in my descriptor. So why do I even go through the trouble of defining my own endpoints?
5. How does "one interrupt-type data transfer" proceed? I think, it's something like: - the PC sends an InReport to the device, causing a USB_EVT_OUT there which leads to the execution of USB_EndPoint1. - Now by some magic, USB_EndPoint1 is called again with an argument of USB_EVT_IN. Is this somehow similar to reality?

Any answers would be greatly appreciated. I'm struggling with Axelson's USB Complete, with lots of forum threads (thanks, Tsuneo), but can't yet get a grip on this whole USB business.

Kind regards,
Peter