mirror of
https://gitea.osmocom.org/sim-card/simtrace2.git
synced 2026-03-16 21:28:33 +03:00
host_communication: Send zero-length-packet on wMaxPacketSize
We need to send zero-length packets on bulk endpoints whenever the transfer size is exactly a multiple of the wMaxPacketSize. See USB 2.0 Specification Section 5.8.3 titled "Bulk Transfer Packet Size constraints." Change-Id: Ice3842399d5a5c4a18383860f81074497c6e7c9b Closes: OS#4331
This commit is contained in:
@@ -1077,6 +1077,14 @@ static inline uint8_t UDP_Read(uint8_t bEndpoint,
|
||||
* Exported functions
|
||||
*---------------------------------------------------------------------------*/
|
||||
|
||||
|
||||
uint16_t USBD_GetEndpointSize(uint8_t bEndpoint)
|
||||
{
|
||||
Endpoint *pEndpoint = &(endpoints[bEndpoint]);
|
||||
|
||||
return pEndpoint->size;
|
||||
}
|
||||
|
||||
/**
|
||||
* USBD (UDP) interrupt handler
|
||||
* Manages device resume, suspend, end of bus reset.
|
||||
|
||||
Reference in New Issue
Block a user