Forum Menu




 


Log in Problems?
New User? Sign Up!
AVR Freaks Forum Index

Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
aranzuglia
PostPosted: Jun 12, 2012 - 11:15 PM
Newbie


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
 
 View user's profile Send private message  
Reply with quote Back to top
abcminiuser
PostPosted: Jun 13, 2012 - 09:52 AM
Moderator


Joined: Jan 23, 2004
Posts: 9817
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 Twisted Evil

_________________
Atmel Studio 6.1 is now released, grab it here.
Report AS6/ASF bugs here.
 
 View user's profile Send private message Send e-mail Visit poster's website 
Reply with quote Back to top
aranzuglia
PostPosted: Jun 13, 2012 - 07:12 PM
Newbie


Joined: Jun 12, 2012
Posts: 4


Thanks Dean for your answer
 
 View user's profile Send private message  
Reply with quote Back to top
aranzuglia
PostPosted: Jun 15, 2012 - 07:29 PM
Newbie


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?
 
 View user's profile Send private message  
Reply with quote Back to top
abcminiuser
PostPosted: Jun 17, 2012 - 12:56 PM
Moderator


Joined: Jan 23, 2004
Posts: 9817
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 Twisted Evil

_________________
Atmel Studio 6.1 is now released, grab it here.
Report AS6/ASF bugs here.
 
 View user's profile Send private message Send e-mail Visit poster's website 
Reply with quote Back to top
aranzuglia
PostPosted: Jun 18, 2012 - 09:03 PM
Newbie


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)?
 
 View user's profile Send private message  
Reply with quote Back to top
abcminiuser
PostPosted: Jun 18, 2012 - 09:51 PM
Moderator


Joined: Jan 23, 2004
Posts: 9817
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 Twisted Evil

_________________
Atmel Studio 6.1 is now released, grab it here.
Report AS6/ASF bugs here.
 
 View user's profile Send private message Send e-mail Visit poster's website 
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT + 1 Hour
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2006 The PNphpBB Group
Credits