diff options
author | Marti Bolivar <mbolivar@leaflabs.com> | 2012-06-13 11:39:51 -0400 |
---|---|---|
committer | Marti Bolivar <mbolivar@leaflabs.com> | 2012-06-13 11:54:20 -0400 |
commit | 0c9d46d11f77f4737a767b2f95a9b40725b2fd97 (patch) | |
tree | 588c2aecdb99570299e75ba7dfca60ec04f6d94f | |
parent | b0b4b12bbe74d94137f871d8063bc55225fb2e85 (diff) | |
download | librambutan-0c9d46d11f77f4737a767b2f95a9b40725b2fd97.tar.gz librambutan-0c9d46d11f77f4737a767b2f95a9b40725b2fd97.zip |
HardwareSerial: Add c_dev() accessor for instance's usart_dev*.
This is analagous to std::string::c_str().
Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
-rw-r--r-- | wirish/include/wirish/HardwareSerial.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/wirish/include/wirish/HardwareSerial.h b/wirish/include/wirish/HardwareSerial.h index 2b1e747..f25362b 100644 --- a/wirish/include/wirish/HardwareSerial.h +++ b/wirish/include/wirish/HardwareSerial.h @@ -70,6 +70,10 @@ public: /* Pin accessors */ int txPin(void) { return this->tx_pin; } int rxPin(void) { return this->rx_pin; } + + /* Escape hatch into libmaple */ + /* FIXME [0.0.13] documentation */ + struct usart_dev* c_dev(void) { return this->usart_device; } private: struct usart_dev *usart_device; uint8 tx_pin; |