PicoWAN SDK Documentation
xprintf.h
Go to the documentation of this file.
1 
16 #ifndef _STRFUNC
17 #define _STRFUNC
18 
19 #include <stdarg.h>
20 
21 #define _USE_XFUNC_OUT 1 /* 1: Use output functions */
22 #define _CR_CRLF 1 /* 1: Convert \n ==> \r\n in the output char */
23 
24 #define _USE_XFUNC_IN 0 /* 1: Use input function */
25 #define _LINE_ECHO 0 /* 1: Echo back input chars in xgets function */
26 
27 
28 #if _USE_XFUNC_OUT
29 
35 void xputc (char c);
36 
42 void xputs (const char* str);
43 
50 void xvprintf(const char* fmt, va_list arp);
51 
73 void xprintf (const char* fmt, ...);
74 
83 void xsprintf(char* buff, const char* fmt, ...);
84 #define DW_CHAR sizeof(char)
85 #define DW_SHORT sizeof(short)
86 #define DW_LONG sizeof(long)
87 #endif
88 
89 #if _USE_XFUNC_IN
90 int xgetc(void);
91 int xgets(char *buff, int len);
92 int xatoi(char **str, long *res);
93 #endif
94 
95 #endif
void xputc(char c)
Put a character.
Definition: xprintf.c:33
void xputs(const char *str)
Put a null-terminated string.
Definition: xprintf.c:50
void xprintf(const char *fmt,...)
Formatted string output to USART.
Definition: xprintf.c:186
void xsprintf(char *buff, const char *fmt,...)
Formatted string output into a buffer.
Definition: xprintf.c:200
void xvprintf(const char *fmt, va_list arp)
Formatted string output (va_list version).
Definition: xprintf.c:75