-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathdebug.h
62 lines (49 loc) · 1.62 KB
/
debug.h
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
/* ======================================================================
This file is part of disk91_tools.
disk91_tools 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 3 of the License, or
(at your option) any later version.
Foobar is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Foobar. If not, see <http://www.gnu.org/licenses/>.
=======================================================================
*/
/* ======================================================================
* Debug settings
* ----------------------------------------------------------------------
* (c) Disk91 - 2018
* Author : Paul Pinault aka disk91.com
* ----------------------------------------------------------------------
*/
#ifndef DEBUG_H_
#define DEBUG_H_
#include <config.h>
#ifdef DEBUG
#define TTRACE(x) Serial.printf x
#define DTRACE(x) Serial.printf(x)
#else
#define TTRACE(x)
#define DTRACE(x)
#endif
#if DEBUG > 1
#define TTRACE1(x) Serial.printf x
#else
#define TTRACE1(x)
#endif
#if DEBUG > 2
#define TTRACE2(x) Serial.printf x
#else
#define TTRACE2(x)
#endif
#if DEBUG > 3
#define TTRACE3(x) Serial.printf x
#else
#define TTRACE3(x)
#endif
#define FLUSH(x) { Serial.flush(); delay(2); }
#define STOP_PIN D5
#endif