Skip to content

Commit 8d22aee

Browse files
committed
Bootloader: added debug print command
1 parent f7faa19 commit 8d22aee

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

bootloaders/zero/sam_ba_monitor.c

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,21 @@ void sam_ba_monitor_run(void)
186186
}
187187
}
188188

189+
#if 0
190+
// Prints a 32-bit integer in hex.
191+
void printn(uint32_t n) {
192+
char buff[8];
193+
int i;
194+
for (i=0; i<8; i++) {
195+
int d = n & 0XF;
196+
n = (n >> 4);
197+
198+
buff[7-i] = d > 9 ? 'A' + d - 10 : '0' + d;
199+
}
200+
ptr_monitor_if->putdata(buff, 8);
201+
}
202+
#endif
203+
189204
void sam_ba_monitor_loop(void)
190205
{
191206
length = ptr_monitor_if->getdata(data, SIZEBUFMAX);

0 commit comments

Comments
 (0)