We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hello forum,
I want to create a I/O stream in Keil and I can't seem to find how to.
In gcc I used FDEV_SETUP_STREAM macro. I just had to provide pointer to functions for writing and reading to/from the stream and the type of the stream (R/W).
A workaround in Keil is to redefine printf or even the low level functions that deal with streams.
However, I'm not interested in the workaround since I want to switch between 2 UARTS and one USB CDC serial stream. I would like to be able to do, like:
stdin = stdout = &UART1_stream; printf("This text is printed via UART1"); stdin = stdout = &UART2_stream; printf("This text is printed via UART2"); ...
Any help appreciated.