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

Koen Zandberg notifications at github.com
Sat Jun 15 20:07:32 CEST 2019


bergzand commented on this pull request.



> +    int fd = filp->private_data.value;
+    if (fd == STDIN_FILENO) {
+        return -EBADF;
+    }
+    return uart_stdio_write(src, nbytes);
+}
+#endif
+
+void stdio_init(void)
+{
+    /* Initialize this side of the CDC ACM pipe */
+#if MODULE_VFS
+    int fd;
+    fd = vfs_bind(STDIN_FILENO, O_RDONLY, &uart_stdio_vfs_ops, (void *)STDIN_FILENO);
+    if (fd < 0) {
+        /* How to handle errors on init? */

Not my question though, I've copied it from other stdio implementation, the question remained unanswered so far…

-- 
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_r294055229
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190615/f0fe90f2/attachment.html>


More information about the notifications mailing list