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

Koen Zandberg notifications at github.com
Tue Jun 25 16:39:43 CEST 2019


bergzand commented on this pull request.



> +    return len;
+}
+
+/* flush event */
+void _cdc_acm_flush(usbus_cdcacm_device_t *cdcacm)
+{
+    usbus_event_post(cdcacm->usbus, &cdcacm->flush);
+}
+
+int cdc_init(usbus_t *usbus, usbus_cdcacm_device_t *handler,
+             usbus_cdcacm_cb_t cb, uint8_t *buf, size_t len)
+{
+    memset(handler, 0, sizeof(usbus_cdcacm_device_t));
+    handler->usbus = usbus;
+    tsrb_init(&handler->tsrb, buf, len);
+    handler->handler_ctrl.driver = &cdc_driver;

Good catch! `flags` is set in the `_init` function, but `iface` is never used! I have to check if it can be removed without any future issues though

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/11085#discussion_r297223834
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190625/6bdc0030/attachment.html>


More information about the notifications mailing list