Rename usbhost_storageinit() to usbhost_msc_initialize(). Add calls to usbhost_cdcacm_initialize() is CONFIG_USBHOST_CDCACM is selected.

This commit is contained in:
Gregory Nutt
2015-05-06 14:11:29 -06:00
parent c6efb9c436
commit d468285739
18 changed files with 268 additions and 37 deletions
+17 -2
View File
@@ -178,11 +178,26 @@ int stm32_usbhost_initialize(void)
*/
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)
{
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 */
+13 -3
View File
@@ -190,12 +190,22 @@ int lpc31_usbhost_initialize(void)
#endif
#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)
{
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
+17 -2
View File
@@ -177,11 +177,26 @@ int stm32_usbhost_initialize(void)
*/
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)
{
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 */
+11 -1
View File
@@ -191,13 +191,23 @@ int lpc31_usbhost_initialize(void)
#ifdef CONFIG_USBHOST_MSC
/* Register theUSB host Mass Storage Class */
ret = usbhost_storageinit();
ret = usbhost_msc_initialize();
if (ret != OK)
{
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\n");
}
#endif
#ifdef CONFIG_USBHOST_HIDKBD
/* Register the USB host HID keyboard class driver */
+14 -2
View File
@@ -257,13 +257,25 @@ static int nsh_usbhostinitialize(void)
}
#endif
#ifdef CONFIG_USBHOST_MSC
/* Initialize mass storage support */
ret = usbhost_storageinit();
ret = usbhost_msc_initialize();
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 */
+17 -4
View File
@@ -175,6 +175,8 @@ int stm32_usbhost_initialize(void)
* that we care about:
*/
uvdbg("Register class drivers\n");
#ifdef CONFIG_USBHOST_HUB
/* Initialize USB hub class support */
@@ -185,14 +187,25 @@ int stm32_usbhost_initialize(void)
}
#endif
/* Initialize Mass Storage Class support */
#ifdef CONFIG_USBHOST_MSC
/* Register the USB host Mass Storage Class */
uvdbg("Register class drivers\n");
ret = usbhost_storageinit();
ret = usbhost_msc_initialize();
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 */
+17 -2
View File
@@ -312,11 +312,26 @@ static int nsh_usbhostinitialize(void)
*/
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)
{
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 */
+17 -2
View File
@@ -276,11 +276,26 @@ static int nsh_usbhostinitialize(void)
*/
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)
{
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 */
+17 -2
View File
@@ -286,11 +286,26 @@ static int nsh_usbhostinitialize(void)
*/
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)
{
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 */
+11 -1
View File
@@ -315,13 +315,23 @@ int sam_usbhost_initialize(void)
#ifdef CONFIG_USBHOST_MSC
/* Register theUSB host Mass Storage Class */
ret = usbhost_storageinit();
ret = usbhost_msc_initialize();
if (ret != OK)
{
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
#ifdef CONFIG_USBHOST_HIDKBD
/* Register the USB host HID keyboard class driver */
+11 -1
View File
@@ -313,13 +313,23 @@ int sam_usbhost_initialize(void)
#ifdef CONFIG_USBHOST_MSC
/* Register the USB host Mass Storage Class */
ret = usbhost_storageinit();
ret = usbhost_msc_initialize();
if (ret != OK)
{
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
#ifdef CONFIG_USBHOST_HIDKBD
/* Register the USB host HID keyboard class driver */
+11 -1
View File
@@ -314,13 +314,23 @@ int sam_usbhost_initialize(void)
#ifdef CONFIG_USBHOST_MSC
/* Register the USB host Mass Storage Class */
ret = usbhost_storageinit();
ret = usbhost_msc_initialize();
if (ret != OK)
{
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
#ifdef CONFIG_USBHOST_HIDKBD
/* Register the USB host HID keyboard class driver */
+17 -2
View File
@@ -177,11 +177,26 @@ int stm32_usbhost_initialize(void)
*/
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)
{
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 */
+17 -2
View File
@@ -177,11 +177,26 @@ int stm32_usbhost_initialize(void)
*/
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)
{
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 */
+17 -2
View File
@@ -177,11 +177,26 @@ int stm32_usbhost_initialize(void)
*/
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)
{
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 */
+15 -3
View File
@@ -184,13 +184,25 @@ int stm32_usbhost_initialize(void)
}
#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)
{
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 */
+13 -3
View File
@@ -188,12 +188,22 @@ int stm32_usbhost_initialize(void)
#endif
#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)
{
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
+16 -2
View File
@@ -278,11 +278,25 @@ static int nsh_usbhostinitialize(void)
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)
{
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 */