From: Mikko Rasa Date: Sat, 2 Dec 2017 14:33:44 +0000 (+0200) Subject: Add missing get_handle function to Serial X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=1e545df21512e2d41dd16b337eca3944c1ab52aa;p=libs%2Fcore.git Add missing get_handle function to Serial --- diff --git a/source/io/serial.cpp b/source/io/serial.cpp index 2b3458a..b4cfaab 100644 --- a/source/io/serial.cpp +++ b/source/io/serial.cpp @@ -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 diff --git a/source/io/serial.h b/source/io/serial.h index 1c91e60..b219482 100644 --- a/source/io/serial.h +++ b/source/io/serial.h @@ -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(); } };