SPRINTF library
Initialisation
Print some data by SPRINTF.
Referencing the internal buffer
Sample code
#include <sprintf.h>
...
// initialisation
SPRINTF_vInit128(); // allocate the internal buffer of 128 bytes
...
static int iCt = 0; // some counter
// write into the internal buffer
SPRINTF_vRewind(); // rewind!
vfPrintf(SPRINTF_Stream, "HELLO %d", 1123);
vfPrintf(SPRINTF_Stream, ",GOODBYE", 1123);
uint16 u16len = SPRINTF_u16Length();
// Output (NUL-terminated, so it can be treated as a string)
vfPrintf(&sSerStream, "%003d: %s"LB,
iCt++,
SPRINTF_pu8GetBuff());
最終更新