LZ,可以参考CyAPI.chm
在CyAPI.chm中的CCyUSBEndPoint有关于Endpoint Address和MaxPacketSize说明
Description
Address contains the value of the bEndpointAddress field of the endpoint descriptor returned by the device.
Addresses with the high-order bit set (0x8_) are IN endpoints.
Addresses with the high-order bit cleared (0x0_) are OUT endpoints.
The default control endpoint (ControlEndPt) has Address = 0.
Example
// Find a second bulk IN endpoint in the EndPoints[] array
CCyUSBDevice *USBDevice = new CCyUSBDevice(Handle);
CCyBulkEndPoint *BulkIn2 = NULL;
int eptCount = USBDevice->EndPointCount();
for (int i=1; i<eptCount; i++) { bool bIn = USBDevice->EndPoints->Address & 0x80; bool bBulk = (USBDevice->EndPoints->Attributes == 2);
if (bBulk && bIn) BulkIn2 = (CCyBulkEndPoint *) USBDevice->EndPoints; if (BulkIn2 == BulkInEndPt) BulkIn2 = NULL; }
楼主也可以到CY网站下载CY USB的技术参考手册EZ-USB(R): Technical Reference Manual (TRM) http://www.cypress.com/?rID=14667 也有EndpointAddress和MaxPacketSize的详细介绍。 呵呵,希望有所帮助! 相关链接:https://bbs.21ic.com/upfiles/img/20096/200963018025758.zip
|
|