]> git.tdb.fi Git - libs/core.git/commitdiff
Add missing get_handle function to Serial
authorMikko Rasa <tdb@tdb.fi>
Sat, 2 Dec 2017 14:33:44 +0000 (16:33 +0200)
committerMikko Rasa <tdb@tdb.fi>
Sat, 2 Dec 2017 14:33:44 +0000 (16:33 +0200)
source/io/serial.cpp
source/io/serial.h

index 2b3458a3eb0ea293563a522f6519ef8467ed76dd..b4cfaab4726718bbfaa5f450cd3c1d7e1bcf29eb 100644 (file)
@@ -120,5 +120,11 @@ unsigned Serial::do_read(char *buf, unsigned size)
        return ret;
 }
 
+const Handle &Serial::get_handle(Mode m)
+{
+       check_access(m);
+       return handle;
+}
+
 } // namespace IO
 } // namespace Msp
index 1c91e600ea4503f7f7443769be4c5083c43bdc2e..b2194821e2691278877d473f8e30b552b3a42de7 100644 (file)
@@ -48,6 +48,7 @@ private:
        virtual unsigned do_read(char *, unsigned);
 
 public:
+       virtual const Handle &get_handle(Mode);
        virtual const Handle &get_event_handle() { return reader.get_event(); }
 };