11 #ifndef __RAM_REPORT_HEADER
12 #define __RAM_REPORT_HEADER
35 int16_t freeptr =
__flp;
37 int16_t
const end = int16_t(
__brkval);
42 uint8_t pointer_print = 0;
45 for(; pos < end; ++pos) {
51 freeptr = *(uint8_t*)(pos + 2) + (*(uint8_t*)(pos + 3) << 8);
58 size = *(uint8_t*)pos + (*(uint8_t*)(pos + 1) << 8);
64 ustd::cout << ustd::setw(3) << *(uint8_t*)(pos + 1) << color <<
" ";
68 if(pointer_print != 0){
75 ustd::cout << ustd::setw(3) << *(uint8_t*)pos <<
" ";
107 #define PRINT_RAM(var, color) \
108 ustd::cout << color << ustd::setw(6) << F(#var) << F(": ") << ustd::setw(4) << var \
109 << F(" bytes (") << ustd::setw(2) << int(var * 100.0 / 2047 + 0.5) << F("%)");
114 }
else if(count == 2) {
117 }
else if(count == 3) {
120 }
else if(count == 4) {
121 uint16_t
const free = SP - int(
__brkval);
123 }
else if(count == 5) {
124 uint16_t stack = RAMEND - SP;
135 #endif //__ram_REPORT_HEADER
void ram_report()
Definition: ram_report.hpp:86
int used_ram()
Definition: ram_report.hpp:83
#define GREEN
Definition: color.hpp:15
int ram_capacity()
Definition: ram_report.hpp:26
#define YELLOWB
Definition: color.hpp:18
#define WHITEB
Definition: color.hpp:26
#define BLUEB
Definition: color.hpp:20
#define RED
Definition: color.hpp:13
int free_ram()
Definition: ram_report.hpp:29
#define GREENB
Definition: color.hpp:16
#define PRINT_RAM(var, color)
#define MAGENTA
Definition: color.hpp:21
#define NONE
Definition: color.hpp:37
struct ustd::endl_class endl
#define MAGENTAB
Definition: color.hpp:22
#define REDB
Definition: color.hpp:14
#define F(x)
Definition: ustd_generic.hpp:15
void print_stack()
Definition: ram_report.hpp:33
cout_class & flush()
Definition: iostream.hpp:91
#define YELLOW
Definition: color.hpp:17