[riot-notifications] [RIOT] sys: factor stdio uart functions out of newlib's syscalls (#3161)
notifications at github.com
Thu Jun 4 18:02:56 CEST 2015
I look at it the following way: Take e.g. the `_read_r()` function in the syscalls. Currently it calls `uart_stdio_read()`. Say there is now another stdio implementation with the function `socket_stdio_read()`. When you want to switch to this, you would have another `_read_r()` function that calls `socket_stdio_read()`, or have some `#ifdef` inside `_read_r()` to decide which of the two above to call.
When now renaming the interace functions to something without the reference to its implementation (e.g. `stdio_read()` or similar), then you can just compile in one of the implementing modules and there is no need in code changes (or `#ifedfs`) in `syscalls.c`.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the notifications