| Author |
Message |
|
|
Posted: Jun 12, 2012 - 11:15 PM |
|

Joined: Jun 12, 2012
Posts: 4
|
|
We have been looking to this two demos within LUFA project and were trying to figure out the advantages of each one.
Apparently, due to the TXT explainig each demo, the only difference is that KeyboardMouse demo is boot protocol compatible. Am I right? Is there any other difference between them?
Thanks |
|
|
| |
|
|
|
|
|
Posted: Jun 13, 2012 - 09:52 AM |
|


Joined: Jan 23, 2004
Posts: 9894
Location: Trondheim, Norway
|
|
Having the two HID interfaces combined with a mutliple report HID interface forces you to lose boot protocol compatibility yes, but also reduces your throughput (since you can only send one or the other report for each HID frame). The upside is that you save an endpoint in the device, which can be useful in some of the smaller USB AVRs with only a couple of endpoints, which you could then use for other purposes.
- Dean  |
_________________ Atmel Studio 6.1 is now released, grab it here.
Report AS6/ASF bugs here.
|
| |
|
|
|
|
|
Posted: Jun 13, 2012 - 07:12 PM |
|

Joined: Jun 12, 2012
Posts: 4
|
|
| Thanks Dean for your answer |
|
|
| |
|
|
|
|
|
Posted: Jun 15, 2012 - 07:29 PM |
|

Joined: Jun 12, 2012
Posts: 4
|
|
One more question. I think there is one more advantage of using the multiple endpoints solutions.
Doing a deeper reading I realized that on CreateHIDReport you are returning what the host is asking you (thanks to the interface comparison). Might that be better for the OS? |
|
|
| |
|
|
|
|
|
Posted: Jun 17, 2012 - 12:56 PM |
|


Joined: Jan 23, 2004
Posts: 9894
Location: Trondheim, Norway
|
|
They're different, but have similar results. Multiple endpoints all for discrete management of the two reports - so the host could throttle back one of them if it doesn't want to read them very often, and can choose which one it wants to read easily. By contrast, the multiplexed solution only allows it to control all the reports as a group.
Which you chose depends on what you need it for - but for simplicity's sake I'd probably recommend the multi-endpoint solution unless you really need to save on endpoints.
- Dean  |
_________________ Atmel Studio 6.1 is now released, grab it here.
Report AS6/ASF bugs here.
|
| |
|
|
|
|
|
Posted: Jun 18, 2012 - 09:03 PM |
|

Joined: Jun 12, 2012
Posts: 4
|
|
| Dean, it's me again. Thanks for your answer. Why in your Generic HID example there is only 1 endpoint (IN) defined instead of 2 (IN and OUT)? |
|
|
| |
|
|
|
|
|
Posted: Jun 18, 2012 - 09:51 PM |
|


Joined: Jan 23, 2004
Posts: 9894
Location: Trondheim, Norway
|
|
The OUT data can be sent via control requests, which can free up an endpoint. However, the main reason is a technical one; the HID class driver needs to know how long the data will be in order to allocate sufficient memory on the stack, which only the control request provides unless the large/slow HID report parser was used. In the case of the GenericHID demo the size is fixed, but since that's an exception it is still bound to the restrictions of the HID class driver implementation.
- Dean  |
_________________ Atmel Studio 6.1 is now released, grab it here.
Report AS6/ASF bugs here.
|
| |
|
|
|
|
|