mirror of
				https://github.com/esp8266/Arduino.git
				synced 2025-11-03 14:33:37 +03:00 
			
		
		
		
	move hexdump declaration to debug.h
This commit is contained in:
		@@ -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
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -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);
 | 
			
		||||
 
 | 
			
		||||
@@ -5,4 +5,7 @@
 | 
			
		||||
// #define DEBUGV(...) ets_printf(__VA_ARGS__)
 | 
			
		||||
#define DEBUGV(...)
 | 
			
		||||
 | 
			
		||||
void hexdump(uint8_t *mem, uint32_t len, uint8_t cols = 16);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#endif//ARD_DEBUG_H
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user