Skip to content
Permalink
Browse files

samples: hid-cdc: Update USB device names and project conf

Update project configuration and USB HID and CDC ACM device names for
sample hid-cdc.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
  • Loading branch information...
finikorg authored and nashif committed Mar 5, 2019
1 parent 995b568 commit da701f9d555a64cd9534bb19bc4a914adb0991cb
Showing with 7 additions and 6 deletions.
  1. +3 −2 samples/subsys/usb/hid-cdc/prj.conf
  2. +4 −4 samples/subsys/usb/hid-cdc/src/main.c
@@ -6,14 +6,15 @@ CONFIG_ENTROPY_GENERATOR=y
CONFIG_ENTROPY_DEVICE_RANDOM_GENERATOR=y

CONFIG_USB_DEVICE_HID=y
CONFIG_USB_HID_DEVICE_1=y
CONFIG_USB_HID_DEVICE_COUNT=2

CONFIG_LOG=y
CONFIG_USB_DRIVER_LOG_LEVEL_INF=y
CONFIG_USB_DEVICE_LOG_LEVEL_INF=y

CONFIG_USB_CDC_ACM=y
CONFIG_CDC_ACM_PORT_1=y
CONFIG_USB_CDC_ACM_DEVICE_COUNT=2

CONFIG_SERIAL=y
CONFIG_UART_INTERRUPT_DRIVEN=y
CONFIG_UART_LINE_CTRL=y
@@ -559,25 +559,25 @@ void main(void)

/* Configure devices */

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

hid1_dev = device_get_binding(CONFIG_USB_HID_DEVICE_NAME_1);
hid1_dev = device_get_binding("HID_1");
if (hid1_dev == NULL) {
LOG_ERR("Cannot get USB HID 1 Device");
return;
}

cdc0_dev = device_get_binding(CONFIG_CDC_ACM_PORT_NAME_0);
cdc0_dev = device_get_binding("CDC_ACM_0");
if (cdc0_dev == NULL) {
LOG_ERR("Cannot get USB CDC 0 Device");
return;
}

cdc1_dev = device_get_binding(CONFIG_CDC_ACM_PORT_NAME_1);
cdc1_dev = device_get_binding("CDC_ACM_1");
if (cdc1_dev == NULL) {
LOG_ERR("Cannot get USB CDC 1 Device");
return;

0 comments on commit da701f9

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