AES128ESP32 Library
Loading...
Searching...
No Matches
delays.h
Go to the documentation of this file.
1#pragma once
2#include <Arduino.h>
3// #include <source_location>
4#undef STOP
5#define STOP Serial.print(__FILENAME__); \
6 Serial.print(":"); \
7 Serial.print(__LINE__); \
8 Serial.print(":"); \
9 Serial.print(__ASSERT_FUNC);\
10 for(;;);
11
12#ifdef DEBUGLEVEL
13 #warning("DEBUGLEVEL is defined")
14#endif
15
16#define DBMSG(l, s) \
17 Serial.print("LVL:"); \
18 Serial.print(String(l)); \
19 Serial.print(" "); \
20 Serial.print(__FILENAME__); \
21 Serial.print(":"); \
22 Serial.print(__LINE__); \
23 Serial.print(":"); \
24 Serial.print(__ASSERT_FUNC); \
25 Serial.print(" "); \
26 Serial.println(s); \
27 Serial.flush();
28 // delay(100);
29
30#ifndef DEBUG1
31#define DEBUG1
32#endif
33
34#ifndef DEBUG2
35#define DEBUG2
36#endif
37
38#ifndef DEBUG3
39#define DEBUG3
40#endif
41
42#if DEBUGLEVEL > 0
43#undef DEBUG1
44#define DEBUG1(s) \
45 DBMSG(1, s)
46#endif
47
48#if DEBUGLEVEL > 1
49#undef DEBUG2
50#define DEBUG2(s) \
51 DBMSG(2, s)
52#endif
53
54#if DEBUGLEVEL > 2
55#undef DEBUG3
56#define DEBUG3(s) \
57 DBMSG(3, s)
58#endif
59