Hi Arnaud:
Theoretically, I think it is possible to configure usb host to work with cdc & msd.
Please refer to Freescale_MQX_4_x\doc\usb\MQX_USB_Host_Reference_Manual
section 2.3 Using the Freescale MQX USB Host API , there defined msd and printer in a driver capabilites table.
1. Define a table of driver capabilities that the application uses (as follows):
Example 2-1. Sample driver info table
static USB_HOST_DRIVER_INFO DriverInfoTable[ ] =
{
{
/* Vendor ID per USB-IF */
{0x00,0x00},
/* Product ID per manufacturer */
{0x00,0x00},
/* Class code */
USB_CLASS_MASS_STORAGE,
/* Sub-Class code */
USB_SUBCLASS_MASS_UFI,
/* Protocol */
USB_PROTOCOL_MASS_BULK,
/* Reserved */
0,
/* Application call back function */
usb_host_mass_device_event
},
{
/* Vendor ID per USB-IF */
{0x00,0x00},
/* Product ID per manufacturer */
{0x00,0x00},
/* Class code */
USB_CLASS_PRINTER,
/* Sub-Class code */
USB_SUBCLASS_PRINTER,
/* Protocol */
USB_PROTOCOL_PRT_BIDIR,
/* Reserved
0,
/* Application call back function */
usb_host_prt_device_event
},
{
/* All-zero entry terminates */
{0x00,0x00},
/* driver info list. */
{0x00,0x00},
0,
0,
0,
0,
NULL
}
};
2. Initialize the USB Host controller interface (_usb_host_init()).
3. The application should then register this table with the host stack by calling the
_usb_host_driver_info_register() host API function.
4. Optionally register services for types of events (_usb_host_register_service()).
5. Wait for the callback function, which is specified in the driver info table, to be called.
6. Check for the events in the callback function: One of ATTACH, DETACH, CONFIG or INTF.
ATTACH: indicates a newly attached device was just enumerated and a default configuration was
selected
DETACH: the device was detached.
CONFIG: A new configuration was selected on the device.
INTF: A new interface was selected on the device.
7. If it is an attach event, then select an interface by calling the host API function
_usb_hostdev_select_interface().
8. After the INTF event is notified in the callback function, issue class-specific commands by using
the class API.
9. Open the pipe for a connected device or devices (_usb_host_open_pipe()).
10. Get the pipe handle by calling the host API function _usb_hostdev_find_pipe_handle().
11. Transfer data by using the host API functions _usb_host_send_data() and/or
_usb_host_recv_data().
12. If required, cancel a transfer on a pipe (_usb_host_cancel_transfer()).
13. If applicable, unregister services for types of events (_usb_host_unregister_service()) and close
pipes for disconnected devices (_usb_host_close_pipe()).
14. Shut down the USB Host controller interface (_usb_host_shutdown()).
Regards
Daniel