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 36

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 32 nussgipfel
/** print debug information */
60 9 nussgipfel
#define print_info(String) 
61
#endif
62
 
63
#ifdef DEBUG_LEVEL_WARN
64
/** print debug warnings */
65
#define print_warn(String) ser_printString("WARNING: "); printf_tiny(String)
66
#else
67 32 nussgipfel
/** print debug warnings */
68 9 nussgipfel
#define print_warn(String) 
69
#endif
70
 
71
#ifdef DEBUG_LEVEL_ERROR
72 32 nussgipfel
/** print debug errors */
73 9 nussgipfel
#define print_err(String) ser_printString("ERROR: "); printf_tiny(String)
74
#else
75 32 nussgipfel
/** print debug errors */
76 9 nussgipfel
#define print_err(String) 
77
#endif
78
 
79
 
80
#endif /* _DEBUGPRINT_H_ */

powered by: WebSVN 2.1.0

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