diff --git a/configs/cloudctrl/src/stm32_usb.c b/configs/cloudctrl/src/stm32_usb.c index 337bb998cda..23c84917248 100644 --- a/configs/cloudctrl/src/stm32_usb.c +++ b/configs/cloudctrl/src/stm32_usb.c @@ -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 */ diff --git a/configs/ea3131/src/lpc31_usbhost.c b/configs/ea3131/src/lpc31_usbhost.c index d2eefb11d75..25d431158c3 100644 --- a/configs/ea3131/src/lpc31_usbhost.c +++ b/configs/ea3131/src/lpc31_usbhost.c @@ -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 diff --git a/configs/mikroe-stm32f4/src/stm32_usb.c b/configs/mikroe-stm32f4/src/stm32_usb.c index 1b0df8cedff..926c12e02d2 100644 --- a/configs/mikroe-stm32f4/src/stm32_usb.c +++ b/configs/mikroe-stm32f4/src/stm32_usb.c @@ -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 */ diff --git a/configs/olimex-lpc-h3131/src/lpc31_usbhost.c b/configs/olimex-lpc-h3131/src/lpc31_usbhost.c index 1d876a1b892..e0a1e229d47 100644 --- a/configs/olimex-lpc-h3131/src/lpc31_usbhost.c +++ b/configs/olimex-lpc-h3131/src/lpc31_usbhost.c @@ -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 */ diff --git a/configs/olimex-lpc1766stk/src/lpc17_nsh.c b/configs/olimex-lpc1766stk/src/lpc17_nsh.c index 0fa1413c17e..b4ab449f8ca 100644 --- a/configs/olimex-lpc1766stk/src/lpc17_nsh.c +++ b/configs/olimex-lpc1766stk/src/lpc17_nsh.c @@ -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 */ diff --git a/configs/olimex-stm32-p207/src/stm32_usb.c b/configs/olimex-stm32-p207/src/stm32_usb.c index c663c948ff6..0dc678d5f21 100644 --- a/configs/olimex-stm32-p207/src/stm32_usb.c +++ b/configs/olimex-stm32-p207/src/stm32_usb.c @@ -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 */ diff --git a/configs/open1788/src/lpc17_nsh.c b/configs/open1788/src/lpc17_nsh.c index 00a12aec922..b972c224dbb 100644 --- a/configs/open1788/src/lpc17_nsh.c +++ b/configs/open1788/src/lpc17_nsh.c @@ -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 */ diff --git a/configs/pic32mx-starterkit/src/pic32mx_nsh.c b/configs/pic32mx-starterkit/src/pic32mx_nsh.c index 7a3813d56ec..d18f63d06df 100644 --- a/configs/pic32mx-starterkit/src/pic32mx_nsh.c +++ b/configs/pic32mx-starterkit/src/pic32mx_nsh.c @@ -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 */ diff --git a/configs/pic32mx7mmb/src/pic32_nsh.c b/configs/pic32mx7mmb/src/pic32_nsh.c index f0b1e9e5b9e..8c51f1a2ba9 100644 --- a/configs/pic32mx7mmb/src/pic32_nsh.c +++ b/configs/pic32mx7mmb/src/pic32_nsh.c @@ -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 */ diff --git a/configs/sama5d3-xplained/src/sam_usb.c b/configs/sama5d3-xplained/src/sam_usb.c index fc40510934e..fd4bf54b26b 100644 --- a/configs/sama5d3-xplained/src/sam_usb.c +++ b/configs/sama5d3-xplained/src/sam_usb.c @@ -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 */ diff --git a/configs/sama5d3x-ek/src/sam_usb.c b/configs/sama5d3x-ek/src/sam_usb.c index a7ea40ed13a..f018d4f9614 100644 --- a/configs/sama5d3x-ek/src/sam_usb.c +++ b/configs/sama5d3x-ek/src/sam_usb.c @@ -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 */ diff --git a/configs/sama5d4-ek/src/sam_usb.c b/configs/sama5d4-ek/src/sam_usb.c index ef6c28bbe1e..4ba85b84d87 100644 --- a/configs/sama5d4-ek/src/sam_usb.c +++ b/configs/sama5d4-ek/src/sam_usb.c @@ -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 */ diff --git a/configs/shenzhou/src/stm32_usb.c b/configs/shenzhou/src/stm32_usb.c index 90840018d88..c0ea7dbbddb 100644 --- a/configs/shenzhou/src/stm32_usb.c +++ b/configs/shenzhou/src/stm32_usb.c @@ -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 */ diff --git a/configs/stm3220g-eval/src/stm32_usb.c b/configs/stm3220g-eval/src/stm32_usb.c index fda57cb8802..d037d8bb6fd 100644 --- a/configs/stm3220g-eval/src/stm32_usb.c +++ b/configs/stm3220g-eval/src/stm32_usb.c @@ -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 */ diff --git a/configs/stm3240g-eval/src/stm32_usb.c b/configs/stm3240g-eval/src/stm32_usb.c index a9a8be2b0f0..449c80af8eb 100644 --- a/configs/stm3240g-eval/src/stm32_usb.c +++ b/configs/stm3240g-eval/src/stm32_usb.c @@ -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 */ diff --git a/configs/stm32f429i-disco/src/stm32_usb.c b/configs/stm32f429i-disco/src/stm32_usb.c index e2b47e588b7..291c025730d 100644 --- a/configs/stm32f429i-disco/src/stm32_usb.c +++ b/configs/stm32f429i-disco/src/stm32_usb.c @@ -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 */ diff --git a/configs/stm32f4discovery/src/stm32_usb.c b/configs/stm32f4discovery/src/stm32_usb.c index 96e5a2a37c2..24f35f726a1 100644 --- a/configs/stm32f4discovery/src/stm32_usb.c +++ b/configs/stm32f4discovery/src/stm32_usb.c @@ -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 diff --git a/configs/sure-pic32mx/src/pic32mx_nsh.c b/configs/sure-pic32mx/src/pic32mx_nsh.c index 47522a275f6..4aa2febcc40 100644 --- a/configs/sure-pic32mx/src/pic32mx_nsh.c +++ b/configs/sure-pic32mx/src/pic32mx_nsh.c @@ -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 */