diff --git a/cores/esp8266/Arduino.h b/cores/esp8266/Arduino.h index 9cc4ad08b..6b306eb2f 100644 --- a/cores/esp8266/Arduino.h +++ b/cores/esp8266/Arduino.h @@ -212,6 +212,7 @@ void loop(void); #include "HardwareSerial.h" #include "Esp.h" +#include "debug.h" uint16_t makeWord(uint16_t w); uint16_t makeWord(byte h, byte l); @@ -229,8 +230,6 @@ long random(long, long); void randomSeed(unsigned int); long map(long, long, long, long, long); -// Debugging functions -void hexdump(uint8_t *mem, uint32_t len, uint8_t cols = 16); #endif diff --git a/cores/esp8266/debug.cpp b/cores/esp8266/debug.cpp index c42016b04..5e280122e 100644 --- a/cores/esp8266/debug.cpp +++ b/cores/esp8266/debug.cpp @@ -1,11 +1,25 @@ -/* - * debug.c - * - * Created on: 13.05.2015 - * Author: Markus Sattler +/* + debug.cpp - debug helper functions + Copyright (c) 2015 Markus Sattler. All rights reserved. + This file is part of the esp8266 core for Arduino environment. + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "Arduino.h" +#include "debug.h" void ICACHE_RAM_ATTR hexdump(uint8_t *mem, uint32_t len, uint8_t cols) { os_printf("\n[HEXDUMP] Address: 0x%08X len: 0x%X (%d)", mem, len, len); diff --git a/cores/esp8266/debug.h b/cores/esp8266/debug.h index a312bfdfd..cf0830d3e 100644 --- a/cores/esp8266/debug.h +++ b/cores/esp8266/debug.h @@ -3,6 +3,9 @@ #include // #define DEBUGV(...) ets_printf(__VA_ARGS__) -#define DEBUGV(...) +#define DEBUGV(...) + +void hexdump(uint8_t *mem, uint32_t len, uint8_t cols = 16); + #endif//ARD_DEBUG_H