-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdebug.h
More file actions
39 lines (31 loc) · 809 Bytes
/
debug.h
File metadata and controls
39 lines (31 loc) · 809 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/*
* debug.h
*
* $Id: debug.h,v 1.1 2006/02/13 09:58:08 andrzej Exp $
*
* Redboot Flash Configuration parser.
* Debug utilities - header.
*
* Copyright (C) 2006 Ekiert sp z o.o.
* Author: Andrzej Ekiert <a.ekiert@ekiert.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*/
#ifndef DEBUG_H
#define DEBUG_H
#include <stdint.h>
#define VERB_LOW 1
#define VERB_NORMAL 2
#define VERB_HIGH 3
extern uint8_t verbosity;
void hex_dump(void *buf, uint16_t len);
#define MESSAGE(verb, args...) \
do { \
if (verb <= verbosity) { \
printf(args); \
} \
} while (0);
#endif //DEBUG_H