Код: Выделить всё
static struct hid_driver kl_hid_driver={
.name = DEVICE_NAME,
.id_table = kl_hid_table,
.probe = kl_hid_probe,
.remove = kl_hid_remove,
.raw_event = kl_hid_raw_event,
};
static int kl_hid_raw_event(struct hid_device *hdev, struct hid_report *report, u8 *data, int size){
printk(KERN_INFO "event r %s\n", data);
return 0;
}
Код: Выделить всё
[ 9361.559726] KL HID device probed: VID=0x55 PID=0x66
[ 9361.560468] kl_custom_hid 0003:0055:0066.003B: hiddev0,hidraw2: USB HID v1.11 Device [bb 1] on usb-0000:02:00.0-2.1/input0
Подробнее здесь: https://stackoverflow.com/questions/797 ... inux-hid-h
Мобильная версия