revert between 56095 -> 55830 in arch
[AROS.git] / rom / usb / classes / audio / debug.c
blob155b4483bb4e74d1d80f072a43d9044cc5138435
1 #include "debug.h"
2 #include <proto/exec.h>
4 #ifdef DEBUG
5 void dumpmem(void *mem, unsigned long int len)
7 unsigned char *p;
9 if (!mem || !len) { return; }
11 p = (unsigned char *) mem;
13 RawPutChar('\n');
17 unsigned char b, c, str[17];
19 for (b = 0; b < 16; b++)
21 c = *p++;
22 str[b] = ((c >= ' ') && (c <= 'z')) ? c : '.';
23 str[b + 1] = 0;
24 KPrintF("%02lx ", c);
25 if (--len == 0) break;
28 while (++b < 16)
30 KPrintF(" ");
33 KPrintF(" %s\n", str);
34 } while (len);
36 KPrintF("\n\n");
39 #endif /* DEBUG */