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

Alexandre Abadie notifications at github.com
Thu Sep 19 10:47:36 CEST 2019

aabadie commented on this pull request.

> +    /* Use tsrb and flush */
+    return len;
+static void _cdc_acm_rx_pipe(usbus_cdcacm_device_t *cdcacm,
+                             uint8_t *data, size_t len)
+    (void)cdcacm;
+    for (size_t i = 0; i < len; i++) {
+        isrpipe_write_one(&cdc_stdio_isrpipe, data[i]);
+    }
+void usb_cdc_acm_stdio_init(usbus_t *usbus)
+    usbus_cdc_acm_init(usbus, &cdcacm, _cdc_acm_rx_pipe, NULL,

How could the coding_cb function could be updated (it's NULL by default) after the CDC ACM stdio is initialized ? I'm thinking of the Arduino MKR (and any board flashed via bossa) where we could provide a way to automatically reset the board to bootloader mode when the host open the TTY with a given baudrate: This is what is done on Arduino: when the stdio serial is opened at 1200 baud, the board reboot in bootloader mode and bossa can flash the board after that.
Maybe add a setter function to the API for this ? Maybe I'm missing something obvious in the STDIO initialization workflow.

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

More information about the notifications mailing list