C++ HID_USB_DEVICE函数代码示例

本文整理汇总了C++中HID_USB_DEVICE函数的典型用法代码示例。如果您正苦于以下问题:C++ HID_USB_DEVICE函数的具体用法?C++ HID_USB_DEVICE怎么用?C++ HID_USB_DEVICE使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


C++ HID_USB_DEVICE函数代码示例

在下文中一共展示了HID_USB_DEVICE函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: hid_info

0x02, 0x95, 0x05, 0x75, 0x01, 0x91, 0x01, 0x95, 0x06, 0x75, 0x08, 0x15, 0x00,
0x26, 0xff, 0x00, 0x05, 0x07, 0x19, 0x00, 0x2a, 0xff, 0x00, 0x81, 0x00, 0xc0
};

static __u8 *keytouch_report_fixup(struct hid_device *hdev, __u8 *rdesc,
		unsigned int *rsize)
{
	hid_info(hdev, "fixing up Keytouch IEC report descriptor\n");

	rdesc = keytouch_fixed_rdesc;
	*rsize = sizeof(keytouch_fixed_rdesc);

	return rdesc;
}

static const struct hid_device_id keytouch_devices[] = {
	{ HID_USB_DEVICE(USB_VENDOR_ID_KEYTOUCH, USB_DEVICE_ID_KEYTOUCH_IEC) },
	{ }
};
MODULE_DEVICE_TABLE(hid, keytouch_devices);

static struct hid_driver keytouch_driver = {
	.name = "keytouch",
	.id_table = keytouch_devices,
	.report_fixup = keytouch_report_fixup,
};
module_hid_driver(keytouch_driver);

MODULE_LICENSE("GPL");
MODULE_AUTHOR("Jiri Kosina");
开发者ID:mikuhatsune001,项目名称:linux2.6.32,代码行数:30,代码来源:hid-keytouch.c

示例2: hid_parse

{
	int ret;
	struct dj_device *dj_dev = hdev->driver_data;

	if (!is_dj_device(dj_dev))
		return -ENODEV;

	ret = hid_parse(hdev);
	if (!ret)
		ret = hid_hw_start(hdev, HID_CONNECT_DEFAULT);

	return ret;
}

static const struct hid_device_id logi_dj_receivers[] = {
	{HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH,
		USB_DEVICE_ID_LOGITECH_UNIFYING_RECEIVER)},
	{HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH,
		USB_DEVICE_ID_LOGITECH_UNIFYING_RECEIVER_2)},
	{}
};

MODULE_DEVICE_TABLE(hid, logi_dj_receivers);

static struct hid_driver logi_djreceiver_driver = {
	.name = "logitech-djreceiver",
	.id_table = logi_dj_receivers,
	.probe = logi_dj_probe,
	.remove = logi_dj_remove,
	.raw_event = logi_dj_raw_event,
#ifdef CONFIG_PM
	.reset_resume = logi_dj_reset_resume,
开发者ID:FrancescoCG,项目名称:Crazy-Kernel1-TW-Kernel,代码行数:32,代码来源:hid-logitech-dj.c

示例3: switch

if ((usage->hid & HID_USAGE_PAGE) != HID_UP_CONSUMER)
		return 0;

	switch (usage->hid & HID_USAGE) {
	case 0x156: mr_map_key_clear(KEY_WORDPROCESSOR);	break;
	case 0x157: mr_map_key_clear(KEY_SPREADSHEET);		break;
	case 0x158: mr_map_key_clear(KEY_PRESENTATION);		break;
	case 0x15c: mr_map_key_clear(KEY_STOP);			break;
	default:
		return 0;
	}
	return 1;
}

static const struct hid_device_id mr_devices[] = {
	{ HID_USB_DEVICE(USB_VENDOR_ID_MONTEREY, USB_DEVICE_ID_GENIUS_KB29E) },
	{ }
};
MODULE_DEVICE_TABLE(hid, mr_devices);

static struct hid_driver mr_driver = {
	.name = "monterey",
	.id_table = mr_devices,
	.report_fixup = mr_report_fixup,
	.input_mapping = mr_input_mapping,
};

static int __init mr_init(void)
{
	return hid_register_driver(&mr_driver);
}
开发者ID:Adjustxx,项目名称:Savaged-Zen,代码行数:31,代码来源:hid-monterey.c

示例4: hid_hw_start

ret = hid_hw_start(hdev, HID_CONNECT_DEFAULT & ~HID_CONNECT_FF);
	if (ret) {
		dev_err(&hdev->dev, "hw start failed\n");
		goto err;
	}

	zpff_init(hdev);

	return 0;
