android usb HID interrupt transfer
2016/05/23 13:24
瀏覽708
迴響0
推薦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 .
你可能會有興趣的文章:
限會員,要發表迴響,請先登入