SYS_sprintf
2-460
C Interface
Syntax
SYS_sprintf (buffer, format, [arg,] ...);
Parameters
String
buffer;
/* output buffer */
String
format;
/* format specification string */
Arg
arg;
/* optional argument */
Return Value
Void
Description
SYS_sprintf provides a subset of the capabilities found in the standard C
library function printf.
Note:
SYS_sprintf and the related functions are code-intensive. If possible,
applications should use LOG Module module functions to reduce code
size and execution time.
Conversion specifications begin with a % and end with a conversion
character. The conversion characters recognized by SYS_sprintf are
limited to the characters in Table 2-8.
Table 2-8.
Conversion Characters Recognized by SYS_sprintf
Note that the %f conversion character is supported only on devices that
have a native floating point type (for example, the ’C67x).
SYS_sprintf
Output formatted data
Character
Corresponding Output Format
d
signed decimal integer
u
unsigned decimal integer
o
octal integer
x
hexadecimal integer
c
single character
s
NULL-terminated string
p
data pointer