Skip to content
Permalink
Browse files

samples: cdc_acm: Update CDC ACM Device name

Update device name for USB CDC ACM.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
  • Loading branch information...
finikorg authored and nashif committed Feb 12, 2019
1 parent e2d1c02 commit 995b568b146b4e54bf0a5fc1354ec3ec670dd076
@@ -565,7 +565,7 @@ void main(void)
u32_t baudrate, dtr = 0U;
int ret;

dev = device_get_binding(CONFIG_CDC_ACM_PORT_NAME_0);
dev = device_get_binding("CDC_ACM_0");
if (!dev) {
LOG_ERR("CDC ACM device not found");
return;
@@ -78,7 +78,7 @@ void main(void)
u32_t baudrate, bytes_read, dtr = 0U;
int ret;

dev = device_get_binding(CONFIG_CDC_ACM_PORT_NAME_0);
dev = device_get_binding("CDC_ACM_0");
if (!dev) {
printf("CDC ACM device not found\n");
return;
@@ -10,7 +10,7 @@ CONFIG_USB_DEVICE_STACK=y
CONFIG_USB_DEVICE_PRODUCT="Zephyr CDC ACM sample"
CONFIG_USB_COMPOSITE_DEVICE=y
CONFIG_USB_CDC_ACM=y
CONFIG_CDC_ACM_PORT_1=y
CONFIG_USB_CDC_ACM_DEVICE_COUNT=2

CONFIG_USB_DEVICE_LOG_LEVEL_ERR=y
CONFIG_USB_DRIVER_LOG_LEVEL_ERR=y
@@ -84,17 +84,15 @@ void main(void)
struct device *dev0, *dev1;
u32_t dtr = 0U;

dev0 = device_get_binding(CONFIG_CDC_ACM_PORT_NAME_0);
dev0 = device_get_binding("CDC_ACM_0");
if (!dev0) {
printf("CDC ACM device %s not found\n",
CONFIG_CDC_ACM_PORT_NAME_0);
printf("CDC_ACM_0 device not found\n");
return;
}

dev1 = device_get_binding(CONFIG_CDC_ACM_PORT_NAME_1);
dev1 = device_get_binding("CDC_ACM_1");
if (!dev1) {
printf("CDC ACM device %s not found\n",
CONFIG_CDC_ACM_PORT_NAME_1);
printf("CDC_ACM_1 device not found\n");
return;
}

@@ -12,8 +12,8 @@
void main(void)
{
if (strlen(CONFIG_UART_CONSOLE_ON_DEV_NAME) !=
strlen(CONFIG_CDC_ACM_PORT_NAME_0) ||
strncmp(CONFIG_UART_CONSOLE_ON_DEV_NAME, CONFIG_CDC_ACM_PORT_NAME_0,
strlen("CDC_ACM_0") ||
strncmp(CONFIG_UART_CONSOLE_ON_DEV_NAME, "CDC_ACM_0",
strlen(CONFIG_UART_CONSOLE_ON_DEV_NAME))) {
printk("Error: Console device name is not USB ACM\n");

0 comments on commit 995b568

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