I’ve decided to take a short detour, and see if I can do what no one else has with the USB AVRs (to my knowledge) - write a HID report parser. At this point in time I’m not even certain it can be done in a reasonable amount of space and RAM, but I’m giving it a go nonetheless.
All the current MyUSB demos use hard-coded report offsets, which causes things to break if the device uses a report which doesn’t follow the standard examples in the USB.org spec. Writing a parser for the report data will mean perfect operation across all devices, but it does take a lot of engineering. The USB.org engineered the specification for large hosts such as PCs, not tiny 8-bit microcontrollers. I’m trying to avoid dynamic memory allocation, but it just might be required for the finished API.
Speaking of non-standard devices, I’ve made another fix to the library. There is now a 100ms delay after the addressing of a device when in host mode before passing back to the user code for further commands, as some devices seemed to need the pause. Now I’m able to see the X/Y movements of my wireless USB mouse using the library.
Recent Comments