EFM32 OTG host: Adam porters fix for STM32 FS/HS probably should be applied to EFM32 host which which has very similar IP.
This commit is contained in:
parent
726ea3c8a9
commit
4b1eecad66
@ -2177,6 +2177,7 @@ static ssize_t efm32_out_transfer(FAR struct efm32_usbhost_s *priv, int chidx,
|
|||||||
size_t xfrlen;
|
size_t xfrlen;
|
||||||
ssize_t xfrd;
|
ssize_t xfrd;
|
||||||
int ret;
|
int ret;
|
||||||
|
bool zlp;
|
||||||
|
|
||||||
/* Loop until the transfer completes (i.e., buflen is decremented to zero)
|
/* Loop until the transfer completes (i.e., buflen is decremented to zero)
|
||||||
* or a fatal error occurs (any error other than a simple NAK)
|
* or a fatal error occurs (any error other than a simple NAK)
|
||||||
@ -2185,8 +2186,9 @@ static ssize_t efm32_out_transfer(FAR struct efm32_usbhost_s *priv, int chidx,
|
|||||||
chan = &priv->chan[chidx];
|
chan = &priv->chan[chidx];
|
||||||
start = clock_systimer();
|
start = clock_systimer();
|
||||||
xfrd = 0;
|
xfrd = 0;
|
||||||
|
zlp = (buflen == 0);
|
||||||
|
|
||||||
while (buflen > 0)
|
while (buflen > 0 || zlp)
|
||||||
{
|
{
|
||||||
/* Transfer one packet at a time. The hardware is capable of queueing
|
/* Transfer one packet at a time. The hardware is capable of queueing
|
||||||
* multiple OUT packets, but I just haven't figured out how to handle
|
* multiple OUT packets, but I just haven't figured out how to handle
|
||||||
@ -2263,6 +2265,7 @@ static ssize_t efm32_out_transfer(FAR struct efm32_usbhost_s *priv, int chidx,
|
|||||||
buffer += xfrlen;
|
buffer += xfrlen;
|
||||||
buflen -= xfrlen;
|
buflen -= xfrlen;
|
||||||
xfrd += chan->xfrd;
|
xfrd += chan->xfrd;
|
||||||
|
zlp = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user