This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

app_uart_put() vs. putchar()

I am using a PCA10036 board, and the UART app library in SDK 0.9.2. I have sequestered all of my UART functions into one module. To keep things organized, I would prefer not to include app_uart.h in my main.c. As long as I use calls to putchar() in my main.c, I can do this.

But the documentation for app_uart describes a function, app_uart_put(). The SDK UART example uses app_uart_put() instead of putchar(). Are there any differences between these two functions, once the UART is bound to stdout? My code seems to work, but I wonder whether there are differences in routing or performance.

Would there ever be a reason to create a UART that is not bound to stdout?

Related