Skip to content

Commit 2e998cf

Browse files
mathieuchopstmcfriedt
authored andcommitted
drivers: usb: udc: stm32: use instance MPS for IN endpoints capabilities
When setting endpoint capabilities, the driver uses the MPS stored in each instance's configuration for OUT endpoints, but used a hardcoded 1023 for IN endpoints. Use the instance MPS when preparing IN endpoints' capabilities too. Signed-off-by: Mathieu Choplain <[email protected]>
1 parent 0468c5f commit 2e998cf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/usb/udc/udc_stm32.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1521,7 +1521,7 @@ static int udc_stm32_driver_init0(const struct device *dev)
15211521
ep_cfg_in[i].caps.bulk = 1;
15221522
ep_cfg_in[i].caps.interrupt = 1;
15231523
ep_cfg_in[i].caps.iso = 1;
1524-
ep_cfg_in[i].caps.mps = 1023;
1524+
ep_cfg_in[i].caps.mps = cfg->ep_mps;
15251525
}
15261526

15271527
ep_cfg_in[i].addr = USB_EP_DIR_IN | i;

0 commit comments

Comments
 (0)