|
@ -143,19 +143,15 @@ void _delay_ms(const int delay); |
|
|
|
|
|
|
|
|
extern "C" char* _sbrk(int incr); |
|
|
extern "C" char* _sbrk(int incr); |
|
|
|
|
|
|
|
|
#if GCC_VERSION <= 50000 |
|
|
|
|
|
#pragma GCC diagnostic push |
|
|
#pragma GCC diagnostic push |
|
|
#pragma GCC diagnostic ignored "-Wunused-function" |
|
|
#pragma GCC diagnostic ignored "-Wunused-function" |
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
static inline int freeMemory() { |
|
|
static inline int freeMemory() { |
|
|
volatile char top; |
|
|
volatile char top; |
|
|
return &top - reinterpret_cast<char*>(_sbrk(0)); |
|
|
return &top - reinterpret_cast<char*>(_sbrk(0)); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
#if GCC_VERSION <= 50000 |
|
|
|
|
|
#pragma GCC diagnostic pop |
|
|
#pragma GCC diagnostic pop |
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
//
|
|
|
//
|
|
|
// ADC
|
|
|
// ADC
|
|
|