Only allow one packet in TX fifos.

This fixes a problem where packets were written too quickly.
The hardware disabled the endpoint after the fist packet is sent,
and others just waited in the queue.
This commit is contained in:
Gareth McMullin 2011-11-12 21:44:37 +13:00
parent 7546ad9736
commit 30e188cf07
1 changed files with 1 additions and 1 deletions

View File

@ -245,7 +245,7 @@ static u16 stm32f107_ep_write_packet(u8 addr, const void *buf, u16 len)
addr &= 0x7F;
/* Return if endpoint is already enabled. */
if(OTG_FS_DTXFSTS(addr) < (len >> 2))
if(OTG_FS_DIEPTSIZ(addr) & OTG_FS_DIEPSIZ0_PKTCNT)
return 0;
/* Enable endpoint for transmission */