谢谢。这就解决了最初的问题。现在我试图添加一个输出报告,枚举失败。我假设它是简单的…0x05,0x09,0/0x04,0/04,//用法(操纵杆)0xa1,0x01,//收藏(应用)0x09,0x04,//使用(操纵杆)0xa1,0x00,//集合(物理)0x85,0x01,//报告ID(1)0x05,0x09,//使用页(按钮)0x19,0x01,//US。年龄最小(Button 1)0x29,0x02,/使用最大值(按钮2)0x15,0x00,//逻辑最小值(0)0x25,0x01,/逻辑最大值(1)0x95,0x08,/ /报告计数(8)仅使用0x75,0x01,/ /报告大小(1)0x81a,0x02,//输入(数据,瓦尔河,ABS)0xC0,/ /结束收集(物理)/添加代码低于0x06,0x00,0xFF,//Usage页(厂商定义页1)0x09,0x01,//用法(供应商使用率)0xa1,0x02,//集合(逻辑)0x85,0x02,/ /报告ID(2)0x15,0x00,/逻辑最小值(0)0x25,0x01,/逻辑最大值(1)0x75,0x01,/报告大小(1)0x95,0x01,/报告计数(8)0x91,0x02,//输出(数据,瓦尔河,ABS)0xC0,/ /结束收集(逻辑)0xC0,/ /结束收集(应用)
以上来自于百度翻译
以下为原文
Thanks. That fixed the initial problem. Now I'm trying to add an output report and enumeration fails. I assume it's something simple...
0x05, 0x01, // USAGE_PAGE (Generic Desktop)
0x09, 0x04, // USAGE (JoyStick)
0xA1, 0x01, // Collection (Application)
0x09, 0x04, // USAGE (Joystick)
0xA1, 0x00, // Collection (Physical)
0x85, 0x01, // Report ID (1)
0x05, 0x09, // USAGE_PAGE (Button)
0x19, 0x01, // Usage Minimum (Button1)
0x29, 0x02, // Usage Maximum (Button 2)
0x15, 0x00, // Logical Minimum (0)
0x25, 0x01, // Logical Maximum (1)
0x95, 0x08, // Report Count (8) only 2 used
0x75, 0x01, // Report Size (1)
0x81, 0x02, // Input (Data,Var,Abs)
0xC0, // End Collection (Physical)
//Added code below
0x06, 0x00, 0xFF, // USAGE_PAGE (Vendor Defined Page 1)
0x09, 0x01, // USAGE (Vendor Usage 1)
0xA1, 0x02, // Collection (Logical)
0x85, 0x02, // Report ID (2)
0x15, 0x00, // Logical Minimum (0)
0x25, 0x01, // Logical Maximum (1)
0x75, 0x01, // Report Size (1)
0x95, 0x01, // Report Count (8)
0x91, 0x02, // Output (Data,Var,Abs)
0xC0, // End Collection (Logical)
0xC0, // End Collection (Application)
谢谢。这就解决了最初的问题。现在我试图添加一个输出报告,枚举失败。我假设它是简单的…0x05,0x09,0/0x04,0/04,//用法(操纵杆)0xa1,0x01,//收藏(应用)0x09,0x04,//使用(操纵杆)0xa1,0x00,//集合(物理)0x85,0x01,//报告ID(1)0x05,0x09,//使用页(按钮)0x19,0x01,//US。年龄最小(Button 1)0x29,0x02,/使用最大值(按钮2)0x15,0x00,//逻辑最小值(0)0x25,0x01,/逻辑最大值(1)0x95,0x08,/ /报告计数(8)仅使用0x75,0x01,/ /报告大小(1)0x81a,0x02,//输入(数据,瓦尔河,ABS)0xC0,/ /结束收集(物理)/添加代码低于0x06,0x00,0xFF,//Usage页(厂商定义页1)0x09,0x01,//用法(供应商使用率)0xa1,0x02,//集合(逻辑)0x85,0x02,/ /报告ID(2)0x15,0x00,/逻辑最小值(0)0x25,0x01,/逻辑最大值(1)0x75,0x01,/报告大小(1)0x95,0x01,/报告计数(8)0x91,0x02,//输出(数据,瓦尔河,ABS)0xC0,/ /结束收集(逻辑)0xC0,/ /结束收集(应用)
以上来自于百度翻译
以下为原文
Thanks. That fixed the initial problem. Now I'm trying to add an output report and enumeration fails. I assume it's something simple...
0x05, 0x01, // USAGE_PAGE (Generic Desktop)
0x09, 0x04, // USAGE (JoyStick)
0xA1, 0x01, // Collection (Application)
0x09, 0x04, // USAGE (Joystick)
0xA1, 0x00, // Collection (Physical)
0x85, 0x01, // Report ID (1)
0x05, 0x09, // USAGE_PAGE (Button)
0x19, 0x01, // Usage Minimum (Button1)
0x29, 0x02, // Usage Maximum (Button 2)
0x15, 0x00, // Logical Minimum (0)
0x25, 0x01, // Logical Maximum (1)
0x95, 0x08, // Report Count (8) only 2 used
0x75, 0x01, // Report Size (1)
0x81, 0x02, // Input (Data,Var,Abs)
0xC0, // End Collection (Physical)
//Added code below
0x06, 0x00, 0xFF, // USAGE_PAGE (Vendor Defined Page 1)
0x09, 0x01, // USAGE (Vendor Usage 1)
0xA1, 0x02, // Collection (Logical)
0x85, 0x02, // Report ID (2)
0x15, 0x00, // Logical Minimum (0)
0x25, 0x01, // Logical Maximum (1)
0x75, 0x01, // Report Size (1)
0x95, 0x01, // Report Count (8)
0x91, 0x02, // Output (Data,Var,Abs)
0xC0, // End Collection (Logical)
0xC0, // End Collection (Application)
举报