aboutsummaryrefslogtreecommitdiff
path: root/firmwares/wifishield/wifiHD/src/SOFTWARE_FRAMEWORK
diff options
context:
space:
mode:
authorMatthijs Kooijman <matthijs@stdin.nl>2014-04-22 20:52:09 +0200
committerMatthijs Kooijman <matthijs@stdin.nl>2015-01-26 17:03:25 +0100
commitc69c0b52aa66714a501544175215fd9723532dc2 (patch)
tree3abb20dfad43de62d277454f8aae20dace0c109d /firmwares/wifishield/wifiHD/src/SOFTWARE_FRAMEWORK
parentfe390c3cc8e8b908d8207be80aaa34f804d82c79 (diff)
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.
Diffstat (limited to 'firmwares/wifishield/wifiHD/src/SOFTWARE_FRAMEWORK')
0 files changed, 0 insertions, 0 deletions