[riot-notifications] [RIOT-OS/RIOT] usbus: Add CDC-ACM (Serial console) function (#11085)

Koen Zandberg notifications at github.com
Thu Sep 19 10:48:13 CEST 2019

bergzand commented on this pull request.

> +    usbdev_ep_ready(ep->ep, 0);
+    /* Add interfaces to the stack */
+    usbus_add_interface(usbus, &cdcacm->iface_ctrl);
+    usbus_add_interface(usbus, &cdcacm->iface_data);
+    usbus_handler_set_flag(handler, USBUS_HANDLER_FLAG_RESET);
+static int _setup_handler(usbus_t *usbus, usbus_handler_t *handler,
+                          usbus_setuprq_state_t state, usb_setup_t *setup)
+    (void)state;
+    (void)usbus;
+    usbus_cdcacm_device_t *cdcacm = (usbus_cdcacm_device_t*)handler;
+    DEBUG("Request:0x%x\n", setup->request);

This setup (now named control) function handles control messages from the host computer, for example the host signalling that the serial device is open on the host computer or to configure the baud rate.

Depending on whether CDC ACM is used for STDIO, the debug messages either end up in the `trsb` of the CDC ACM STDIO handler and are transmitted to the host at some point or they are immediately written to (uart|rtt|`/dev/null`).

TL;DR: Yes, the output is going somewhere

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190919/8929c57c/attachment.htm>

More information about the notifications mailing list