OSDN Git Service

Fix no pic
[uclinux-h8/uClinux-dist.git] / user / fconfig / debug.c
1 /*
2  * debug.c
3  *
4  * $Id: debug.c,v 1.1 2006/02/13 09:58:08 andrzej Exp $
5  *
6  * Redboot Flash Configuration parser. 
7  * Debug utilities. 
8  *
9  * Copyright (C) 2006 Ekiert sp z o.o.
10  * Author: Andrzej Ekiert <a.ekiert@ekiert.com>
11  *
12  * This program is free software; you can redistribute it and/or
13  * modify it under the terms of the GNU General Public License
14  * as published by the Free Software Foundation; either version
15  * 2 of the License, or (at your option) any later version. 
16  */
17 #include <stdio.h>
18
19 #include "debug.h"
20
21 uint8_t verbosity = VERB_LOW;
22
23 void hex_dump(void *buf, uint16_t len)
24 {
25         uint16_t i;
26         for (i = 0 ; i < len; i++) {
27                 printf("%02x", ((uint8_t*)buf)[i]);
28                 if (i%2) {
29                         printf(" ");
30                 }
31                 if (15 == i%16) {
32                         printf("\n");
33                 }
34         }
35         printf("\n");
36 }
37