err:
	return ret;
}

static const struct hid_device_id zp_devices[] = {
	{ HID_USB_DEVICE(USB_VENDOR_ID_ZEROPLUS, 0x0005) },
	{ HID_USB_DEVICE(USB_VENDOR_ID_ZEROPLUS, 0x0030) },
	{ }
};
MODULE_DEVICE_TABLE(hid, zp_devices);

static struct hid_driver zp_driver = {
	.name = "zeroplus",
	.id_table = zp_devices,
	.probe = zp_probe,
};

static int zp_init(void)
{
	return hid_register_driver(&zp_driver);
}
开发者ID:johnny,项目名称:CobraDroidBeta,代码行数:30,代码来源:hid-zpff.c

示例5: kfree

return 0;
err_free:
	kfree(a4);
	return ret;
}

static void a4_remove(struct hid_device *hdev)
{
	struct a4tech_sc *a4 = hid_get_drvdata(hdev);

	hid_hw_stop(hdev);
	kfree(a4);
}

static const struct hid_device_id a4_devices[] = {
	{ HID_USB_DEVICE(USB_VENDOR_ID_A4TECH, USB_DEVICE_ID_A4TECH_WCP32PU),
		.driver_data = A4_2WHEEL_MOUSE_HACK_7 },
	{ HID_USB_DEVICE(USB_VENDOR_ID_A4TECH, USB_DEVICE_ID_A4TECH_X5_005D),
		.driver_data = A4_2WHEEL_MOUSE_HACK_B8 },
	{ }
};
MODULE_DEVICE_TABLE(hid, a4_devices);

static struct hid_driver a4_driver = {
	.name = "a4tech",
	.id_table = a4_devices,
	.input_mapped = a4_input_mapped,
	.event = a4_event,
	.probe = a4_probe,
	.remove = a4_remove,
};
开发者ID:AppEngine,项目名称:linux-2.6,代码行数:31,代码来源:hid-a4tech.c

示例6: koneplus_keep_values_up_to_date

!= USB_INTERFACE_PROTOCOL_MOUSE)
		return 0;

	if (koneplus == NULL)
		return 0;

	koneplus_keep_values_up_to_date(koneplus, data);

	if (koneplus->roccat_claimed)
		koneplus_report_to_chrdev(koneplus, data);

	return 0;
}

static const struct hid_device_id koneplus_devices[] = {
	{ HID_USB_DEVICE(USB_VENDOR_ID_ROCCAT, USB_DEVICE_ID_ROCCAT_KONEPLUS) },
	{ HID_USB_DEVICE(USB_VENDOR_ID_ROCCAT, USB_DEVICE_ID_ROCCAT_KONEXTD) },
	{ }
};

MODULE_DEVICE_TABLE(hid, koneplus_devices);

static struct hid_driver koneplus_driver = {
		.name = "koneplus",
		.id_table = koneplus_devices,
		.probe = koneplus_probe,
		.remove = koneplus_remove,
		.raw_event = koneplus_raw_event
};

static int __init koneplus_init(void)
开发者ID:168519,项目名称:linux,代码行数:31,代码来源:hid-roccat-koneplus.c

示例7: kfree

/* Finally, clean up the g19 data itself */
	kfree(data);
}

static void g19_post_reset_start(struct hid_device *hdev)
{
        unsigned long irq_flags;
	struct g19_data *data = hid_get_g19data(hdev);

	spin_lock_irqsave(&data->lock, irq_flags);
	data->need_reset = 1;
	spin_unlock_irqrestore(&data->lock, irq_flags);
}

static const struct hid_device_id g19_devices[] = {
	{ HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_G19_LCD)
	},
	{ }
};
MODULE_DEVICE_TABLE(hid, g19_devices);

static struct hid_driver g19_driver = {
	.name			= "hid-g19",
	.id_table		= g19_devices,
	.probe			= g19_probe,
	.remove			= g19_remove,
	.raw_event		= g19_raw_event,
};

static int __init g19_init(void)
{
开发者ID:tanktarta,项目名称:lg4l,代码行数:31,代码来源:hid-g19.c

示例8: usbhid_submit_report

usbhid_submit_report(hdev, r, USB_DIR_OUT);
	} else 
		kfree(td);

	return ret;
}

static void mosart_remove(struct hid_device *hdev)
{
	hid_hw_stop(hdev);
	kfree(hid_get_drvdata(hdev));
	hid_set_drvdata(hdev, NULL);
}

