]> git.donarmstrong.com Git - tmk_firmware.git/blobdiff - common/xprintf.h
ps2_usb: Fix README
[tmk_firmware.git] / common / xprintf.h
index cddec994098e1b6525bd7a5209642f4528234ea8..59c6f253123957e4aa7527c0bdc5b47d392563ef 100644 (file)
@@ -8,6 +8,10 @@
 #include <inttypes.h>\r
 #include <avr/pgmspace.h>\r
 \r
+#ifdef __cplusplus\r
+extern "C" {\r
+#endif\r
+\r
 extern void (*xfunc_out)(uint8_t);\r
 #define xdev_out(func) xfunc_out = (void(*)(uint8_t))(func)\r
 \r
@@ -23,7 +27,7 @@ void xputc(char chr);
 \r
 \r
 /*-----------------------------------------------------------------------------*/\r
-void xputs(const prog_char *string);\r
+void xputs(const char *string_p);\r
 \r
 /*  The string placed in the ROM is forwarded to xputc() directly.\r
 */\r
@@ -51,9 +55,9 @@ void xitoa(long value, char radix, char width);
 #define xsprintf(str, format, ...)      __xsprintf(str, PSTR(format), ##__VA_ARGS__)\r
 #define xfprintf(func, format, ...)     __xfprintf(func, PSTR(format), ##__VA_ARGS__)\r
 \r
-void __xprintf(const prog_char *format, ...);  /* Send formatted string to the registered device */\r
-void __xsprintf(char*, const prog_char *format, ...);  /* Put formatted string to the memory */\r
-void __xfprintf(void(*func)(uint8_t), const prog_char *format, ...); /* Send formatted string to the specified device */\r
+void __xprintf(const char *format_p, ...);     /* Send formatted string to the registered device */\r
+void __xsprintf(char*, const char *format_p, ...);     /* Put formatted string to the memory */\r
+void __xfprintf(void(*func)(uint8_t), const char *format_p, ...); /* Send formatted string to the specified device */\r
 \r
 /* Format string is placed in the ROM. The format flags is similar to printf().\r
 \r
@@ -99,5 +103,9 @@ char xatoi(char **str, long *ret);
     Pointer to return value\r
 */\r
 \r
+#ifdef __cplusplus\r
+}\r
+#endif\r
+\r
 #endif\r
 \r