I am working on a limited embedded system.
We are currently using a snprintfbuffer, then with a different statement we print a buffer for the serial port:
char temp_buffer[256];
int bytes_written = snprintf(temp_buffer, sizeof(temp_buffer),
"Solar system has %d planets\n",
10);
if (bytes_written > 0)
{
Serial_Port_Output(temp_buffer, bytes_written);
}
I want to switch to printffor direct recording to the serial port. In our compiler documentation, I intercepted a function call to output data to use the serial port. (The interface uses a block record: address and number of characters).
A function printfmay use a character buffer for formatting, such as integer or floating text.
Questions:
- Where is the buffer that it
printfuses for formatting? (Other questioning minds want to know before I make a change.) - , ()?
: Arm7tdmi, (SOC), IAR EW.