Libraries/IOControl/include/IO/Debug.h
Go to the documentation of this file.
1 
20 #pragma once
21 
22 #include <debug_progmem.h>
23 
24 #ifdef ENABLE_HEAP_PRINTING
25 #ifdef ENABLE_MALLOC_COUNT
26 #include <malloc_count.h>
27 
28 #define PRINT_HEAP() \
29  debug_i("%s %s #%u : Free Heap = %u, Used = %u, Peak = %u", __FILE__, __FUNCTION__, __LINE__, \
30  system_get_free_heap_size(), MallocCount::getCurrent(), MallocCount::getPeak())
31 #else
32 #define PRINT_HEAP() \
33  debug_i("%s %s #%u : Free Heap = %u", __FILE__, __FUNCTION__, __LINE__, system_get_free_heap_size())
34 #endif
35 #else
36 #define PRINT_HEAP()
37 #endif