pico-sdk
pico-sdk copied to clipboard
Allow disabling pico_stdio function wrapping
This PR copies the approach used by pico_printf and applies it to pico_stdio to allow a developer to opt out of stdio printf/putchar/etc. wrappers. This is done with the use of a new function pico_set_stdio_implementation which works identically to pico_set_printf_implementation from pico_printf.
This enables a developer to opt out of stdio wrappers around the following functions:
- printf
- vprintf
- puts
- putchar
- getchar
Additionally, in pico_stdio's stdio.c, some additional #if/#endif are applied to shut up compiler warnings about unused functions when pico_printf compiler implementation is in use.
Fixes #1634
Looks reasonable as far as I can see
I noticed a useless newline I added in stdio.c, so I just took that out. No other changes with the update.