Skip to content
Permalink
Browse files

samples: usb: Correct USB HID device name

Use "HID_0" as a device name since we have only device count now.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
  • Loading branch information...
finikorg authored and nashif committed Feb 12, 2019
1 parent fbd2713 commit 1b3227fd999c924f34ac527c0857b02e08a5bb66
@@ -194,7 +194,7 @@ void main(void)
return;
}

hid_dev = device_get_binding(CONFIG_USB_HID_DEVICE_NAME_0);
hid_dev = device_get_binding("HID_0");
if (hid_dev == NULL) {
LOG_ERR("Cannot get USB HID Device");
return;
@@ -223,7 +223,7 @@ void main(void)
return;
}

hid_dev = device_get_binding(CONFIG_USB_HID_DEVICE_NAME_0);
hid_dev = device_get_binding("HID_0");
if (hid_dev == NULL) {
LOG_ERR("Cannot get USB HID Device");
return;
@@ -121,7 +121,7 @@ void main(void)
k_delayed_work_init(&delayed_report_send, send_report);

#ifndef CONFIG_USB_COMPOSITE_DEVICE
hdev = device_get_binding(CONFIG_USB_HID_DEVICE_NAME_0);
hdev = device_get_binding("HID_0");
if (hdev == NULL) {
LOG_ERR("Cannot get USB HID Device");
return;
@@ -138,7 +138,7 @@ void main(void)
#ifdef CONFIG_USB_COMPOSITE_DEVICE
static int composite_pre_init(struct device *dev)
{
hdev = device_get_binding(CONFIG_USB_HID_DEVICE_NAME_0);
hdev = device_get_binding("HID_0");
if (hdev == NULL) {
LOG_ERR("Cannot get USB HID Device");
return -ENODEV;
@@ -103,7 +103,7 @@ void hid_thread(void)

LOG_DBG("Starting application");

hid_dev = device_get_binding(CONFIG_USB_HID_DEVICE_NAME_0);
hid_dev = device_get_binding("HID_0");
if (hid_dev == NULL) {
LOG_ERR("Cannot get USB HID Device");
return;

0 comments on commit 1b3227f

Please sign in to comment.
You can’t perform that action at this time.