summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsakumisu <[email protected]>2025-05-15 20:51:37 +0800
committersakumisu <[email protected]>2025-05-15 20:51:37 +0800
commite301e1f0a961a00495519ceee8d0b3ec2ba1e77d (patch)
tree30c8b268a04d12f1ad37844c950961711cb24609
parent401dded10ae33bd9c015789065f8b6588bbb7a09 (diff)
update(port/fsdev): assert for fsdev iso
Signed-off-by: sakumisu <[email protected]>
-rw-r--r--port/fsdev/usb_dc_fsdev.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/port/fsdev/usb_dc_fsdev.c b/port/fsdev/usb_dc_fsdev.c
index ad5c228e..c6ffd5aa 100644
--- a/port/fsdev/usb_dc_fsdev.c
+++ b/port/fsdev/usb_dc_fsdev.c
@@ -135,6 +135,7 @@ int usbd_ep_open(uint8_t busid, const struct usb_endpoint_descriptor *ep)
uint8_t ep_idx = USB_EP_GET_IDX(ep->bEndpointAddress);
USB_ASSERT_MSG(ep_idx < CONFIG_USBDEV_EP_NUM, "Ep addr %02x overflow", ep->bEndpointAddress);
+ USB_ASSERT_MSG(USB_GET_ENDPOINT_TYPE(ep->bmAttributes) != USB_ENDPOINT_TYPE_ISOCHRONOUS, "iso endpoint not support in fsdev");
uint16_t wEpRegVal;
@@ -154,11 +155,10 @@ int usbd_ep_open(uint8_t busid, const struct usb_endpoint_descriptor *ep)
case USB_ENDPOINT_TYPE_ISOCHRONOUS:
wEpRegVal = USB_EP_ISOCHRONOUS;
- USB_LOG_ERR("Do not support iso in fsdev\r\n");
- return -1;
+ break;
default:
- break;
+ return -1;
}
PCD_SET_EPTYPE(USB, ep_idx, wEpRegVal);