Other Parts Discussed in Thread: SYSCONFIG
I have defined two UART instances. I want to write to console by writing to DebugP_log. I would like different data sent to a terminal window, I am using UART_write for that.
the two instances are autopopulated
#define CONFIG_UART0 (0U)
#define CONFIG_UART_CONSOLE (1U)
I am receiving data both to the console and to the terminal window connected to UART. The console looks fine but the terminal window gets both strings or no data strings.
So I am not able to direct the output correctly. The code below is sending the console data to the console, but both data streams out to the terminal window, that is, the terminal window is also getting the string from DebugP_log interlaced with the UART_write.
If I change the UART_write first parameter to gUartHandle[CONFIG_UART0] I get nothing in the terminal window. This part in particular looks wrong is very confusing to me.
Can you please tell me how, or where the documentation is, to be able to direct the data to a specific UART instance only?
UART_Transaction trans;
UART_Transaction_init(&trans);
DebugP_log("Console out\r\n");
trans.buf = (void *)gUartTxBuffer;
sprintf(trans.buf, "UART out\r\n");
trans.count = strlen(trans.buf);
UART_write(gUartHandle[CONFIG_UART_CONSOLE], &trans);




