OpenCores
URL https://opencores.org/ocsvn/gecko3/gecko3/trunk

Subversion Repositories gecko3

[/] [gecko3/] [trunk/] [GECKO3COM/] [gecko3com-fw/] [firmware/] [include/] [debugprint.h] - Blame information for rev 20

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 9 nussgipfel
/* GECKO3COM
2
 *
3
 * Copyright (C) 2008 by
4
 *   ___    ____  _   _
5
 *  (  _`\ (  __)( ) ( )
6
 *  | (_) )| (_  | |_| |   Berne University of Applied Sciences
7
 *  |  _ <'|  _) |  _  |   School of Engineering and
8
 *  | (_) )| |   | | | |   Information Technology
9
 *  (____/'(_)   (_) (_)
10
 *
11
 *
12
 * This program is free software: you can redistribute it and/or modify
13
 * it under the terms of the GNU General Public License as published by
14
 * the Free Software Foundation, either version 3 of the License, or
15
 * (at your option) any later version.
16
 *
17
 * This program is distributed in the hope that it will be useful,
18
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20
 * GNU General Public License for more details.
21
 * You should have received a copy of the GNU General Public License
22
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
23
 */
24
 
25
/**
26
 *********************************************************************
27
 * \file      debugprint.h
28
 *********************************************************************
29
 * \brief     Makro definitions to print debug information when needed.
30
 *
31
 *            Supporting three different levels: Error, Warning, Info.
32
 *            Define the desired Value in the Makefile by the define
33
 *            DEBUG_LEVEL_[INFO | WARN | ERROR]
34
 *
35
 * \date      2008-12-16
36
 *
37
 * \author    Christoph Zimmermann
38
*/
39
 
40
#ifndef _DEBUGPRINT_H_
41
#define _DEBUGPRINT_H_
42
 
43
#include <stdio.h>
44
#include "ser.h"
45
 
46
#ifdef DEBUG_LEVEL_WARN
47
#define DEBUG_LEVEL_ERROR
48
#endif
49
 
50
#ifdef DEBUG_LEVEL_INFO
51
#define DEBUG_LEVEL_WARN
52
#define DEBUG_LEVEL_ERROR
53
#endif
54
 
55
#ifdef DEBUG_LEVEL_INFO 
56
/** print debug information */
57
#define print_info(String) ser_printString("INFO: "); printf_tiny(String)
58
#else
59
#define print_info(String) 
60
#endif
61
 
62
#ifdef DEBUG_LEVEL_WARN
63
/** print debug warnings */
64
#define print_warn(String) ser_printString("WARNING: "); printf_tiny(String)
65
#else
66
#define print_warn(String) 
67
#endif
68
 
69
#ifdef DEBUG_LEVEL_ERROR
70
/* print debug errors */
71
#define print_err(String) ser_printString("ERROR: "); printf_tiny(String)
72
#else
73
#define print_err(String) 
74
#endif
75
 
76
 
77
#endif /* _DEBUGPRINT_H_ */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.