1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-07-21 21:22:31 +03:00

Improve debug output on critical errors

This commit is contained in:
Ivan Grokhotkov
2015-11-21 20:04:38 +03:00
parent 590eefa210
commit 8bf1e98f24
5 changed files with 64 additions and 24 deletions

View File

@ -2,7 +2,9 @@
#define ARD_DEBUG_H
#include <stddef.h>
//#define DEBUGV(...) ets_printf(__VA_ARGS__)
#include <stdint.h>
#define DEBUGV(...) ets_printf(__VA_ARGS__)
#ifndef DEBUGV
#define DEBUGV(...)
@ -14,4 +16,16 @@ void hexdump(uint8_t *mem, uint32_t len, uint8_t cols = 16);
void hexdump(uint8_t *mem, uint32_t len, uint8_t cols);
#endif
#ifdef __cplusplus
extern "C" {
#endif
void __panic_func(const char* file, int line, const char* func) __attribute__((noreturn));
#define panic() __panic_func(__FILE__, __LINE__, __func__)
#ifdef __cplusplus
}
#endif
#endif//ARD_DEBUG_H