diff --git a/zephcore/src/main_companion.cpp b/zephcore/src/main_companion.cpp index 3553e1f..c7ec1b5 100644 --- a/zephcore/src/main_companion.cpp +++ b/zephcore/src/main_companion.cpp @@ -912,7 +912,8 @@ int main(void) * message callback. Unplugged → 1 s timeout, banner is buffered for any * later attach. */ #if ZEPHCORE_USB_STACK && DT_HAS_COMPAT_STATUS_OKAY(zephyr_cdc_acm_uart) && \ - !IS_ENABLED(CONFIG_CDC_ACM_SERIAL_INITIALIZE_AT_BOOT) + !IS_ENABLED(CONFIG_CDC_ACM_SERIAL_INITIALIZE_AT_BOOT) && \ + (IS_ENABLED(CONFIG_USB_CDC_ACM) || IS_ENABLED(CONFIG_USBD_CDC_ACM_CLASS)) zephcore_usbd_init(); zephcore_usbd_wait_dtr(1000); #endif diff --git a/zephcore/src/main_repeater.cpp b/zephcore/src/main_repeater.cpp index 536f99c..85f0bc0 100644 --- a/zephcore/src/main_repeater.cpp +++ b/zephcore/src/main_repeater.cpp @@ -464,7 +464,8 @@ int main(void) * message callback. Unplugged → 2 s timeout, no banner; attached → * banner reaches the user the moment the port opens. */ #if ZEPHCORE_USB_STACK && DT_HAS_COMPAT_STATUS_OKAY(zephyr_cdc_acm_uart) && \ - !IS_ENABLED(CONFIG_CDC_ACM_SERIAL_INITIALIZE_AT_BOOT) + !IS_ENABLED(CONFIG_CDC_ACM_SERIAL_INITIALIZE_AT_BOOT) && \ + (IS_ENABLED(CONFIG_USB_CDC_ACM) || IS_ENABLED(CONFIG_USBD_CDC_ACM_CLASS)) zephcore_usbd_init(); zephcore_usbd_wait_dtr(2000); #endif diff --git a/zephcore/src/main_room_server.cpp b/zephcore/src/main_room_server.cpp index fa04466..3f82cad 100644 --- a/zephcore/src/main_room_server.cpp +++ b/zephcore/src/main_room_server.cpp @@ -482,7 +482,8 @@ int main(void) * message callback. Unplugged → 2 s timeout, no banner; attached → * banner reaches the user the moment the port opens. */ #if ZEPHCORE_USB_STACK && DT_HAS_COMPAT_STATUS_OKAY(zephyr_cdc_acm_uart) && \ - !IS_ENABLED(CONFIG_CDC_ACM_SERIAL_INITIALIZE_AT_BOOT) + !IS_ENABLED(CONFIG_CDC_ACM_SERIAL_INITIALIZE_AT_BOOT) && \ + (IS_ENABLED(CONFIG_USB_CDC_ACM) || IS_ENABLED(CONFIG_USBD_CDC_ACM_CLASS)) zephcore_usbd_init(); zephcore_usbd_wait_dtr(2000); #endif