summaryrefslogtreecommitdiff
path: root/print.c
diff options
context:
space:
mode:
Diffstat (limited to 'print.c')
-rw-r--r--print.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/print.c b/print.c
index e6aa1fe52..2f0617c64 100644
--- a/print.c
+++ b/print.c
@@ -58,5 +58,9 @@ void phex16(unsigned int i)
}
-
-
+void pbin(unsigned char c)
+{
+ for (int i=7; i>=0; i--) {
+ usb_debug_putchar((c & (1<<i)) ? '1' : '0');
+ }
+}