Tutorial: USB Control Transfers with LUFA

991 views
Skip to first unread message

Christoph Redecker

unread,
Oct 2, 2011, 8:13:47 AM10/2/11
to lufa-s...@googlegroups.com
Hi folks,

I've written a tutorial about USB control transfers with LUFA, based on
a recent thread [1] and with some help from Dean. Here it is:

http://www.avrbeginners.net/new/tutorials/usb-control-transfers-with-lufa/

If you like to, please give me feedback on content, typos, grammar -
anything that needs correction!

Regards

Christoph

[1]
http://groups.google.com/group/lufa-support/browse_thread/thread/310876351f413206/

Christoph Redecker

unread,
May 20, 2012, 8:28:36 AM5/20/12
to lufa-s...@googlegroups.com
Hi list,

I updated the control transfers tutorial, which can be found here:

http://www.avrbeginners.net/new/tutorials/usb-control-transfers-with-lufa/

Cheers

Christoph

Dean Camera

unread,
May 20, 2012, 8:43:43 AM5/20/12
to lufa-s...@googlegroups.com
Christoph,

I put a link to it in the LUFA documentation (see http://fourwalledcubicle.com/files/temp/LUFA-Doc-NEXT/Documentation/html/_page__resources.html#Sec_UnofficialResources for a preview) which will be available in the next release, due soon. I also just put it in my Twitter feed, in case anyone there is interested in it that isn't already subscribed to the support list.

Great work!

- Dean

Christoph Redecker

unread,
May 20, 2012, 8:55:19 AM5/20/12
to lufa-s...@googlegroups.com
Oh that's cool! Thank you for both the link and the tweet.

Christoph
> <http://www.avrbeginners.net/new/tutorials/usb-control-transfers-with-lufa/>
>
>
> Cheers
>
> Christoph
>
> --
> You received this message because you are subscribed to the Google
> Groups "LUFA Library Support List" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/lufa-support/-/Ji_-GIPOXnwJ.
> To post to this group, send email to lufa-s...@googlegroups.com.
> To unsubscribe from this group, send email to
> lufa-support...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/lufa-support?hl=en.
>
> eMail ist virenfrei.
> Von AVG �berpr�ft - www.avg.de <http://www.avg.de>
> Version: 2012.0.1913 / Virendatenbank: 2425/5011 - Ausgabedatum: 20.05.2012
>

Christoph Redecker

unread,
May 20, 2012, 4:31:58 PM5/20/12
to lufa-s...@googlegroups.com
I got off-list feedback regarding request filtering. I'm filtering the
request type for class-specific requests using the REQTYPE_CLASS mask in
the tutorial.

The suggestion is to use REQTYPE_VENDOR in order to make it possible to
use a standard class and enhance it with custom control transfers. That
way it could be possible to implement a CDC device with (sticking to the
tutorial example) an integrated servo controller *if* the OS doesn't
prevent us from doing such a thing.

Is there any "best practice" regarding this?

Regards

Christoph

Chris McClelland

unread,
May 20, 2012, 5:08:04 PM5/20/12
to LUFA Library Support List
I was under the impression that a device that is claimed by a class
driver (mass-storage, CDC, HID etc) cannot also be claimed by a vendor
driver.


On May 20, 9:31 pm, Christoph Redecker <redec...@avrbeginners.net>
wrote:

Donald Delmar Davis

unread,
May 20, 2012, 5:14:00 PM5/20/12
to lufa-s...@googlegroups.com
I have done this with osx and libusb. Linux requires you to unload the driver or write a modified driver.
> --
> You received this message because you are subscribed to the Google Groups "LUFA Library Support List" group.

Christoph Redecker

unread,
May 21, 2012, 1:20:38 PM5/21/12
to lufa-s...@googlegroups.com
USB devices with device class 0xFF or interface class 0xFF are called
"vendor specific" by the USB specification. There is no class
specification for homegrown devices (how could there be one, anyway), so
that's +1 for using vendor specific requests.

I think I'll change that next time I udpate the tutorial.

Regards

Christoph
Reply all
Reply to author
Forward
0 new messages