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

Koen Zandberg notifications at github.com
Thu Sep 19 11:20:40 CEST 2019

bergzand commented on this pull request.

> +
+static size_t _gen_full_acm_descriptor(usbus_t *usbus, void *arg)
+    usbus_cdcacm_device_t *cdcacm = (usbus_cdcacm_device_t*)arg;
+    size_t total_len = 0;
+    total_len += _gen_cdc_descriptor(usbus);
+    total_len += _gen_acm_descriptor(usbus);
+    total_len += _gen_union_descriptor(usbus, cdcacm);
+    total_len += _gen_mngt_descriptor(usbus, cdcacm);
+    return total_len;
+/* Submit (ACM interface in) */
+size_t usbus_cdc_acm_submit(usbus_cdcacm_device_t *cdcacm, const uint8_t *buf, size_t len)
+    return tsrb_add(&cdcacm->tsrb, buf, len);

> Note: I'm going to have to modify this to a `tsrb_add_one()` wrapped in a `while(buf)`. `tsrb_add_one()` is not blocking and then it can break as soon as the tsrb is full. This will prevent a hang when the `tsrb` is full.

Never mind this, I had some misunderstanding about the working of `tsrb_add()`

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/83674acc/attachment.htm>

More information about the notifications mailing list