1
0
mirror of https://github.com/arduino/Arduino.git synced 2024-12-11 22:24:13 +01:00
Arduino/hardware/arduino/avr/libraries/SoftwareSerial
Matthijs Kooijman 764f24266e Further optimize SoftwareSerial::write
This change restructures the loop, to help the compiler generate shorter
code (because now only the LSB of the data byte is checked and
subsequent bytes are shifted down one by one, it can use th "skip if bit
set" instruction).

Furthermore, it puts most attributes in local variables, which causes
the compiler to put them into registers. This makes the timing-critical
part of the code smaller, making it easier to provide accurate timings.

On an Arduino uno using gcc 4.3, this saves 58 bytes. On gcc 4.8, this
saves 14 bytes.
2015-01-26 17:03:25 +01:00
..
examples Revert "SoftwareSerial library to the new format" 2013-11-15 12:54:59 +01:00
keywords.txt Revert "SoftwareSerial library to the new format" 2013-11-15 12:54:59 +01:00
library.properties missing paragraph field in library.properties 2014-07-18 20:08:01 +02:00
SoftwareSerial.cpp Further optimize SoftwareSerial::write 2015-01-26 17:03:25 +01:00
SoftwareSerial.h Mark SoftwareSerial::tx_pin_write as "always_inline" 2015-01-26 17:03:25 +01:00