drivers: usb: fix usb_dc_ep_mps() for the SAM0 for IN endpoints
The driver was returning zero due to accessing the, say, 0x81'th endpoint instead of the 0x01'th endpoint. Signed-off-by: Michael Hope <mlhx@google.com>
This commit is contained in:
parent
1228a525c1
commit
ad7ea0d498
1 changed files with 1 additions and 1 deletions
|
@ -692,7 +692,7 @@ int usb_dc_ep_mps(const uint8_t ep)
|
|||
uint8_t for_in = ep & USB_EP_DIR_MASK;
|
||||
uint8_t ep_num = ep & ~USB_EP_DIR_MASK;
|
||||
UsbDeviceDescriptor *desc = &data->descriptors[ep_num];
|
||||
UsbDeviceEndpoint *endpoint = ®s->DeviceEndpoint[ep];
|
||||
UsbDeviceEndpoint *endpoint = ®s->DeviceEndpoint[ep_num];
|
||||
|
||||
if (ep_num >= USB_NUM_ENDPOINTS) {
|
||||
LOG_ERR("endpoint index/address out of range");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue