Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
8 years, 3 months ago.
vfprintf and printf on mbed
I was wondering what is the use of API
void mbed_error_printf(const char* format, ...)
is it if I called printf inside mbed main function, it should direct the characters to UART peripheral which is connected to PC?
1 Answer
8 years, 3 months ago.
Hello Mohamed,
Yes calling this function will print the message to the stdio_uart, usually it is the UART peripheral connected to your PC.
Note that this function is not a replacement for printf, it use vsprintf to format the message in a 128 byte buffer then put every character in the serial. Unlike printf, it is not buffered and the size of the formatted messages is limited to 128 characters.