mirror of
https://github.com/DCC-EX/CommandStation-EX.git
synced 2024-11-23 08:06:13 +01:00
Update freeMemory.cpp
This commit is contained in:
parent
fab05bac79
commit
7954c85b7d
|
@ -50,9 +50,9 @@ int freeMemory() {
|
|||
// by estimation or inspection, that may be used by other
|
||||
// called subroutines.
|
||||
int updateMinimumFreeMemory(unsigned char extraBytes) {
|
||||
int spare = freeMemory()-extraBytes;
|
||||
byte sreg_save = SREG;
|
||||
noInterrupts();
|
||||
int spare = freeMemory()-extraBytes;
|
||||
if (spare < minimum_free_memory) minimum_free_memory = spare;
|
||||
int returnValue = minimum_free_memory;
|
||||
SREG = sreg_save;
|
||||
|
|
Loading…
Reference in New Issue
Block a user