From c4df0d2b7974540b39bb61d4a90ba5d0add8194b Mon Sep 17 00:00:00 2001 From: battosai30 Date: Tue, 30 Jun 2015 08:46:44 +0200 Subject: [PATCH] Update SoftwareSerial.cpp placing table[] in flash allow a big gain in RAM memory. For example without this modification, it's impossible to use hardware serial + SoftwareSerial because it consumes too much RAM. --- hardware/msp430/libraries/SoftwareSerial/SoftwareSerial.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hardware/msp430/libraries/SoftwareSerial/SoftwareSerial.cpp b/hardware/msp430/libraries/SoftwareSerial/SoftwareSerial.cpp index 62dff646327..d7ddb219960 100644 --- a/hardware/msp430/libraries/SoftwareSerial/SoftwareSerial.cpp +++ b/hardware/msp430/libraries/SoftwareSerial/SoftwareSerial.cpp @@ -59,7 +59,7 @@ DELAY_TABLE; //formula is roughly rxintra=rxstop=tx = F_CPU / baud / 3 - 5/3 // so, delay = 16000000 / 3 / baud - 5/3 // and, rxcenter = 1/2 rxintra -_DELAY_TABLE table[] = +const _DELAY_TABLE table[] = { // baud rxcenter rxintra rxstop tx {115200, 15, 32, 32, 32, },