arch/arm/src/imxrt/imxrt_usbdev.c: Add OUT interrupt endpoint support

This commit is contained in:
Simon Åström 2020-03-03 07:48:00 +00:00 committed by Xiang Xiao
parent 6baebcecc4
commit 88d59bac40
2 changed files with 3 additions and 0 deletions

View File

@ -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 */

View File

@ -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,