28 #include <avr/pgmspace.h>
30 #define PgmPrint(x) SerialPrint_P(PSTR(x))
32 #define PgmPrintln(x) SerialPrintln_P(PSTR(x))
35 #define NOINLINE __attribute__((noinline,unused))
36 #define UNUSEDOK __attribute__((unused))
39 static UNUSEDOK
int FreeRam(
void) {
43 if (reinterpret_cast<int>(__brkval) == 0) {
45 free_memory =
reinterpret_cast<int>(&free_memory)
46 - reinterpret_cast<int>(&__bss_end);
49 free_memory =
reinterpret_cast<int>(&free_memory)
50 - reinterpret_cast<int>(__brkval);
61 static NOINLINE
void SerialPrint_P(PGM_P str) {
62 for (uint8_t c; (c = pgm_read_byte(str)); str++) Serial.write(c);
70 static NOINLINE
void SerialPrintln_P(PGM_P str) {
75 #endif // #define SdFatUtil_h