aboutsummaryrefslogtreecommitdiff
path: root/libraries/SoftwareSerial/SoftwareSerial.h
diff options
context:
space:
mode:
authorMatthijs Kooijman <matthijs@stdin.nl>2014-04-23 15:52:57 +0200
committerMatthijs Kooijman <matthijs@stdin.nl>2015-01-26 17:03:25 +0100
commit03f242b231824daa3fce38811cd9d3cf7e4e7e21 (patch)
treeca1d0629469f52061a98715ab2f531220a1a1f97 /libraries/SoftwareSerial/SoftwareSerial.h
parent17b9b5373763eb97302a55a9208d35f7abaea217 (diff)
Mark SoftwareSerial::recv and handle_interrupt as always_inline
Since those functions are only called once now, it makes sense to inline them. This saves a few bytes of program space, but also saves a few cycles in the critical RX path.
Diffstat (limited to 'libraries/SoftwareSerial/SoftwareSerial.h')
-rw-r--r--libraries/SoftwareSerial/SoftwareSerial.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/libraries/SoftwareSerial/SoftwareSerial.h b/libraries/SoftwareSerial/SoftwareSerial.h
index 778fffb..aa9bbf3 100644
--- a/libraries/SoftwareSerial/SoftwareSerial.h
+++ b/libraries/SoftwareSerial/SoftwareSerial.h
@@ -69,7 +69,7 @@ private:
static SoftwareSerial *active_object;
// private methods
- void recv();
+ void recv() __attribute__((__always_inline__));
uint8_t rx_pin_read();
void tx_pin_write(uint8_t pin_state) __attribute__((__always_inline__));
void setTX(uint8_t transmitPin);
@@ -99,7 +99,7 @@ public:
using Print::write;
// public only for easy access by interrupt handlers
- static inline void handle_interrupt();
+ static inline void handle_interrupt() __attribute__((__always_inline__));
};
// Arduino 0012 workaround