static const struct hid_device_id mosart_devices[] = {
	{ HID_USB_DEVICE(USB_VENDOR_ID_ASUS, USB_DEVICE_ID_ASUS_T91MT) },
	{ HID_USB_DEVICE(USB_VENDOR_ID_ASUS, USB_DEVICE_ID_ASUSTEK_MULTITOUCH_YFO) },
	{ HID_USB_DEVICE(USB_VENDOR_ID_TURBOX, USB_DEVICE_ID_TURBOX_TOUCHSCREEN_MOSART) },
	{ }
};
MODULE_DEVICE_TABLE(hid, mosart_devices);

static const struct hid_usage_id mosart_grabbed_usages[] = {
	{ HID_ANY_ID, HID_ANY_ID, HID_ANY_ID },
	{ HID_ANY_ID - 1, HID_ANY_ID - 1, HID_ANY_ID - 1}
};

static struct hid_driver mosart_driver = {
	.name = "mosart",
	.id_table = mosart_devices,
	.probe = mosart_probe,
开发者ID:Socizm-Kernel,项目名称:socizm,代码行数:31,代码来源:hid-mosart.c

示例9: axff_init

error = axff_init(hdev);
	if (error) {
		/*
		 * Do not fail device initialization completely as device
		 * may still be partially operable, just warn.
		 */
		hid_warn(hdev,
			 "Failed to enable force feedback support, error: %d\n",
			 error);
	}

	return 0;
}

static const struct hid_device_id ax_devices[] = {
	{ HID_USB_DEVICE(USB_VENDOR_ID_ACRUX, 0x0802), },
	{ }
};
MODULE_DEVICE_TABLE(hid, ax_devices);

static struct hid_driver ax_driver = {
	.name = "acrux",
	.id_table = ax_devices,
	.probe = ax_probe,
};

static int __init ax_init(void)
{
	return hid_register_driver(&ax_driver);
}
开发者ID:BackupTheBerlios,项目名称:gemini-board,代码行数:30,代码来源:hid-axff.c

示例10: arvo_raw_event

static int arvo_raw_event(struct hid_device *hdev,
		struct hid_report *report, u8 *data, int size)
{
	struct arvo_device *arvo = hid_get_drvdata(hdev);

	if (size != 3)
		return 0;

	if (arvo && arvo->roccat_claimed)
		arvo_report_to_chrdev(arvo, data);

	return 0;
}

static const struct hid_device_id arvo_devices[] = {
	{ HID_USB_DEVICE(USB_VENDOR_ID_ROCCAT, USB_DEVICE_ID_ROCCAT_ARVO) },
	{ }
};

MODULE_DEVICE_TABLE(hid, arvo_devices);

static struct hid_driver arvo_driver = {
	.name = "arvo",
	.id_table = arvo_devices,
	.probe = arvo_probe,
	.remove = arvo_remove,
	.raw_event = arvo_raw_event
};

static int __init arvo_init(void)
{
开发者ID:CSCLOG,项目名称:beaglebone,代码行数:31,代码来源:hid-roccat-arvo.c

示例11: drff_init

ret = drff_init(hdev);
		if (ret) {
			dev_err(&hdev->dev, "force feedback init failed\n");
			hid_hw_stop(hdev);
			goto err;
		}
		break;
	}

	return 0;
err:
	return ret;
}

static const struct hid_device_id dr_devices[] = {
	{ HID_USB_DEVICE(USB_VENDOR_ID_DRAGONRISE, 0x0006),  },
	{ HID_USB_DEVICE(USB_VENDOR_ID_DRAGONRISE, 0x0011),  },
	{ }
};
MODULE_DEVICE_TABLE(hid, dr_devices);

static struct hid_driver dr_driver = {
	.name = "dragonrise",
	.id_table = dr_devices,
	.report_fixup = dr_report_fixup,
	.probe = dr_probe,
};
module_hid_driver(dr_driver);

MODULE_LICENSE("GPL");
开发者ID:vasishath,项目名称:kernel_cancro,代码行数:30,代码来源:hid-dr.c

示例12: __set_bit

 case USB_DEVICE_ID_LENOVO_CBTKBD:
        if (test_bit(EV_REL, hi->input->evbit)) {
            /* set only for trackpoint device */
            __set_bit(INPUT_PROP_POINTER, hi->input->propbit);
            __set_bit(INPUT_PROP_POINTING_STICK,
                      hi->input->propbit);
        }
        break;
    }

    return 0;
}


