drivers: udc: do not update MPS for isochronous endpoints
Zero data payload size for isochronous endpoints is a is a valid setting for default interface. Also do not update MPS of control endpoint since it is set by the driver. Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
This commit is contained in:
parent
da3e3d3ed3
commit
e60a4efbb0
|
@ -253,7 +253,6 @@ static void ep_update_mps(const struct device *dev,
|
|||
uint16_t *const mps)
|
||||
{
|
||||
struct udc_device_caps caps = udc_caps(dev);
|
||||
const uint16_t spec_iso_mps = caps.hs ? 1024 : 1023;
|
||||
const uint16_t spec_int_mps = caps.hs ? 1024 : 64;
|
||||
const uint16_t spec_bulk_mps = caps.hs ? 512 : 64;
|
||||
|
||||
|
@ -269,12 +268,10 @@ static void ep_update_mps(const struct device *dev,
|
|||
case USB_EP_TYPE_INTERRUPT:
|
||||
*mps = MIN(cfg->caps.mps, spec_int_mps);
|
||||
break;
|
||||
case USB_EP_TYPE_ISO:
|
||||
*mps = MIN(cfg->caps.mps, spec_iso_mps);
|
||||
break;
|
||||
case USB_EP_TYPE_CONTROL:
|
||||
*mps = 64U;
|
||||
break;
|
||||
__fallthrough;
|
||||
case USB_EP_TYPE_ISO:
|
||||
__fallthrough;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue