mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-01-19 08:23:30 +08:00
[Components][Drivers][USB][Core]fix io request
This commit is contained in:
parent
596d9b427b
commit
c64fa9f059
@ -840,6 +840,10 @@ static rt_err_t _data_notify(udevice_t device, struct ep_msg* ep_msg)
|
||||
{
|
||||
EP_HANDLER(ep, func, ep->request.size);
|
||||
}
|
||||
else
|
||||
{
|
||||
dcd_ep_read_prepare(device->dcd, EP_ADDRESS(ep), ep->request.buffer, ep->request.remain_size > EP_MAXPACKET(ep) ? EP_MAXPACKET(ep) : ep->request.remain_size);
|
||||
}
|
||||
}
|
||||
|
||||
return RT_EOK;
|
||||
@ -973,7 +977,7 @@ static rt_size_t rt_usbd_ep_read_prepare(udevice_t device, uep_t ep, void *buffe
|
||||
RT_ASSERT(buffer != RT_NULL);
|
||||
RT_ASSERT(ep->ep_desc != RT_NULL);
|
||||
|
||||
return dcd_ep_read_prepare(device->dcd, EP_ADDRESS(ep), buffer, size);
|
||||
return dcd_ep_read_prepare(device->dcd, EP_ADDRESS(ep), buffer, size > EP_MAXPACKET(ep) ? EP_MAXPACKET(ep) : size);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user