[riot-notifications] [RIOT-OS/RIOT] Add stdin pseudo module and set it as dependency for applications using getchar (#11598)

Alexandre Abadie notifications at github.com
Tue Jun 11 07:37:40 CEST 2019


> How about we add..

Do you mean something like this:
```c
ssize_t stdio_read(void* buffer, size_t count)
{
#ifdef MODULE_STDIO_UART_RX
    return (ssize_t)isrpipe_read(&stdio_uart_isrpipe, buffer, count);
#else
#ifdef DEVELHELP
    assert(MODULE_STDIN);
#endif
    (void)buffer;
    (void)count;
    return -ENOTSUP;
#endif
}
```
?

I would rather use `assert(MODULE_STDIO_UART_RX)` because it's specific to UART and `MODULE_STDIN` is more general (and depends on `stdio_uart_rx`).

-- 
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/11598#issuecomment-500694048
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190610/fcdbedc1/attachment.html>


More information about the notifications mailing list