Two become one
Yet another MyUSB update. I’ve managed (after a lot of thinking, swearing and hours working last night) to seperate the descriptor definitions from the library, so that each application can manage its own descriptors. That’s a great improvement, as it now means that upgrading the MyUSB library really is just a drag-drop affair rather than having to mess with the configuration files.
The changes also means that less code is wasted if the device portion of the library is unused; no descriptors are linked in by default unless specified in the user application, and the GetDescriptor function is now a weak alias to a stub function (thus the user application can override it if needed to be able to return descriptors to the host for device operation).
That’s all neat, but it also makes my life a hell of a lot easier. Now that the library is seperate from the user application, I’m able to put in a Demos/ directory to house the TestApp and Mouse demo applications, which can both be built using the exact same MyUSB library code. No more maintenance nightmare trying to synchronize changes across the library versions used by the different demos!
I look forward to being able to include more demos in the future, now that it’s simple to keep them all updated. Hopefully Denver’s keyboard demo will be included soon.
There are now a few makefiles in the project. Each demo application has a makefile, and there’s a makefile which builds all the demos with a single “make all”. The helper apps also have a single makefile to rebuild them all, if the Java JDK is installed. I’ve also added another makefile in the root directory which can build all helper applications and all demos with a single command.

Loading...