I am using multiple UART ports, I was not able to modify the UARTstdio.c or .h file with any success to allow me to use the UARTprintf function with multiple ports, so I am creating my own. Not sure if it will work properly for my end use but its headed in the right direction for now. I was wondering though, how could I add some type of formatting, like a new line, spaces etc. This is just prints an array of chars.
I am not sure how to pass something like "\n" to UARTCharPut()?
Also if you think I am headed in the wrong direction please tell me also, I am very new to this.
Any suggestions or pointing in the right direction would be highly appreciated.
Thank you!
void UARTprint(const char* text) { const char* p; for (p = text; *p != '\0'; p++) { UARTCharPut(UART0_BASE, *p); } }