Using printf with two UARTs
I have implemented fputc and fgetc in retarget.c to successfully use printf via UART0 on a Cortex-M3. However, I want a second uart channel for additional debug information. How can I integrate this as nicely as I can UART0 using printf? For example, using fprintf to a custom target and checking in fputc which target to send the character to.. E.g. for normal output fprintf(UART0,".."); and for debug output fprintf(UART1,".."); But I cannot see if fopen is called for stdout so I am struggling to see how to manually implement this. (If I just call fprintf(RANDOM_VALUE,..) , I don't know how