static const struct hid_device_id lenovo_devices[] = {
    { HID_USB_DEVICE(USB_VENDOR_ID_LENOVO, USB_DEVICE_ID_LENOVO_TPKBD) },
    { HID_USB_DEVICE(USB_VENDOR_ID_LENOVO, USB_DEVICE_ID_LENOVO_CUSBKBD) },
    { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_LENOVO, USB_DEVICE_ID_LENOVO_CBTKBD) },
    { HID_USB_DEVICE(USB_VENDOR_ID_LENOVO, USB_DEVICE_ID_LENOVO_TPPRODOCK) },
    { }
};

MODULE_DEVICE_TABLE(hid, lenovo_devices);

static struct hid_driver lenovo_driver = {
    .name = "lenovo",
    .id_table = lenovo_devices,
    .input_configured = lenovo_input_configured,
    .input_mapping = lenovo_input_mapping,
    .probe = lenovo_probe,
    .remove = lenovo_remove,
开发者ID:ChineseDr,项目名称:linux,代码行数:31,代码来源:hid-lenovo.c

示例13: kfree

if (ret)
		kfree(td);

	return ret;
}

static void quanta_remove(struct hid_device *hdev)
{
	hid_hw_stop(hdev);
	kfree(hid_get_drvdata(hdev));
	hid_set_drvdata(hdev, NULL);
}

static const struct hid_device_id quanta_devices[] = {
	{ HID_USB_DEVICE(USB_VENDOR_ID_QUANTA,
			USB_DEVICE_ID_QUANTA_OPTICAL_TOUCH) },
	{ HID_USB_DEVICE(USB_VENDOR_ID_QUANTA,
			USB_DEVICE_ID_PIXART_IMAGING_INC_OPTICAL_TOUCH_SCREEN) },
	{ }
};
MODULE_DEVICE_TABLE(hid, quanta_devices);

static const struct hid_usage_id quanta_grabbed_usages[] = {
	{ HID_ANY_ID, HID_ANY_ID, HID_ANY_ID },
	{ HID_ANY_ID - 1, HID_ANY_ID - 1, HID_ANY_ID - 1}
};

static struct hid_driver quanta_driver = {
	.name = "quanta-touch",
	.id_table = quanta_devices,
	.probe = quanta_probe,
开发者ID:Aircell,项目名称:asp-kernel,代码行数:31,代码来源:hid-quanta.c

示例14: switch

if ((usage->hid & HID_USAGE_PAGE) != HID_UP_CONSUMER)
		return 0;

	switch (usage->hid & HID_USAGE) {
	case 0x301: ch_map_key_clear(KEY_PROG1);	break;
	case 0x302: ch_map_key_clear(KEY_PROG2);	break;
	case 0x303: ch_map_key_clear(KEY_PROG3);	break;
	default:
		return 0;
	}

	return 1;
}

static const struct hid_device_id ch_devices[] = {
	{ HID_USB_DEVICE(USB_VENDOR_ID_CHERRY, USB_DEVICE_ID_CHERRY_CYMOTION) },
	{ HID_USB_DEVICE(USB_VENDOR_ID_CHERRY, USB_DEVICE_ID_CHERRY_CYMOTION_SOLAR) },
	{ }
};
MODULE_DEVICE_TABLE(hid, ch_devices);

static struct hid_driver ch_driver = {
	.name = "cherry",
	.id_table = ch_devices,
	.report_fixup = ch_report_fixup,
	.input_mapping = ch_input_mapping,
};

static int __init ch_init(void)
{
	return hid_register_driver(&ch_driver);
开发者ID:12rafael,项目名称:jellytimekernel,代码行数:31,代码来源:hid-cherry.c

示例15: hid_hw_start

ret = hid_hw_start(hdev, HID_CONNECT_DEFAULT & ~HID_CONNECT_FF);
	if (ret) {
		dev_err(&hdev->dev, "hw start failed\n");
		goto err;
	}

	gaff_init(hdev);

	return 0;
err:
	return ret;
}

static const struct hid_device_id ga_devices[] = {
	{ HID_USB_DEVICE(USB_VENDOR_ID_GREENASIA, 0x0012),  },
	{ }
};
MODULE_DEVICE_TABLE(hid, ga_devices);

static struct hid_driver ga_driver = {
	.name = "greenasia",
	.id_table = ga_devices,
	.probe = ga_probe,
};

static int __init ga_init(void)
{
	return hid_register_driver(&ga_driver);
}
开发者ID:12rafael,项目名称:jellytimekernel,代码行数:29,代码来源:hid-gaff.c

本文标签属性:

示例:示例英文

代码:代码零九

上一篇:C++ IComponent类代码示例
下一篇:Java JsonFormat.merge方法代码示例

为您推荐