diff options
Diffstat (limited to 'tmk_core/common/avr/xprintf.h')
-rw-r--r-- | tmk_core/common/avr/xprintf.h | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/tmk_core/common/avr/xprintf.h b/tmk_core/common/avr/xprintf.h index 08d9f93a0..70e0f8e48 100644 --- a/tmk_core/common/avr/xprintf.h +++ b/tmk_core/common/avr/xprintf.h | |||
@@ -13,7 +13,7 @@ extern "C" { | |||
13 | #endif | 13 | #endif |
14 | 14 | ||
15 | extern void (*xfunc_out)(uint8_t); | 15 | extern void (*xfunc_out)(uint8_t); |
16 | #define xdev_out(func) xfunc_out = (void(*)(uint8_t))(func) | 16 | #define xdev_out(func) xfunc_out = (void (*)(uint8_t))(func) |
17 | 17 | ||
18 | /* This is a pointer to user defined output function. It must be initialized | 18 | /* This is a pointer to user defined output function. It must be initialized |
19 | before using this modle. | 19 | before using this modle. |
@@ -25,13 +25,11 @@ void xputc(char chr); | |||
25 | All outputs from this module are output via this function. | 25 | All outputs from this module are output via this function. |
26 | */ | 26 | */ |
27 | 27 | ||
28 | |||
29 | /*-----------------------------------------------------------------------------*/ | 28 | /*-----------------------------------------------------------------------------*/ |
30 | void xputs(const char *string_p); | 29 | void xputs(const char *string_p); |
31 | 30 | ||
32 | /* The string placed in the ROM is forwarded to xputc() directly. | 31 | /* The string placed in the ROM is forwarded to xputc() directly. |
33 | */ | 32 | */ |
34 | |||
35 | 33 | ||
36 | /*-----------------------------------------------------------------------------*/ | 34 | /*-----------------------------------------------------------------------------*/ |
37 | void xitoa(long value, char radix, char width); | 35 | void xitoa(long value, char radix, char width); |
@@ -49,13 +47,12 @@ void xitoa(long value, char radix, char width); | |||
49 | 0x55 2 -8 "01010101" | 47 | 0x55 2 -8 "01010101" |
50 | */ | 48 | */ |
51 | 49 | ||
52 | |||
53 | /*-----------------------------------------------------------------------------*/ | 50 | /*-----------------------------------------------------------------------------*/ |
54 | #define xprintf(format, ...) __xprintf(PSTR(format), ##__VA_ARGS__) | 51 | #define xprintf(format, ...) __xprintf(PSTR(format), ##__VA_ARGS__) |
55 | #define xsprintf(str, format, ...) __xsprintf(str, PSTR(format), ##__VA_ARGS__) | 52 | #define xsprintf(str, format, ...) __xsprintf(str, PSTR(format), ##__VA_ARGS__) |
56 | #define xfprintf(func, format, ...) __xfprintf(func, PSTR(format), ##__VA_ARGS__) | 53 | #define xfprintf(func, format, ...) __xfprintf(func, PSTR(format), ##__VA_ARGS__) |
57 | 54 | ||
58 | void __xprintf(const char *format_p, ...); /* Send formatted string to the registered device */ | 55 | void __xprintf(const char *format_p, ...); /* Send formatted string to the registered device */ |
59 | // void __xsprintf(char*, const char *format_p, ...); /* Put formatted string to the memory */ | 56 | // void __xsprintf(char*, const char *format_p, ...); /* Put formatted string to the memory */ |
60 | // void __xfprintf(void(*func)(uint8_t), const char *format_p, ...); /* Send formatted string to the specified device */ | 57 | // void __xfprintf(void(*func)(uint8_t), const char *format_p, ...); /* Send formatted string to the specified device */ |
61 | 58 | ||
@@ -84,7 +81,6 @@ void __xprintf(const char *format_p, ...); /* Send formatted string to the regis | |||
84 | 81 | ||
85 | */ | 82 | */ |
86 | 83 | ||
87 | |||
88 | /*-----------------------------------------------------------------------------*/ | 84 | /*-----------------------------------------------------------------------------*/ |
89 | char xatoi(char **str, long *ret); | 85 | char xatoi(char **str, long *ret); |
90 | 86 | ||
@@ -108,4 +104,3 @@ char xatoi(char **str, long *ret); | |||
108 | #endif | 104 | #endif |
109 | 105 | ||
110 | #endif | 106 | #endif |
111 | |||