From 0c9d46d11f77f4737a767b2f95a9b40725b2fd97 Mon Sep 17 00:00:00 2001 From: Marti Bolivar Date: Wed, 13 Jun 2012 11:39:51 -0400 Subject: HardwareSerial: Add c_dev() accessor for instance's usart_dev*. This is analagous to std::string::c_str(). Signed-off-by: Marti Bolivar --- wirish/include/wirish/HardwareSerial.h | 4 ++++ 1 file changed, 4 insertions(+) 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; -- cgit v1.2.3