mirror of
https://github.com/apache/nuttx.git
synced 2026-06-04 23:03:27 +08:00
Rename usbhost_storageinit() to usbhost_msc_initialize(). Add calls to usbhost_cdcacm_initialize() is CONFIG_USBHOST_CDCACM is selected.
This commit is contained in:
@@ -178,11 +178,26 @@ int stm32_usbhost_initialize(void)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
uvdbg("Register class drivers\n");
|
uvdbg("Register class drivers\n");
|
||||||
ret = usbhost_storageinit();
|
|
||||||
|
#ifdef CONFIG_USBHOST_MSC
|
||||||
|
/* Register the USB mass storage class */
|
||||||
|
|
||||||
|
ret = usbhost_msc_initialize();
|
||||||
if (ret != OK)
|
if (ret != OK)
|
||||||
{
|
{
|
||||||
udbg("Failed to register the mass storage class\n");
|
udbg("ERROR: Failed to register the mass storage class\n");
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_USBHOST_CDCACM
|
||||||
|
/* Register the CDC/ACM serial class */
|
||||||
|
|
||||||
|
ret = usbhost_cdcacm_initialize();
|
||||||
|
if (ret != OK)
|
||||||
|
{
|
||||||
|
udbg("ERROR: Failed to register the CDC/ACM serial class\n");
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Then get an instance of the USB host interface */
|
/* Then get an instance of the USB host interface */
|
||||||
|
|
||||||
|
|||||||
@@ -190,12 +190,22 @@ int lpc31_usbhost_initialize(void)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_USBHOST_MSC
|
#ifdef CONFIG_USBHOST_MSC
|
||||||
/* Register theUSB host Mass Storage Class */
|
/* Register the USB host Mass Storage Class */
|
||||||
|
|
||||||
ret = usbhost_storageinit();
|
ret = usbhost_msc_initialize();
|
||||||
if (ret != OK)
|
if (ret != OK)
|
||||||
{
|
{
|
||||||
udbg("ERROR: Failed to register the mass storage class: %d\n", ret);
|
usyslog(LOG_ERR, "ERROR: Failed to register the mass storage class: %d\n", ret);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_USBHOST_CDCACM
|
||||||
|
/* Register the CDC/ACM serial class */
|
||||||
|
|
||||||
|
ret = usbhost_cdcacm_initialize();
|
||||||
|
if (ret != OK)
|
||||||
|
{
|
||||||
|
udbg("ERROR: Failed to register the CDC/ACM serial class\n");
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -177,11 +177,26 @@ int stm32_usbhost_initialize(void)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
uvdbg("Register class drivers\n");
|
uvdbg("Register class drivers\n");
|
||||||
ret = usbhost_storageinit();
|
|
||||||
|
#ifdef CONFIG_USBHOST_MSC
|
||||||
|
/* Register the USB host Mass Storage Class */
|
||||||
|
|
||||||
|
ret = usbhost_msc_initialize();
|
||||||
if (ret != OK)
|
if (ret != OK)
|
||||||
{
|
{
|
||||||
udbg("Failed to register the mass storage class\n");
|
udbg("ERROR: Failed to register the mass storage class: %d\n", ret);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_USBHOST_CDCACM
|
||||||
|
/* Register the CDC/ACM serial class */
|
||||||
|
|
||||||
|
ret = usbhost_cdcacm_initialize();
|
||||||
|
if (ret != OK)
|
||||||
|
{
|
||||||
|
udbg("ERROR: Failed to register the CDC/ACM serial class: %d\n", ret);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Then get an instance of the USB host interface */
|
/* Then get an instance of the USB host interface */
|
||||||
|
|
||||||
|
|||||||
@@ -191,13 +191,23 @@ int lpc31_usbhost_initialize(void)
|
|||||||
#ifdef CONFIG_USBHOST_MSC
|
#ifdef CONFIG_USBHOST_MSC
|
||||||
/* Register theUSB host Mass Storage Class */
|
/* Register theUSB host Mass Storage Class */
|
||||||
|
|
||||||
ret = usbhost_storageinit();
|
ret = usbhost_msc_initialize();
|
||||||
if (ret != OK)
|
if (ret != OK)
|
||||||
{
|
{
|
||||||
udbg("ERROR: Failed to register the mass storage class: %d\n", ret);
|
udbg("ERROR: Failed to register the mass storage class: %d\n", ret);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_USBHOST_CDCACM
|
||||||
|
/* Register the CDC/ACM serial class */
|
||||||
|
|
||||||
|
ret = usbhost_cdcacm_initialize();
|
||||||
|
if (ret != OK)
|
||||||
|
{
|
||||||
|
udbg("ERROR: Failed to register the CDC/ACM serial class\n");
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_USBHOST_HIDKBD
|
#ifdef CONFIG_USBHOST_HIDKBD
|
||||||
/* Register the USB host HID keyboard class driver */
|
/* Register the USB host HID keyboard class driver */
|
||||||
|
|
||||||
|
|||||||
@@ -257,13 +257,25 @@ static int nsh_usbhostinitialize(void)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_USBHOST_MSC
|
||||||
/* Initialize mass storage support */
|
/* Initialize mass storage support */
|
||||||
|
|
||||||
ret = usbhost_storageinit();
|
ret = usbhost_msc_initialize();
|
||||||
if (ret != OK)
|
if (ret != OK)
|
||||||
{
|
{
|
||||||
syslog(LOG_ERR, "ERROR: Failed to register the mass storage class\n");
|
syslog(LOG_ERR, "ERROR: Failed to register the mass storage class: %d\n", ret);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_USBHOST_CDCACM
|
||||||
|
/* Register the CDC/ACM serial class */
|
||||||
|
|
||||||
|
ret = usbhost_cdcacm_initialize();
|
||||||
|
if (ret != OK)
|
||||||
|
{
|
||||||
|
syslog(LOG_ERR, "ERROR: Failed to register the CDC/ACM serial class: %d\n", eret);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Then get an instance of the USB host interface */
|
/* Then get an instance of the USB host interface */
|
||||||
|
|
||||||
|
|||||||
@@ -175,6 +175,8 @@ int stm32_usbhost_initialize(void)
|
|||||||
* that we care about:
|
* that we care about:
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
uvdbg("Register class drivers\n");
|
||||||
|
|
||||||
#ifdef CONFIG_USBHOST_HUB
|
#ifdef CONFIG_USBHOST_HUB
|
||||||
/* Initialize USB hub class support */
|
/* Initialize USB hub class support */
|
||||||
|
|
||||||
@@ -185,14 +187,25 @@ int stm32_usbhost_initialize(void)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Initialize Mass Storage Class support */
|
#ifdef CONFIG_USBHOST_MSC
|
||||||
|
/* Register the USB host Mass Storage Class */
|
||||||
|
|
||||||
uvdbg("Register class drivers\n");
|
ret = usbhost_msc_initialize();
|
||||||
ret = usbhost_storageinit();
|
|
||||||
if (ret != OK)
|
if (ret != OK)
|
||||||
{
|
{
|
||||||
udbg("Failed to register the mass storage class\n");
|
udbg("ERROR: Failed to register the mass storage class: %d\n", ret);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_USBHOST_CDCACM
|
||||||
|
/* Register the CDC/ACM serial class */
|
||||||
|
|
||||||
|
ret = usbhost_cdcacm_initialize();
|
||||||
|
if (ret != OK)
|
||||||
|
{
|
||||||
|
udbg("ERROR: Failed to register the CDC/ACM serial class: %d\n", ret);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Then get an instance of the USB host interface */
|
/* Then get an instance of the USB host interface */
|
||||||
|
|
||||||
|
|||||||
@@ -312,11 +312,26 @@ static int nsh_usbhostinitialize(void)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
syslog(LOG_INFO, "Register class drivers\n");
|
syslog(LOG_INFO, "Register class drivers\n");
|
||||||
ret = usbhost_storageinit();
|
|
||||||
|
#ifdef CONFIG_USBHOST_MSC
|
||||||
|
/* Register the USB host Mass Storage Class */
|
||||||
|
|
||||||
|
ret = usbhost_msc_initialize();
|
||||||
if (ret != OK)
|
if (ret != OK)
|
||||||
{
|
{
|
||||||
syslog(LOG_ERR, "ERROR: Failed to register the mass storage class\n");
|
syslog(LOG_ERR, "ERROR: Failed to register the mass storage class: %d\n", ret);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_USBHOST_CDCACM
|
||||||
|
/* Register the CDC/ACM serial class */
|
||||||
|
|
||||||
|
ret = usbhost_cdcacm_initialize();
|
||||||
|
if (ret != OK)
|
||||||
|
{
|
||||||
|
syslog(LOG_ERR, "ERROR: Failed to register the CDC/ACM serial class: %d\n", ret);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Then get an instance of the USB host interface */
|
/* Then get an instance of the USB host interface */
|
||||||
|
|
||||||
|
|||||||
@@ -276,11 +276,26 @@ static int nsh_usbhostinitialize(void)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
syslog(LOG_INFO, "Register class drivers\n");
|
syslog(LOG_INFO, "Register class drivers\n");
|
||||||
ret = usbhost_storageinit();
|
|
||||||
|
#ifdef CONFIG_USBHOST_MSC
|
||||||
|
/* Register the USB host Mass Storage Class */
|
||||||
|
|
||||||
|
ret = usbhost_msc_initialize();
|
||||||
if (ret != OK)
|
if (ret != OK)
|
||||||
{
|
{
|
||||||
syslog(LOG_ERR, "ERROR: Failed to register the mass storage class\n");
|
syslog(LOG_ERR, "ERROR: Failed to register the mass storage class: %d\n", ret);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_USBHOST_CDCACM
|
||||||
|
/* Register the CDC/ACM serial class */
|
||||||
|
|
||||||
|
ret = usbhost_cdcacm_initialize();
|
||||||
|
if (ret != OK)
|
||||||
|
{
|
||||||
|
syslog(LOG_ERR, "ERROR: Failed to register the CDC/ACM serial class: %d\n", ret);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Then get an instance of the USB host interface */
|
/* Then get an instance of the USB host interface */
|
||||||
|
|
||||||
|
|||||||
@@ -286,11 +286,26 @@ static int nsh_usbhostinitialize(void)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
syslog(LOG_INFO, "Register class drivers\n");
|
syslog(LOG_INFO, "Register class drivers\n");
|
||||||
ret = usbhost_storageinit();
|
|
||||||
|
#ifdef CONFIG_USBHOST_MSC
|
||||||
|
/* Register the USB host Mass Storage Class */
|
||||||
|
|
||||||
|
ret = usbhost_msc_initialize();
|
||||||
if (ret != OK)
|
if (ret != OK)
|
||||||
{
|
{
|
||||||
syslog(LOG_ERR, "ERROR: Failed to register the mass storage class\n");
|
syslog(LOG_ERR, "ERROR: Failed to register the mass storage class: %d\n", ret);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_USBHOST_CDCACM
|
||||||
|
/* Register the CDC/ACM serial class */
|
||||||
|
|
||||||
|
ret = usbhost_cdcacm_initialize();
|
||||||
|
if (ret != OK)
|
||||||
|
{
|
||||||
|
syslog(LOG_ERR, "ERROR: Failed to register the CDC/ACM serial class: %d\n", ret);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Then get an instance of the USB host interface */
|
/* Then get an instance of the USB host interface */
|
||||||
|
|
||||||
|
|||||||
@@ -315,13 +315,23 @@ int sam_usbhost_initialize(void)
|
|||||||
#ifdef CONFIG_USBHOST_MSC
|
#ifdef CONFIG_USBHOST_MSC
|
||||||
/* Register theUSB host Mass Storage Class */
|
/* Register theUSB host Mass Storage Class */
|
||||||
|
|
||||||
ret = usbhost_storageinit();
|
ret = usbhost_msc_initialize();
|
||||||
if (ret != OK)
|
if (ret != OK)
|
||||||
{
|
{
|
||||||
udbg("ERROR: Failed to register the mass storage class: %d\n", ret);
|
udbg("ERROR: Failed to register the mass storage class: %d\n", ret);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_USBHOST_CDCACM
|
||||||
|
/* Register the CDC/ACM serial class */
|
||||||
|
|
||||||
|
ret = usbhost_cdcacm_initialize();
|
||||||
|
if (ret != OK)
|
||||||
|
{
|
||||||
|
udbg("ERROR: Failed to register the CDC/ACM serial class: %d\n", ret);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_USBHOST_HIDKBD
|
#ifdef CONFIG_USBHOST_HIDKBD
|
||||||
/* Register the USB host HID keyboard class driver */
|
/* Register the USB host HID keyboard class driver */
|
||||||
|
|
||||||
|
|||||||
@@ -313,13 +313,23 @@ int sam_usbhost_initialize(void)
|
|||||||
#ifdef CONFIG_USBHOST_MSC
|
#ifdef CONFIG_USBHOST_MSC
|
||||||
/* Register the USB host Mass Storage Class */
|
/* Register the USB host Mass Storage Class */
|
||||||
|
|
||||||
ret = usbhost_storageinit();
|
ret = usbhost_msc_initialize();
|
||||||
if (ret != OK)
|
if (ret != OK)
|
||||||
{
|
{
|
||||||
udbg("ERROR: Failed to register the mass storage class: %d\n", ret);
|
udbg("ERROR: Failed to register the mass storage class: %d\n", ret);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_USBHOST_CDCACM
|
||||||
|
/* Register the CDC/ACM serial class */
|
||||||
|
|
||||||
|
ret = usbhost_cdcacm_initialize();
|
||||||
|
if (ret != OK)
|
||||||
|
{
|
||||||
|
udbg("ERROR: Failed to register the CDC/ACM serial class: %d\n", ret);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_USBHOST_HIDKBD
|
#ifdef CONFIG_USBHOST_HIDKBD
|
||||||
/* Register the USB host HID keyboard class driver */
|
/* Register the USB host HID keyboard class driver */
|
||||||
|
|
||||||
|
|||||||
@@ -314,13 +314,23 @@ int sam_usbhost_initialize(void)
|
|||||||
#ifdef CONFIG_USBHOST_MSC
|
#ifdef CONFIG_USBHOST_MSC
|
||||||
/* Register the USB host Mass Storage Class */
|
/* Register the USB host Mass Storage Class */
|
||||||
|
|
||||||
ret = usbhost_storageinit();
|
ret = usbhost_msc_initialize();
|
||||||
if (ret != OK)
|
if (ret != OK)
|
||||||
{
|
{
|
||||||
udbg("ERROR: Failed to register the mass storage class: %d\n", ret);
|
udbg("ERROR: Failed to register the mass storage class: %d\n", ret);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_USBHOST_CDCACM
|
||||||
|
/* Register the CDC/ACM serial class */
|
||||||
|
|
||||||
|
ret = usbhost_cdcacm_initialize();
|
||||||
|
if (ret != OK)
|
||||||
|
{
|
||||||
|
udbg("ERROR: Failed to register the CDC/ACM serial class: %d\n", ret);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_USBHOST_HIDKBD
|
#ifdef CONFIG_USBHOST_HIDKBD
|
||||||
/* Register the USB host HID keyboard class driver */
|
/* Register the USB host HID keyboard class driver */
|
||||||
|
|
||||||
|
|||||||
@@ -177,11 +177,26 @@ int stm32_usbhost_initialize(void)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
uvdbg("Register class drivers\n");
|
uvdbg("Register class drivers\n");
|
||||||
ret = usbhost_storageinit();
|
|
||||||
|
#ifdef CONFIG_USBHOST_MSC
|
||||||
|
/* Register the USB mass storage class class */
|
||||||
|
|
||||||
|
ret = usbhost_msc_initialize();
|
||||||
if (ret != OK)
|
if (ret != OK)
|
||||||
{
|
{
|
||||||
udbg("Failed to register the mass storage class\n");
|
udbg("ERROR: Failed to register the mass storage class: %d\n", ret);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_USBHOST_CDCACM
|
||||||
|
/* Register the CDC/ACM serial class */
|
||||||
|
|
||||||
|
ret = usbhost_cdcacm_initialize();
|
||||||
|
if (ret != OK)
|
||||||
|
{
|
||||||
|
udbg("ERROR: Failed to register the CDC/ACM serial class: %d\n", ret);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Then get an instance of the USB host interface */
|
/* Then get an instance of the USB host interface */
|
||||||
|
|
||||||
|
|||||||
@@ -177,11 +177,26 @@ int stm32_usbhost_initialize(void)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
uvdbg("Register class drivers\n");
|
uvdbg("Register class drivers\n");
|
||||||
ret = usbhost_storageinit();
|
|
||||||
|
#ifdef CONFIG_USBHOST_MSC
|
||||||
|
/* Register the USB mass storage class class */
|
||||||
|
|
||||||
|
ret = usbhost_msc_initialize();
|
||||||
if (ret != OK)
|
if (ret != OK)
|
||||||
{
|
{
|
||||||
udbg("Failed to register the mass storage class\n");
|
udbg("ERROR: Failed to register the mass storage class: %d\n", ret);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_USBHOST_CDCACM
|
||||||
|
/* Register the CDC/ACM serial class */
|
||||||
|
|
||||||
|
ret = usbhost_cdcacm_initialize();
|
||||||
|
if (ret != OK)
|
||||||
|
{
|
||||||
|
udbg("ERROR: Failed to register the CDC/ACM serial class: %d\n", ret);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Then get an instance of the USB host interface */
|
/* Then get an instance of the USB host interface */
|
||||||
|
|
||||||
|
|||||||
@@ -177,11 +177,26 @@ int stm32_usbhost_initialize(void)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
uvdbg("Register class drivers\n");
|
uvdbg("Register class drivers\n");
|
||||||
ret = usbhost_storageinit();
|
|
||||||
|
#ifdef CONFIG_USBHOST_MSC
|
||||||
|
/* Register the USB mass storage class class */
|
||||||
|
|
||||||
|
ret = usbhost_msc_initialize();
|
||||||
if (ret != OK)
|
if (ret != OK)
|
||||||
{
|
{
|
||||||
udbg("Failed to register the mass storage class\n");
|
udbg("ERROR: Failed to register the mass storage class: %d\n", ret);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_USBHOST_CDCACM
|
||||||
|
/* Register the CDC/ACM serial class */
|
||||||
|
|
||||||
|
ret = usbhost_cdcacm_initialize();
|
||||||
|
if (ret != OK)
|
||||||
|
{
|
||||||
|
udbg("ERROR: Failed to register the CDC/ACM serial class: %d\n", ret);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Then get an instance of the USB host interface */
|
/* Then get an instance of the USB host interface */
|
||||||
|
|
||||||
|
|||||||
@@ -184,13 +184,25 @@ int stm32_usbhost_initialize(void)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Register the USB host Mass Storage Class */
|
#ifdef CONFIG_USBHOST_MSC
|
||||||
|
/* Register the USB mass storage class class */
|
||||||
|
|
||||||
ret = usbhost_storageinit();
|
ret = usbhost_msc_initialize();
|
||||||
if (ret != OK)
|
if (ret != OK)
|
||||||
{
|
{
|
||||||
udbg("Failed to register the mass storage class\n");
|
udbg("ERROR: Failed to register the mass storage class: %d\n", ret);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_USBHOST_CDCACM
|
||||||
|
/* Register the CDC/ACM serial class */
|
||||||
|
|
||||||
|
ret = usbhost_cdcacm_initialize();
|
||||||
|
if (ret != OK)
|
||||||
|
{
|
||||||
|
udbg("ERROR: Failed to register the CDC/ACM serial class: %d\n", ret);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Then get an instance of the USB host interface */
|
/* Then get an instance of the USB host interface */
|
||||||
|
|
||||||
|
|||||||
@@ -188,12 +188,22 @@ int stm32_usbhost_initialize(void)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_USBHOST_MSC
|
#ifdef CONFIG_USBHOST_MSC
|
||||||
/* Initialize the mass storage class */
|
/* Register the USB mass storage class class */
|
||||||
|
|
||||||
ret = usbhost_storageinit();
|
ret = usbhost_msc_initialize();
|
||||||
if (ret != OK)
|
if (ret != OK)
|
||||||
{
|
{
|
||||||
udbg("Failed to register the mass storage class\n");
|
udbg("ERROR: Failed to register the mass storage class: %d\n", ret);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_USBHOST_CDCACM
|
||||||
|
/* Register the CDC/ACM serial class */
|
||||||
|
|
||||||
|
ret = usbhost_cdcacm_initialize();
|
||||||
|
if (ret != OK)
|
||||||
|
{
|
||||||
|
udbg("ERROR: Failed to register the CDC/ACM serial class: %d\n", ret);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -278,11 +278,25 @@ static int nsh_usbhostinitialize(void)
|
|||||||
|
|
||||||
syslog(LOG_INFO, "Register class drivers\n");
|
syslog(LOG_INFO, "Register class drivers\n");
|
||||||
|
|
||||||
ret = usbhost_storageinit();
|
#ifdef CONFIG_USBHOST_MSC
|
||||||
|
/* Register the USB mass storage class class */
|
||||||
|
|
||||||
|
ret = usbhost_msc_initialize();
|
||||||
if (ret != OK)
|
if (ret != OK)
|
||||||
{
|
{
|
||||||
syslog(LOG_ERR, "ERROR: Failed to register the mass storage class\n");
|
syslog(LOG_ERR, "ERROR: Failed to register the mass storage class: %d\n", ret);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_USBHOST_CDCACM
|
||||||
|
/* Register the CDC/ACM serial class */
|
||||||
|
|
||||||
|
ret = usbhost_cdcacm_initialize();
|
||||||
|
if (ret != OK)
|
||||||
|
{
|
||||||
|
syslog(LOG_ERR, "ERROR: Failed to register the CDC/ACM serial class: %d\n", ret);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Then get an instance of the USB host interface */
|
/* Then get an instance of the USB host interface */
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user