diff --git a/configs/sama5d3-xplained/src/sam_usb.c b/configs/sama5d3-xplained/src/sam_usb.c index ee019a0219..6963ab6753 100644 --- a/configs/sama5d3-xplained/src/sam_usb.c +++ b/configs/sama5d3-xplained/src/sam_usb.c @@ -312,6 +312,7 @@ int sam_usbhost_initialize(void) } #endif +#ifdef CONFIG_USBHOST_MSC /* Register theUSB host Mass Storage Class */ ret = usbhost_storageinit(); @@ -319,7 +320,9 @@ int sam_usbhost_initialize(void) { udbg("ERROR: Failed to register the mass storage class: %d\n", ret); } +#endif +#ifdef CONFIG_USBHOST_HIDKBD /* Register the USB host HID keyboard class driver */ ret = usbhost_kbdinit(); @@ -327,6 +330,7 @@ int sam_usbhost_initialize(void) { udbg("ERROR: Failed to register the KBD class\n"); } +#endif /* Then get an instance of the USB host interface. */ diff --git a/configs/sama5d3x-ek/src/sam_usb.c b/configs/sama5d3x-ek/src/sam_usb.c index 524f4dcd33..a7ea40ed13 100644 --- a/configs/sama5d3x-ek/src/sam_usb.c +++ b/configs/sama5d3x-ek/src/sam_usb.c @@ -310,6 +310,7 @@ int sam_usbhost_initialize(void) } #endif +#ifdef CONFIG_USBHOST_MSC /* Register the USB host Mass Storage Class */ ret = usbhost_storageinit(); @@ -317,7 +318,9 @@ int sam_usbhost_initialize(void) { udbg("ERROR: Failed to register the mass storage class: %d\n", ret); } +#endif +#ifdef CONFIG_USBHOST_HIDKBD /* Register the USB host HID keyboard class driver */ ret = usbhost_kbdinit(); @@ -325,6 +328,7 @@ int sam_usbhost_initialize(void) { udbg("ERROR: Failed to register the KBD class\n"); } +#endif /* Then get an instance of the USB host interface. */ diff --git a/configs/sama5d4-ek/src/sam_usb.c b/configs/sama5d4-ek/src/sam_usb.c index 5bf29ea34f..8f025c2505 100644 --- a/configs/sama5d4-ek/src/sam_usb.c +++ b/configs/sama5d4-ek/src/sam_usb.c @@ -311,6 +311,7 @@ int sam_usbhost_initialize(void) } #endif +#ifdef CONFIG_USBHOST_MSC /* Register the USB host Mass Storage Class */ ret = usbhost_storageinit(); @@ -318,7 +319,9 @@ int sam_usbhost_initialize(void) { udbg("ERROR: Failed to register the mass storage class: %d\n", ret); } +#endif +#ifdef CONFIG_USBHOST_HIDKBD /* Register the USB host HID keyboard class driver */ ret = usbhost_kbdinit(); @@ -326,6 +329,7 @@ int sam_usbhost_initialize(void) { udbg("ERROR: Failed to register the KBD class\n"); } +#endif /* Then get an instance of the USB host interface. */