ソースを参照

Remove unused FreeRam function

main
PaulStoffregen 8年前
コミット
8bf0af2af2
1個のファイルの変更18行の追加15行の削除
  1. +18
    -15
      utility/SdFatUtil.h

+ 18
- 15
utility/SdFatUtil.h ファイルの表示

@@ -33,22 +33,25 @@
#define NOINLINE __attribute__((noinline,unused))
#define UNUSEDOK __attribute__((unused))
//------------------------------------------------------------------------------
// this unused FreeRam() function can cause compatibility issues
// when __brkval isn't defined the way it expects
//
/** Return the number of bytes currently free in RAM. */
static UNUSEDOK int FreeRam(void) {
extern int __bss_end;
extern int* __brkval;
int free_memory;
if (reinterpret_cast<int>(__brkval) == 0) {
// if no heap use from end of bss section
free_memory = reinterpret_cast<int>(&free_memory)
- reinterpret_cast<int>(&__bss_end);
} else {
// use from top of stack to heap
free_memory = reinterpret_cast<int>(&free_memory)
- reinterpret_cast<int>(__brkval);
}
return free_memory;
}
//static UNUSEDOK int FreeRam(void) {
// extern int __bss_end;
// extern int* __brkval;
// int free_memory;
// if (reinterpret_cast<int>(__brkval) == 0) {
// // if no heap use from end of bss section
// free_memory = reinterpret_cast<int>(&free_memory)
// - reinterpret_cast<int>(&__bss_end);
// } else {
// // use from top of stack to heap
// free_memory = reinterpret_cast<int>(&free_memory)
// - reinterpret_cast<int>(__brkval);
// }
// return free_memory;
//}
//------------------------------------------------------------------------------
/**
* %Print a string in flash memory to the serial port.

読み込み中…
キャンセル
保存