Gal,
> What's the internal class driver? are you reffering to host-side
> driver for e.g. Windows?
The Class drivers are a relatively new addition to the LUFA codebase,
and demos for them can be found in the Demos/ClassDriver/ directory of
the latest release. Basically, they are a bunch of optional driver
code for the standard USB classes, but integrated directly into the
LUFA library core.
In older demos, the LUFA library exposed a set of low level USB APIs,
which the user could then use to implement the USB classes (MIDI, CDC,
Mass Storage, etc.) that they desired into their application. However,
when all the user wanted was to make a device with one or more of the
standard classes, this caused a lot of duplicated code to be written.
To combat this, I've written a small set of standard USB class
drivers, for both USB device and host modes, which take care of all
the low level USB code for you, and expose a set of higher level APIs
specific to that class. You'll see in the demos how that works - you
define a context structure of the class you want to use, fill out its
configuration parameters, and then pass it to the appropriate class
driver APIs as needed. It makes your user code much easier to read,
much shorter, allows for bug fixes to the class driver and library to
propagate to all user code at once, reduces the number of changes
needed between LUFA upgrades and allow you to focus your application
code solely on your actual application rather than the USB
functionality.
In your case, the Demos/Device/ClassDriver/MIDI demo shows off the
LUFA MIDI Device Class driver. Compare it to the one in Demos/Device/
LowLevel/MIDI and see how much cleaner and easier to read it is :).
> Again many many for your excellent reply :)
No problem! Good luck with your project!
- Dean