X-Git-Url: https://git.friedersdorff.com/?a=blobdiff_plain;f=common%2Fprint.c;h=08d211f206a81a7b5b27ebe019e2263da76cf67a;hb=1385058fc21f80347c7afd2b818e38795ce9d55a;hp=d8a899b4071df0b902ba741c1d300672ae412fcc;hpb=16a583d7fd057c3ebcb859db44f097fd8073ec49;p=max%2Ftmk_keyboard.git diff --git a/common/print.c b/common/print.c index d8a899b4..08d211f2 100644 --- a/common/print.c +++ b/common/print.c @@ -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<