X-Git-Url: https://git.friedersdorff.com/?a=blobdiff_plain;f=print.c;h=d9152971b99c8818ebf1bf5a7dea2c8a273554f5;hb=fb8d23c60c757d5d9c2270cb0123a53be2049a28;hp=59b4bca1800f85576d01ad5004fc1b6cf63c7cd2;hpb=4acc38751e9c8e90921773e6e5f5a100b0729d98;p=max%2Ftmk_keyboard.git diff --git a/print.c b/print.c index 59b4bca1..d9152971 100644 --- a/print.c +++ b/print.c @@ -21,11 +21,10 @@ * THE SOFTWARE. */ -// Version 1.0: Initial Release - #include #include #include "print.h" +#include "sendchar.h" bool print_enable = false; @@ -38,15 +37,15 @@ void print_P(const char *s) while (1) { c = pgm_read_byte(s++); if (!c) break; - if (c == '\n') usb_debug_putchar('\r'); - usb_debug_putchar(c); + if (c == '\n') sendchar('\r'); + sendchar(c); } } void phex1(unsigned char c) { if (!print_enable) return; - usb_debug_putchar(c + ((c < 10) ? '0' : 'A' - 10)); + sendchar(c + ((c < 10) ? '0' : 'A' - 10)); } void phex(unsigned char c) @@ -68,7 +67,7 @@ void pbin(unsigned char c) { if (!print_enable) return; for (int i = 7; i >= 0; i--) { - usb_debug_putchar((c & (1<