[問題] HID Endpoint跟Report Desc關係

看板ASM作者 (99通未接來電)時間11年前 (2013/04/18 17:24), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/4 (看更多)
hi 各位先進 想請教 Endpoint 跟Repot descriptor 大小的對應關係 我目前拿到一個範例 是正常work沒問題 但是我只要去改EP1或2的大小 或者是Report Count 就會收不到資料 二邊都要絕對定義32個byte(如下列程式) 上層AP Refile 才收的幾乎不會掉 我將input length 改為0x10 資料就會掉的很兇 約只有二成收的到 我的想法為EP buffer這邊32byte 實際定義上只有丟16Byte+1byte(Usage ID) 上面AP也讀回0x11 所以變小應該沒關係吧 但是就一直Timeout掉 看了一些其他的範例 但是還是看不出二個參數相對應的關係 還麻煩各位先進能夠 分享這方面的經驗 謝謝 //AP InputReportByteLength 0x11 //Report ID 0x10 +Report ID 0x01 //EP config #define EP0_PACKET_SIZE 64 //buffer size of endpoint 0 #define EP1_PACKET_SIZE 32 //buffer size of endpoint 1 //for in #define EP2_PACKET_SIZE 32 //buffer size of endpoint 2 //for out code unsigned char ReportDesc[] = { 0x06, 0x00, 0xFF,// ; Usage Page 0x09, 0x01,// ; Usage 0xA1, 0x01, // ; Collection 0x09, 0x01,// ; Usage 0x95, 0x20,//**change 0x10 ; Report Count //**input length 0x75, 0x08,// ; Report Size 0x15, 0x00,// ; Logical Minimum 0x26, 0xFF, 0x00,// ; Logical Maximum 0x81, 0x02,// ; Input 0x09, 0x02,// ; Usage 0x95, 0x20,// ; Report Count//**output length 0x75, 0x08,// ; Report Size 0x91, 0x02,// ; Output 0xC0 }; -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 110.27.114.163
文章代碼(AID): #1HRxl40x (ASM)
文章代碼(AID): #1HRxl40x (ASM)