nuttx-apps/system/cdcacm
2023-10-10 01:02:50 +08:00
..
cdcacm.h system: nxstyle fixes 2021-06-11 02:42:05 -05:00
cdcacm_main.c system: nxstyle fixes 2021-06-11 02:42:05 -05:00
CMakeLists.txt add initial cmake build system 2023-07-08 13:52:02 +08:00
Kconfig Rename CONFIG_LIB_BOARDCTL to CONFIG_BOARDCTL 2021-08-06 11:04:35 +02:00
Make.defs Makefiles: Gregory Nutt: update licenses to Apache 2021-06-07 21:35:33 -05:00
Makefile Revert "fix progname do not match issue" 2023-10-10 01:02:50 +08:00
README.md Rewritten READMEs to Markdown 2020-07-25 01:01:51 -07:00

System / cdcacm USB CDC/ACM serial

This very simple add-on allows the USB CDC/ACM serial device can be dynamically connected and disconnected from a host. This add-on can only be used as an NSH built-in command. If built-in, then two new NSH commands will be supported:

  1. sercon – Connect the CDC/ACM serial device
  2. serdis – Disconnect the CDC/ACM serial device

Configuration prerequisites (not complete):

  • CONFIG_USBDEV=y – USB device support must be enabled
  • CONFIG_CDCACM=y – The CDC/ACM driver must be built

Configuration options specific to this add-on:

  • CONFIG_SYSTEM_CDCACM_DEVMINOR – The minor number of the CDC/ACM device, i.e., the x in /dev/ttyACMx.

If CONFIG_USBDEV_TRACE is enabled (or CONFIG_DEBUG_FEATURES and CONFIG_DEBUG_USB, or CONFIG_USBDEV_TRACE), then the add-on code will also initialize the USB trace output. The amount of trace output can be controlled using:

  • CONFIG_SYSTEM_CDCACM_TRACEINIT – Show initialization events.
  • CONFIG_SYSTEM_CDCACM_TRACECLASS – Show class driver events.
  • CONFIG_SYSTEM_CDCACM_TRACETRANSFERS – Show data transfer events.
  • CONFIG_SYSTEM_CDCACM_TRACECONTROLLER – Show controller events.
  • CONFIG_SYSTEM_CDCACM_TRACEINTERRUPTS – Show interrupt-related events.

Note: This add-on is only enables or disable USB CDC/ACM via the NSH sercon and serdis command. It will enable and disable tracing per the settings before enabling and after disabling the CDC/ACM device. It will not, however, monitor buffered trace data in the interim. If CONFIG_USBDEV_TRACE is defined (and the debug options are not), other application logic will need to monitor the buffered trace data.