diff options
Diffstat (limited to 'tmk_core/common/print.h')
-rw-r--r-- | tmk_core/common/print.h | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/tmk_core/common/print.h b/tmk_core/common/print.h index 8836c0fc7..9cbe67bad 100644 --- a/tmk_core/common/print.h +++ b/tmk_core/common/print.h | |||
@@ -99,6 +99,34 @@ void print_set_sendchar(int8_t (*print_sendchar_func)(uint8_t)); | |||
99 | 99 | ||
100 | # endif /* USER_PRINT / NORMAL PRINT */ | 100 | # endif /* USER_PRINT / NORMAL PRINT */ |
101 | 101 | ||
102 | #elif defined(PROTOCOL_ARM_ATSAM) /* PROTOCOL_ARM_ATSAM */ | ||
103 | |||
104 | # include "arm_atsam/printf.h" | ||
105 | |||
106 | # ifdef USER_PRINT /* USER_PRINT */ | ||
107 | |||
108 | // Remove normal print defines | ||
109 | # define print(s) | ||
110 | # define println(s) | ||
111 | # define xprintf(fmt, ...) | ||
112 | |||
113 | // Create user print defines | ||
114 | # define uprintf(fmt, ...) __xprintf(fmt, ##__VA_ARGS__) | ||
115 | # define uprint(s) xprintf(s) | ||
116 | # define uprintln(s) xprintf(s "\r\n") | ||
117 | |||
118 | # else /* NORMAL PRINT */ | ||
119 | |||
120 | // Create user & normal print defines | ||
121 | # define xprintf(fmt, ...) __xprintf(fmt, ##__VA_ARGS__) | ||
122 | # define print(s) xprintf(s) | ||
123 | # define println(s) xprintf(s "\r\n") | ||
124 | # define uprint(s) print(s) | ||
125 | # define uprintln(s) println(s) | ||
126 | # define uprintf(fmt, ...) xprintf(fmt, ...) | ||
127 | |||
128 | # endif /* USER_PRINT / NORMAL PRINT */ | ||
129 | |||
102 | #elif defined(__arm__) /* __arm__ */ | 130 | #elif defined(__arm__) /* __arm__ */ |
103 | 131 | ||
104 | # include "mbed/xprintf.h" | 132 | # include "mbed/xprintf.h" |
@@ -130,7 +158,7 @@ void print_set_sendchar(int8_t (*print_sendchar_func)(uint8_t)); | |||
130 | /* TODO: to select output destinations: UART/USBSerial */ | 158 | /* TODO: to select output destinations: UART/USBSerial */ |
131 | # define print_set_sendchar(func) | 159 | # define print_set_sendchar(func) |
132 | 160 | ||
133 | #endif /* __AVR__ / PROTOCOL_CHIBIOS / __arm__ */ | 161 | #endif /* __AVR__ / PROTOCOL_CHIBIOS / PROTOCOL_ARM_ATSAM / __arm__ */ |
134 | 162 | ||
135 | // User print disables the normal print messages in the body of QMK/TMK code and | 163 | // User print disables the normal print messages in the body of QMK/TMK code and |
136 | // is meant as a lightweight alternative to NOPRINT. Use it when you only want to do | 164 | // is meant as a lightweight alternative to NOPRINT. Use it when you only want to do |