After a short development cycle, the next iteration of MyUSB - version 1.2.0 - has now been released. Unlike V1.1.0 this new version has essentially no migration issues, although it does offer increased performance and code clarity if existing projects use the new features.
The new code includes the changes I’ve been posting about here since the last release, including the new enhanced Mass Storage Host demo. The changelog for the new version is as follows:
- Added USB_DeviceEnumerationComplete event for host mode
- Added new Scheduler_Init routine to preprepare the scheduler, so that tasks can be started and stopped before the scheduler has been started (via Scheduler_Start)
- Connection events in both Device and Host mode are now interrupt-driven, allowing the USB management task to be stopped when the USB is not connected to a host or device
- All demos updated to stop the USB task when not in use via the appropriate USB events
- Mass Storage Host demo application updated to function correctly with all USB flash disks
- Mass Storage Host demo application now prints out the capacity and number of LUNs in the attached device, and prints the first block as hexadecimal numbers rather than ASCII characters
- Endpoint and Pipe clearing routines now clear the Endpoint/Pipe interrupt and status flags
- Shifted error handling code in the host enum state machine to a single block, to reduce code complexity
- Added in DESCRIPTOR_TYPE, DESCRIPTOR_SIZE and DESCRIPTOR_CAST macros to make config descriptor processing clearer in USB hosts and DESCRIPTOR_ADDRESS for convenience in USB devices
- Added in alloca macro to common.h, in case the user is using an old version of avr-lib-c missing the macro
All the demos have been updated to use the new convenience macros and features. This is a much more minor upgrade than 1.1.0 was to 1.0.X, but is still a great progression forward. I’m pushing this release early due to the major changes to the Mass Storage Host demo, and the change to interrupt-driven connection/disconnection which allows for both Host and Device demos to follow a similar task suspension when not in use system. Oh, and I’ve run out of development ideas for the moment!
As always, I’ve created a migration page on my site wiki for the new release, and I welcome all suggestions, feedback, bug reports, etc.
February 5th, 2008 at 6:13 am
Hi Dean,
I just started tracking the MyUSB project — and the first thing I want to say is that it is great that you took this project on. The AT90USB processors have interested me for quite a while, but I’ve never tried to climb the learning curve because the Atmel example code is not released under a GPL compatible license, and I just don’t have the time to roll my own. With your stuff, I can see lots of possibilities for incorporating the AT90USB.
Now for a question — I’d like to do some kind of cheap image capture for table-top robotics applications. I gather that a lot of digital cameras use the mass storage interface, and that there is also a still image class driver. Also, there is a video class driver. Have you looked at any of the image interfaces? I was thinking that a cheap USB camera might talk to the mass storage driver, and that would allow a quick and cheap lash up to an AT90USBKEY to do blob identification and tracking (something like CMUcam I or AVRcam) at a slow but usable frame rate. Any thoughts?
February 6th, 2008 at 5:23 pm
Thanks Dean. I’m looking forward to trying out MyUSB when my hardware is a bit further along. Since you said you are out of development ideas, I’ll offer one: It would be interesting to have an alternative to Atmel’s DFU bootloader. An open source USB bootloader that everyone could work on optimizing together would be very cool. I’m not aware of any free AVR usb bootloader besides Atmel’s, so it might draw even more attention to your project(s).