]> cloudbase.mooo.com Git - z180-stamp.git/blobdiff - include/debug.h
fat cp: block buffer --> heap
[z180-stamp.git] / include / debug.h
index 8fdc830e7f1f162f075d2214d3c3b641698b8a9a..b7b6deafb5497f58206aca825e9a2334dcc9f0ea 100644 (file)
@@ -1,11 +1,28 @@
+/*
+ * (C) Copyright 2014 Leo C. <erbl259-lmu@yahoo.de>
+ *
+ * (C) Copyright 2000-2009
+ * Wolfgang Denk, DENX Software Engineering, wd@denx.de.
+ *
+ * SPDX-License-Identifier:    GPL-2.0
+ */
+
 
 #ifndef DEBUG_H_
 #define DEBUG_H_
 
-#include "common.h"
-#ifdef __AVR__
-#include <avr/pgmspace.h>
-#endif
+#include "command.h"
+
+command_ret_t do_dump_mem(cmd_tbl_t *, uint_fast8_t, int, char * const []);
+command_ret_t do_mem_mm_avr(cmd_tbl_t *, uint_fast8_t, int, char * const []);
+command_ret_t do_mem_nm_avr(cmd_tbl_t *, uint_fast8_t, int, char * const []);
+command_ret_t do_eep_cp(cmd_tbl_t *, uint_fast8_t, int, char * const []);
+command_ret_t do_pr_free_avr(cmd_tbl_t *, uint_fast8_t, int, char * const []);
+command_ret_t do_pr_heap_avr(cmd_tbl_t *, uint_fast8_t, int, char * const []);
+
+void printfreelist(const char * title);
+size_t get_freemem(void);
+
 
 #ifdef DEBUG
 #define _DEBUG 1
 #define _DEBUG 0
 #endif
 
+/*
+ * Output a debug text when condition "cond" is met. The "cond" should be
+ * computed by a preprocessor in the best case, allowing for the best
+ * optimization.
+ */
 #define debug_cond(cond, fmt, args...)         \
        do {                                    \
                if (cond)                       \
 #endif
 #endif /* 0 */
 
-
-void dump_eep(const uint8_t *addr, unsigned int len, char *title);
-void dump_ram(const uint8_t *addr, unsigned int len, char *title);
-void printfreelist(const char * title);
-
-
 #endif /* DEBUG_H_ */
-