aboutsummaryrefslogtreecommitdiffstats
path: root/wirish/comm
diff options
context:
space:
mode:
authorMarti Bolivar <mbolivar@leaflabs.com>2011-08-16 04:15:17 -0400
committerMarti Bolivar <mbolivar@leaflabs.com>2011-08-16 06:13:48 -0400
commit383378b497ace6dc6b363bed185b69578e00866c (patch)
tree15b44e464ab865020146b60d527a3e46f08a8cd5 /wirish/comm
parent171eebc4fb5ded65637d056c24efe1bcd382a589 (diff)
downloadlibrambutan-383378b497ace6dc6b363bed185b69578e00866c.tar.gz
librambutan-383378b497ace6dc6b363bed185b69578e00866c.zip
HardwareSerial: Add pin accessors.
Diffstat (limited to 'wirish/comm')
-rw-r--r--wirish/comm/HardwareSerial.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/wirish/comm/HardwareSerial.h b/wirish/comm/HardwareSerial.h
index a347051..c76ea17 100644
--- a/wirish/comm/HardwareSerial.h
+++ b/wirish/comm/HardwareSerial.h
@@ -67,6 +67,10 @@ public:
void flush(void);
virtual void write(unsigned char);
using Print::write;
+
+ /* Pin accessors */
+ int txPin(void) { return this->tx_pin; }
+ int rxPin(void) { return this->rx_pin; }
private:
usart_dev *usart_device;
uint8 tx_pin;