PicoWAN SDK Documentation
|
Universal string handler for user console interface. More...
#include <stdarg.h>
Go to the source code of this file.
Functions | |
void | xputc (char c) |
Put a character. More... | |
void | xputs (const char *str) |
Put a null-terminated string. More... | |
void | xvprintf (const char *fmt, va_list arp) |
Formatted string output (va_list version). More... | |
void | xprintf (const char *fmt,...) |
Formatted string output to USART. More... | |
void | xsprintf (char *buff, const char *fmt,...) |
Formatted string output into a buffer. More... | |
Universal string handler for user console interface.
Copyright (C) 2011, ChaN, all right reserved. Copyright (C) 2018, Archos S.A., all right reserved.
void xprintf | ( | const char * | fmt, |
... | |||
) |
Formatted string output to USART.
This function prints a formatted output (no floating point support).
Call | Output |
---|---|
xprintf("%d", 1234); | "1234" |
xprintf("%6d,%3d%%", -200, 5); | " -200, 5%" |
xprintf("%-6u", 100); | "100 " |
xprintf("%ld", 12345678L); | "12345678" |
xprintf("%04x", 0xA3); | "00a3" |
xprintf("%08LX", 0x123ABC); | "00123ABC" |
xprintf("%016b", 0x550F); | "0101010100001111" |
xprintf("%s", "String"); | "String" |
xprintf("%-4s", "abc"); | "abc " |
xprintf("%4s", "abc"); | " abc" |
xprintf("%c", 'a'); | "a" |
fmt | The formatted output. |
... | Variable list of arguments. |
void xputc | ( | char | c | ) |
Put a character.
c | The character to put. |
void xputs | ( | const char * | str | ) |
Put a null-terminated string.
str | The string to put. |
void xsprintf | ( | char * | buff, |
const char * | fmt, | ||
... | |||
) |
Formatted string output into a buffer.
This function is the same as xprintf(), but will fill a buffer.
fmt | The formatted output. |
... | Variable list of arguments. |
void xvprintf | ( | const char * | fmt, |
va_list | arp | ||
) |
Formatted string output (va_list version).
fmt | The formatted output. |
arp | The list of arguments. |