aboutsummaryrefslogtreecommitdiffstats
path: root/tmk_core/protocol/chibios
diff options
context:
space:
mode:
authorGravatar skullY <skullydazed@gmail.com>2020-05-04 09:25:44 -0700
committerGravatar skullY <skullydazed@gmail.com>2020-05-04 09:25:44 -0700
commit6f30b402a285ddecce9b6f5b002a649f775225d2 (patch)
tree5a25c7334d931a56d9fbfad80b6284cda7e38950 /tmk_core/protocol/chibios
parent1ff526dac0e73ea8cce522d0106631e3a748802c (diff)
downloadqmk_firmware-6f30b402a285ddecce9b6f5b002a649f775225d2.tar.gz
Revert "Fix conflicting types for 'tfp_printf' (#8269)"
Diffstat (limited to 'tmk_core/protocol/chibios')
-rw-r--r--tmk_core/protocol/chibios/main.c3
-rw-r--r--tmk_core/protocol/chibios/usb_main.c5
-rw-r--r--tmk_core/protocol/chibios/usb_main.h2
3 files changed, 9 insertions, 1 deletions
diff --git a/tmk_core/protocol/chibios/main.c b/tmk_core/protocol/chibios/main.c
index 7d32c16ed..61665eb6f 100644
--- a/tmk_core/protocol/chibios/main.c
+++ b/tmk_core/protocol/chibios/main.c
@@ -158,6 +158,9 @@ int main(void) {
/* Init USB */
init_usb_driver(&USB_DRIVER);
+ /* init printf */
+ init_printf(NULL, sendchar_pf);
+
#ifdef MIDI_ENABLE
setup_midi();
#endif
diff --git a/tmk_core/protocol/chibios/usb_main.c b/tmk_core/protocol/chibios/usb_main.c
index 66985b9de..ecc83d9ec 100644
--- a/tmk_core/protocol/chibios/usb_main.c
+++ b/tmk_core/protocol/chibios/usb_main.c
@@ -796,7 +796,10 @@ int8_t sendchar(uint8_t c) {
}
#endif /* CONSOLE_ENABLE */
-void _putchar(char character) { sendchar(character); }
+void sendchar_pf(void *p, char c) {
+ (void)p;
+ sendchar((uint8_t)c);
+}
#ifdef RAW_ENABLE
void raw_hid_send(uint8_t *data, uint8_t length) {
diff --git a/tmk_core/protocol/chibios/usb_main.h b/tmk_core/protocol/chibios/usb_main.h
index 94baf9b35..17041b4f2 100644
--- a/tmk_core/protocol/chibios/usb_main.h
+++ b/tmk_core/protocol/chibios/usb_main.h
@@ -87,4 +87,6 @@ void console_flush_output(void);
#endif /* CONSOLE_ENABLE */
+void sendchar_pf(void *p, char c);
+
#endif /* _USB_MAIN_H_ */