網路城邦
上一篇 回創作列表 下一篇   字體:
android usb HID interrupt transfer
2016/05/23 13:24:37瀏覽738|回應0|推薦0

A class representing USB request packet. This can be used for both reading and writing data to or from a UsbDeviceConnection. UsbRequests can be used to transfer data on bulk and interrupt endpoints. Requests on bulk endpoints can be sent synchronously via bulkTransfer(UsbEndpoint, byte[], int, int) or asynchronously via queue(ByteBuffer, int) and requestWait(). Requests on interrupt endpoints are only send and received asynchronously.


google有提到, HID的中斷傳輸可以用queue完成.可以不用bulkTransfer及controlTransfer

寫code時,最好拿到USB protocol分析儀看一下android手機送出的封包. google上查到的範例code,很多作者沒寫好.可以用,但是有bug .

( 心情隨筆心情日記 )
回應 列印 加入我的文摘
上一篇 回創作列表 下一篇

引用
引用網址:https://classic-blog.udn.com/article/trackback.jsp?uid=greatcat&aid=58316671