Anton Belokrylov

Multiple different USB devices via virtual hub or switching

Discussion created by Anton Belokrylov on Mar 15, 2012
Latest reply on May 8, 2012 by Fabi



I'm using K60F with MQX. I need to have two USB devices --- Virtual COM and Mass Storage Device. I can see two possible solutions:

1. Implement a software hub. I didn't find hub device support in MQX, so I suspect I have to implement hub class over MQX USB Framework, and modify standard CDC and MSD implementations so they will work through software hub and don't call USB Framework functions. Correct me if I'm wrong.

2. As a backup solution. Programmatically switch from one USB device to another after certain external event. So on this event I have to detach and deinitialize one device; then initialize another. MQX CDC and MSD classes don't have 'deinit' of 'detach' functions. Aside carefully freeing their memory, what is the common process of detaching device?