jlaitine commented on code in PR #17010: URL: https://github.com/apache/nuttx/pull/17010#discussion_r2344647494
########## drivers/usbdev/cdcacm.c: ########## @@ -254,6 +254,10 @@ static void cdcuart_dmareceive(FAR struct uart_dev_s *dev); static FAR struct cdcacm_dev_s *g_syslog_cdcacm; #endif +#ifdef CONFIG_SYSTEM_CDCACM +FAR struct usbdevclass_driver_s *g_system_cdcacm; Review Comment: This PR is just to support "sercon" and "serdis" apps also in "CONFIG_BUILD_KERNEL". If sercon is bult as a standalone process, storing the driver pointer in here: https://github.com/apache/nuttx-apps/blob/df711238fee7423ead0f44e1ca039d1d003175bf/system/cdcacm/cdcacm_main.c#L48 https://github.com/apache/nuttx-apps/blob/df711238fee7423ead0f44e1ca039d1d003175bf/system/cdcacm/cdcacm_main.c#L90 just doesn't work. It is gone after the process exits. Also, when initializing the system_cdcacm from board files, the user needs to store the pointer and later pass it to the cdcacm_uninitialize. This is just extra work, there can be only one "system cdcacm" so it can be simply stored in cdcacm driver. This change doesn't break the functionality of existing board files though. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
