diff options
Diffstat (limited to 'nuttx/drivers')
-rw-r--r-- | nuttx/drivers/usbhost/usbhost_hidkbd.c | 9 | ||||
-rw-r--r-- | nuttx/drivers/usbhost/usbhost_skeleton.c | 2 | ||||
-rw-r--r-- | nuttx/drivers/usbhost/usbhost_storage.c | 9 |
3 files changed, 18 insertions, 2 deletions
diff --git a/nuttx/drivers/usbhost/usbhost_hidkbd.c b/nuttx/drivers/usbhost/usbhost_hidkbd.c index 782069c9f..7cdc41b0b 100644 --- a/nuttx/drivers/usbhost/usbhost_hidkbd.c +++ b/nuttx/drivers/usbhost/usbhost_hidkbd.c @@ -59,6 +59,10 @@ #include <nuttx/usb/usbhost.h> #include <nuttx/usb/hid.h> +/* Don't compile if prerequisites are not met */ + +#if defined(CONFIG_USBHOST) && !defined(CONFIG_USBHOST_INT_DISABLE) && CONFIG_NFILE_DESCRIPTORS > 0 + /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ @@ -654,6 +658,7 @@ static inline int usbhost_cfgdesc(FAR struct usbhost_state_s *priv, epoutdesc.in = false; epoutdesc.funcaddr = funcaddr; epoutdesc.xfrtype = USB_EP_ATTR_XFER_INT; + epoutdesc.interval = epdesc->interval; epoutdesc.mxpacketsize = usbhost_getle16(epdesc->mxpacketsize); uvdbg("Interrupt OUT EP addr:%d mxpacketsize:%d\n", epoutdesc.addr, epoutdesc.mxpacketsize); @@ -680,6 +685,7 @@ static inline int usbhost_cfgdesc(FAR struct usbhost_state_s *priv, epindesc.in = 1; epindesc.funcaddr = funcaddr; epindesc.xfrtype = USB_EP_ATTR_XFER_INT; + epindesc.interval = epdesc->interval; epindesc.mxpacketsize = usbhost_getle16(epdesc->mxpacketsize); uvdbg("Interrupt IN EP addr:%d mxpacketsize:%d\n", epindesc.addr, epindesc.mxpacketsize); @@ -1280,3 +1286,6 @@ int usbhost_kbdinit(void) return usbhost_registerclass(&g_skeleton); } +#endif /* CONFIG_USBHOST)&& !CONFIG_USBHOST_INT_DISABLE && CONFIG_NFILE_DESCRIPTORS */ + + diff --git a/nuttx/drivers/usbhost/usbhost_skeleton.c b/nuttx/drivers/usbhost/usbhost_skeleton.c index d04954f02..fe3d71a28 100644 --- a/nuttx/drivers/usbhost/usbhost_skeleton.c +++ b/nuttx/drivers/usbhost/usbhost_skeleton.c @@ -503,6 +503,7 @@ static inline int usbhost_cfgdesc(FAR struct usbhost_state_s *priv, boutdesc.in = false; boutdesc.funcaddr = funcaddr; boutdesc.xfrtype = USB_EP_ATTR_XFER_BULK; + boutdesc.interval = epdesc->interval; boutdesc.mxpacketsize = usbhost_getle16(epdesc->mxpacketsize); uvdbg("Bulk OUT EP addr:%d mxpacketsize:%d\n", boutdesc.addr, boutdesc.mxpacketsize); @@ -529,6 +530,7 @@ static inline int usbhost_cfgdesc(FAR struct usbhost_state_s *priv, bindesc.in = 1; bindesc.funcaddr = funcaddr; bindesc.xfrtype = USB_EP_ATTR_XFER_BULK; + bindesc.interval = epdesc->interval; bindesc.mxpacketsize = usbhost_getle16(epdesc->mxpacketsize); uvdbg("Bulk IN EP addr:%d mxpacketsize:%d\n", bindesc.addr, bindesc.mxpacketsize); diff --git a/nuttx/drivers/usbhost/usbhost_storage.c b/nuttx/drivers/usbhost/usbhost_storage.c index 286a26885..759d5bd6c 100644 --- a/nuttx/drivers/usbhost/usbhost_storage.c +++ b/nuttx/drivers/usbhost/usbhost_storage.c @@ -56,7 +56,10 @@ #include <nuttx/usb/usbhost.h> #include <nuttx/usb/storage.h> -#if defined(CONFIG_USBHOST) && !defined(CONFIG_DISABLE_MOUNTPOINT) && CONFIG_NFILE_DESCRIPTORS > 0 +/* Don't compile if prerequisites are not met */ + +#if defined(CONFIG_USBHOST) && !defined(CONFIG_USBHOST_BULK_DISABLE) && \ + !defined(CONFIG_DISABLE_MOUNTPOINT) && CONFIG_NFILE_DESCRIPTORS > 0 /**************************************************************************** * Pre-processor Definitions @@ -1039,6 +1042,7 @@ static inline int usbhost_cfgdesc(FAR struct usbhost_state_s *priv, boutdesc.in = false; boutdesc.funcaddr = funcaddr; boutdesc.xfrtype = USB_EP_ATTR_XFER_BULK; + boutdesc.interval = epdesc->interval; boutdesc.mxpacketsize = usbhost_getle16(epdesc->mxpacketsize); uvdbg("Bulk OUT EP addr:%d mxpacketsize:%d\n", boutdesc.addr, boutdesc.mxpacketsize); @@ -1065,6 +1069,7 @@ static inline int usbhost_cfgdesc(FAR struct usbhost_state_s *priv, bindesc.in = 1; bindesc.funcaddr = funcaddr; bindesc.xfrtype = USB_EP_ATTR_XFER_BULK; + bindesc.interval = epdesc->interval; bindesc.mxpacketsize = usbhost_getle16(epdesc->mxpacketsize); uvdbg("Bulk IN EP addr:%d mxpacketsize:%d\n", bindesc.addr, bindesc.mxpacketsize); @@ -2199,4 +2204,4 @@ int usbhost_storageinit(void) return usbhost_registerclass(&g_storage); } -#endif /* CONFIG_USBHOST && !CONFIG_DISABLE_MOUNTPOINT && CONFIG_NFILE_DESCRIPTORS > 0 */ +#endif /* CONFIG_USBHOST && !CONFIG_USBHOST_BULK_DISABLE && !CONFIG_DISABLE_MOUNTPOINT && CONFIG_NFILE_DESCRIPTORS > 0 */ |