X-Git-Url: https://git.friedersdorff.com/?a=blobdiff_plain;f=common%2Fprint.c;h=4e36d3935b232803517c2bc34136217de25f8519;hb=f291c2279eb9f656ed2a2e3152bab155470c4ef9;hp=558181ea728f98e60b80ce9f43526854ae517aef;hpb=62d1ebb91c7b381ce3d88aad9ee0b03bea9fce26;p=max%2Ftmk_keyboard.git diff --git a/common/print.c b/common/print.c index 558181ea..4e36d393 100644 --- a/common/print.c +++ b/common/print.c @@ -75,6 +75,14 @@ void phex16(unsigned int i) phex(i); } +void pdec(uint8_t i) +{ + if (!print_enable) return; + if (i/100) sendchar('0' + (i/100)); + if (i/100 || i%100/10) sendchar('0' + (i%100/10)); + sendchar('0' + (i%10)); +} + void pbin(unsigned char c) {