瀏覽代碼

Do not let HID parser claim boot protocol keyboards

main
PaulStoffregen 7 年之前
父節點
當前提交
1e6d0db268
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. +2
    -0
      hid.cpp

+ 2
- 0
hid.cpp 查看文件

@@ -54,6 +54,8 @@ bool USBHIDParser::claim(Device_t *dev, int type, const uint8_t *descriptors, ui
println(" bInterfaceClass = ", descriptors[5]);
println(" bInterfaceSubClass = ", descriptors[6]);
println(" bInterfaceProtocol = ", descriptors[7]);
// do not claim boot protocol keyboards
if (descriptors[6] == 1 && descriptors[7] == 1) return false;

// hid interface descriptor
uint32_t hidlen = descriptors[9];

Loading…
取消
儲存