summaryrefslogtreecommitdiff
path: root/common/print.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/print.c')
-rw-r--r--common/print.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/common/print.c b/common/print.c
index 558181ea72..4e36d3935b 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)
{