我们分析的这个usb鼠标是一个输入类型的中断传输。
既然是输入类型,必然要做好接收。
而一个端点中,一次事务中,传输的的最大字节数即量是在端点描述符中定义的。
/* USB_DT_ENDPOINT: Endpoint descriptor */
struct usb_endpoint_descriptor {
__u8 bLength;
__u8 bDescriptorType;
__u8 bEndpointAddress;
__u8 bmAttributes;
__le16 wMaxPacketSize; //一次传输最大数据包
__u8 bInterval;
/* NOTE: these two are _only_ in audio endpoints. */
/* use USB_DT_ENDPOINT*_SIZE in bLength, not sizeof. */
__u8 bRefresh;
__u8 bSynchAddress;
} __attribute__ ((packed));
对于对于usb鼠标设备,从端点描述中获取最大数据包字节数。
上图给出了高速,全速,低速设备每种传输下的最大字节数。
&nb