Search code examples
usbavruartatmelusb-descriptor

Understanding USB descriptors in relation to the LUFA library


Can someone please explain how the LUFA library handles USB descriptors? I can't seem to trace the descriptors in any of the examples given back to the source of the library. How do they work? Are they programmed into flash memory at a given location?

Thanks, George


Solution

  • Descriptors are struct's defined in the LUFA library. You find them in

    • /drivers/USB/Core/StdDescriptors.h

    which is included via the "master include file" /Drivers/USB/USB.h

    The user application makes use of these struct's

    Please consult the LUFA library documentation and look up "Descriptor" in the search box or expand the File List subtree. This will guide you to info what is defined and where. Also look up the main USB function void USB_USBTask(void).

    Another good resource about the basics is this.