Split off OHCI support into a separate device. Numerous bug fixes, most
[AROS.git] / rom / usb / pciusbhc / ohci / debug.c
blobf6153e54eacb8c6abfa407f4109f37afa4cc4126
1 /*
2 Copyright © 2002-2009, Chris Hodges. All rights reserved.
3 Copyright © 2009-2012, The AROS Development Team. All rights reserved.
4 $Id$
5 */
7 #include "debug.h"
9 #ifdef DEBUG
10 void dumpmem_pciusb(void *mem, unsigned long int len)
12 unsigned char *p;
14 if (!mem || !len)
16 return;
19 p = (unsigned char *)mem;
21 KPrintF("\n");
25 unsigned char b, c, str[17];
27 for (b = 0; b < 16; b++)
29 c = *p++;
30 str[b] = ((c >= ' ') && (c <= 'z')) ? c : '.';
31 str[b + 1] = 0;
32 KPrintF("%02lx ", c);
33 if (--len == 0)
34 break;
37 while (++b < 16)
39 KPrintF(" ");
42 KPrintF(" %s\n", str);
44 while (len);
46 KPrintF("\n\n");
49 #endif /* DEBUG */