aboutsummaryrefslogtreecommitdiffstats
path: root/firmware/print.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/print.c')
-rw-r--r--firmware/print.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/firmware/print.c b/firmware/print.c
index a3000f5..accce26 100644
--- a/firmware/print.c
+++ b/firmware/print.c
@@ -33,9 +33,9 @@ void print_dec(unsigned int val)
}
}
-void print_hex(unsigned int val)
+void print_hex(unsigned int val, int digits)
{
- for (int i = 32-4; i >= 0; i -= 4)
+ for (int i = (4*digits)-4; i >= 0; i -= 4)
*((volatile uint32_t*)OUTPORT) = "0123456789ABCDEF"[(val >> i) % 16];
}