From 88d59bac405b4f9f0efe1a91def2909579a46600 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20=C3=85str=C3=B6m?= Date: Tue, 3 Mar 2020 07:48:00 +0000 Subject: [PATCH] arch/arm/src/imxrt/imxrt_usbdev.c: Add OUT interrupt endpoint support --- arch/arm/src/imxrt/hardware/imxrt_usbotg.h | 1 + arch/arm/src/imxrt/imxrt_usbdev.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/arch/arm/src/imxrt/hardware/imxrt_usbotg.h b/arch/arm/src/imxrt/hardware/imxrt_usbotg.h index ca71784423..0cdda98e7c 100644 --- a/arch/arm/src/imxrt/hardware/imxrt_usbotg.h +++ b/arch/arm/src/imxrt/hardware/imxrt_usbotg.h @@ -710,6 +710,7 @@ # define USBDEV_ENDPTCTRL_RXT_CTRL (0 << USBDEV_ENDPTCTRL_RXT_SHIFT) /* Control */ # define USBDEV_ENDPTCTRL_RXT_ISOC (1 << USBDEV_ENDPTCTRL_RXT_SHIFT) /* Isochronous */ # define USBDEV_ENDPTCTRL_RXT_BULK (2 << USBDEV_ENDPTCTRL_RXT_SHIFT) /* Bulk */ +# define USBDEV_ENDPTCTRL_RXT_INTR (3 << USBDEV_ENDPTCTRL_RXT_SHIFT) /* Interrupt */ #define USBDEV_ENDPTCTRL_RXS (1 << 0) /* Bit 0: Rx endpoint stall */ /* Device non-core registers */ diff --git a/arch/arm/src/imxrt/imxrt_usbdev.c b/arch/arm/src/imxrt/imxrt_usbdev.c index b1da71a5a9..9d4903e831 100644 --- a/arch/arm/src/imxrt/imxrt_usbdev.c +++ b/arch/arm/src/imxrt/imxrt_usbdev.c @@ -2180,6 +2180,8 @@ static int imxrt_epconfigure(FAR struct usbdev_ep_s *ep, cfg |= USBDEV_ENDPTCTRL_RXT_ISOC; break; case USB_EP_ATTR_XFER_BULK: cfg |= USBDEV_ENDPTCTRL_RXT_BULK; break; + case USB_EP_ATTR_XFER_INT: + cfg |= USBDEV_ENDPTCTRL_RXT_INTR; break; } imxrt_chgbits (0x0000ffff, cfg,