ESP8266
debug.h
1 #ifndef ARD_DEBUG_H
2 #define ARD_DEBUG_H
3 
4 #include <stddef.h>
5 #include <stdint.h>
6 
7 //#define DEBUGV(...) ets_printf(__VA_ARGS__)
8 
9 #ifndef DEBUGV
10 #define DEBUGV(...)
11 #endif
12 
13 #ifdef __cplusplus
14 void hexdump(uint8_t *mem, uint32_t len, uint8_t cols = 16);
15 #else
16 void hexdump(uint8_t *mem, uint32_t len, uint8_t cols);
17 #endif
18 
19 #ifdef __cplusplus
20 extern "C" {
21 #endif
22 
23 void __panic_func(const char* file, int line, const char* func) __attribute__((noreturn));
24 #define panic() __panic_func(__FILE__, __LINE__, __func__)
25 
26 #ifdef __cplusplus
27 }
28 #endif
29 
30 
31 #endif//ARD_DEBUG_H