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?