X-Git-Url: https://git.friedersdorff.com/?a=blobdiff_plain;f=common%2Fprint.c;h=08d211f206a81a7b5b27ebe019e2263da76cf67a;hb=1385058fc21f80347c7afd2b818e38795ce9d55a;hp=6a8a725bca11e2211f2c9fd28f71121f6bef6dea;hpb=9389585d3d16319d5d739eef84f4ff11076235c1;p=max%2Ftmk_keyboard.git diff --git a/common/print.c b/common/print.c index 6a8a725b..08d211f2 100644 --- a/common/print.c +++ b/common/print.c @@ -31,7 +31,7 @@ int8_t (*print_sendchar_func)(uint8_t) = 0; -bool print_enable = false; +bool print_enable = true; /* print string stored in data memory(SRAM) @@ -113,7 +113,6 @@ void print_decs(int16_t data) } -static inline void print_hex4(uint8_t data) { sendchar(data + ((data < 10) ? '0' : 'A' - 10)); @@ -137,8 +136,14 @@ void print_hex32(uint32_t data) print_hex16(data); } +void print_bin4(uint8_t data) +{ + for (int i = 4; i >= 0; i--) { + sendchar((data & (1<= 0; i--) { sendchar((data & (1<