From 1e545df21512e2d41dd16b337eca3944c1ab52aa Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Sat, 2 Dec 2017 16:33:44 +0200 Subject: [PATCH] Add missing get_handle function to Serial --- source/io/serial.cpp | 6 ++++++ source/io/serial.h | 1 + 2 files changed, 7 insertions(+) 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(); } }; -- 2.45.2