Skip to content

Commit 8663a6b

Browse files
committed
move hexdump declaration to debug.h
1 parent ee69c92 commit 8663a6b

File tree

3 files changed

+24
-8
lines changed

3 files changed

+24
-8
lines changed

hardware/esp8266com/esp8266/cores/esp8266/Arduino.h

+1-2
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,7 @@ void loop(void);
212212

213213
#include "HardwareSerial.h"
214214
#include "Esp.h"
215+
#include "debug.h"
215216

216217
uint16_t makeWord(uint16_t w);
217218
uint16_t makeWord(byte h, byte l);
@@ -229,8 +230,6 @@ long random(long, long);
229230
void randomSeed(unsigned int);
230231
long map(long, long, long, long, long);
231232

232-
// Debugging functions
233-
void hexdump(uint8_t *mem, uint32_t len, uint8_t cols = 16);
234233

235234
#endif
236235

hardware/esp8266com/esp8266/cores/esp8266/debug.cpp

+19-5
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,25 @@
1-
/*
2-
* debug.c
3-
*
4-
* Created on: 13.05.2015
5-
* Author: Markus Sattler
1+
/*
2+
debug.cpp - debug helper functions
3+
Copyright (c) 2015 Markus Sattler. All rights reserved.
4+
This file is part of the esp8266 core for Arduino environment.
5+
6+
This library is free software; you can redistribute it and/or
7+
modify it under the terms of the GNU Lesser General Public
8+
License as published by the Free Software Foundation; either
9+
version 2.1 of the License, or (at your option) any later version.
10+
11+
This library is distributed in the hope that it will be useful,
12+
but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14+
Lesser General Public License for more details.
15+
16+
You should have received a copy of the GNU Lesser General Public
17+
License along with this library; if not, write to the Free Software
18+
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
619
*/
720

821
#include "Arduino.h"
22+
#include "debug.h"
923

1024
void ICACHE_RAM_ATTR hexdump(uint8_t *mem, uint32_t len, uint8_t cols) {
1125
os_printf("\n[HEXDUMP] Address: 0x%08X len: 0x%X (%d)", mem, len, len);

hardware/esp8266com/esp8266/cores/esp8266/debug.h

+4-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33

44
#include <stddef.h>
55
// #define DEBUGV(...) ets_printf(__VA_ARGS__)
6-
#define DEBUGV(...)
6+
#define DEBUGV(...)
7+
8+
void hexdump(uint8_t *mem, uint32_t len, uint8_t cols = 16);
9+
710

811
#endif//ARD_DEBUG_H

0 commit comments

Comments
 (0)