本文整理汇总了C++中HID_USB_DEVICE函数的典型用法代码示例。如果您正苦于以下问题:C++ HID_USB_DEVICE函数的具体用法?C++ HID_USB_DEVICE怎么用?C++ HID_USB_DEVICE使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了HID_USB_DEVICE函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: hid_hw_start
goto err_free;
}
ret = hid_hw_start(hdev, HID_CONNECT_DEFAULT);
if (ret) {
hid_err(hdev, "hw start failed\n");
goto err_free;
}
return 0;
err_free:
return ret;
}
static const struct hid_device_id pl_devices[] = {
{ HID_USB_DEVICE(USB_VENDOR_ID_PETALYNX, USB_DEVICE_ID_PETALYNX_MAXTER_REMOTE) },
{ }
};
MODULE_DEVICE_TABLE(hid, pl_devices);
static struct hid_driver pl_driver = {
.name = "petalynx",
.id_table = pl_devices,
.report_fixup = pl_report_fixup,
.input_mapping = pl_input_mapping,
.probe = pl_probe,
};
module_hid_driver(pl_driver);
MODULE_LICENSE("GPL");
开发者ID:03199618,项目名称:linux,代码行数:30,代码来源:hid-petalynx.c
示例17: ts_map_key_clear
case 0x04d: ts_map_key_clear(KEY_SUBTITLE); break;
case 0x050: ts_map_key_clear(KEY_RADIO); break;
case 0x05a: ts_map_key_clear(KEY_TEXT); break;
case 0x05b: ts_map_key_clear(KEY_RED); break;
case 0x05c: ts_map_key_clear(KEY_GREEN); break;
case 0x05d: ts_map_key_clear(KEY_YELLOW); break;
case 0x05e: ts_map_key_clear(KEY_BLUE); break;
default:
return 0;
}
return 1;
}
static const struct hid_device_id ts_devices[] = {
{ HID_USB_DEVICE(USB_VENDOR_ID_TOPSEED, USB_DEVICE_ID_TOPSEED_CYBERLINK) },
{ HID_USB_DEVICE(USB_VENDOR_ID_BTC, USB_DEVICE_ID_BTC_EMPREX_REMOTE) },
{ HID_USB_DEVICE(USB_VENDOR_ID_BTC, USB_DEVICE_ID_BTC_EMPREX_REMOTE_2) },
{ HID_USB_DEVICE(USB_VENDOR_ID_TOPSEED2, USB_DEVICE_ID_TOPSEED2_RF_COMBO) },
{ HID_USB_DEVICE(USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_WIRELESS) },
{ }
};
MODULE_DEVICE_TABLE(hid, ts_devices);
static struct hid_driver ts_driver = {
.name = "topseed",
.id_table = ts_devices,
.input_mapping = ts_input_mapping,
};
module_hid_driver(ts_driver);
开发者ID:020gzh,项目名称:linux,代码行数:30,代码来源:hid-topseed.c
示例18: kovaplus_keep_values_up_to_date
!= USB_INTERFACE_PROTOCOL_MOUSE)
return 0;
if (kovaplus == NULL)
return 0;
kovaplus_keep_values_up_to_date(kovaplus, data);
if (kovaplus->roccat_claimed)
kovaplus_report_to_chrdev(kovaplus, data);
return 0;
}
static const struct hid_device_id kovaplus_devices[] = {
{ HID_USB_DEVICE(USB_VENDOR_ID_ROCCAT, USB_DEVICE_ID_ROCCAT_KOVAPLUS) },
{ }
};
MODULE_DEVICE_TABLE(hid, kovaplus_devices);
static struct hid_driver kovaplus_driver = {
.name = "kovaplus",
.id_table = kovaplus_devices,
.probe = kovaplus_probe,
.remove = kovaplus_remove,
.raw_event = kovaplus_raw_event
};
static int __init kovaplus_init(void)
{
开发者ID:CSCLOG,项目名称:beaglebone,代码行数:31,代码来源:hid-roccat-kovaplus.c
示例19: hid_hw_start
}
ret = hid_hw_start(hdev, HID_CONNECT_DEFAULT | ((quirks & MS_HIDINPUT) ?
HID_CONNECT_HIDINPUT_FORCE : 0));
if (ret) {
dev_err(&hdev->dev, "hw start failed\n");
goto err_free;
}
return 0;
err_free:
return ret;
}
static const struct hid_device_id ms_devices[] = {
{ HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_SIDEWINDER_GV),
.driver_data = MS_HIDINPUT },
{ HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_NE4K),
.driver_data = MS_ERGONOMY },
{ HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_LK6K),
.driver_data = MS_ERGONOMY | MS_RDESC },
{ HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_PRESENTER_8K_USB),
.driver_data = MS_PRESENTER },
{ HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_WIRELESS_OPTICAL_DESKTOP_3_0),
.driver_data = MS_NOGET },
{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_PRESENTER_8K_BT),
.driver_data = MS_PRESENTER },
{ }
};
MODULE_DEVICE_TABLE(hid, ms_devices);
开发者ID:Medvedroid,项目名称:OT_903D-kernel-2.6.35.7,代码行数:31,代码来源:hid-microsoft.c
示例20: HID_USB_DEVICE
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
* Software Foundation; either version 2 of the License, or (at your option)
* any later version.
*/
#include <linux/device.h>
#include <linux/hid.h>
#include <linux/module.h>
#include <linux/usb.h>
#include "hid-ids.h"
#include "usbhid/usbhid.h"
static const struct hid_device_id speedlink_devices[] = {
{ HID_USB_DEVICE(USB_VENDOR_ID_X_TENSIONS, USB_DEVICE_ID_SPEEDLINK_VAD_CEZANNE)},
{ }
};
static int speedlink_input_mapping(struct hid_device *hdev,
struct hid_input *hi,
struct hid_field *field, struct hid_usage *usage,
unsigned long **bit, int *max)
{
/*
* The Cezanne mouse has a second "keyboard" USB endpoint for it is
* able to map keyboard events to the button presses.
* It sends a standard keyboard report descriptor, though, whose
* LEDs we ignore.
*/
switch (usage->hid & HID_USAGE_PAGE) {
开发者ID:AiWinters,项目名称:linux,代码行数:31,代码来源:hid-speedlink.c
注:本文中的HID_USB_DEVICE函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论