diff --git a/drivers/CoreBufferedSerial/include/CoreBufferedSerial.h b/drivers/CoreBufferedSerial/include/CoreBufferedSerial.h index 64e28364f9..3d9601c3f8 100644 --- a/drivers/CoreBufferedSerial/include/CoreBufferedSerial.h +++ b/drivers/CoreBufferedSerial/include/CoreBufferedSerial.h @@ -23,9 +23,6 @@ class CoreBufferedSerial : public interface::BufferedSerial auto readable() -> bool final; - void enable_input() final; - void disable_input() final; - void enableDeepSleep() final; void disableDeepSleep() final; diff --git a/drivers/CoreBufferedSerial/source/CoreBufferedSerial.cpp b/drivers/CoreBufferedSerial/source/CoreBufferedSerial.cpp index 33224242a3..54991257b5 100644 --- a/drivers/CoreBufferedSerial/source/CoreBufferedSerial.cpp +++ b/drivers/CoreBufferedSerial/source/CoreBufferedSerial.cpp @@ -21,12 +21,12 @@ auto CoreBufferedSerial::readable() -> bool return _serial.readable(); } -void CoreBufferedSerial::enable_input() +void CoreBufferedSerial::disableDeepSleep() { _serial.enable_input(true); } -void CoreBufferedSerial::disable_input() +void CoreBufferedSerial::enableDeepSleep() { _serial.enable_input(false); } @@ -36,13 +36,3 @@ void CoreBufferedSerial::sigio(std::function const &callback) _sigio_callback = callback; _serial.sigio(mbed::Callback {[this] { _sigio_callback(); }}); } - -void CoreBufferedSerial::enableDeepSleep() -{ - disable_input(); -} - -void CoreBufferedSerial::disableDeepSleep() -{ - enable_input(); -} diff --git a/drivers/CoreBufferedSerial/tests/CoreBufferedSerial_test.cpp b/drivers/CoreBufferedSerial/tests/CoreBufferedSerial_test.cpp index 8b8b42c391..f3160d0b09 100644 --- a/drivers/CoreBufferedSerial/tests/CoreBufferedSerial_test.cpp +++ b/drivers/CoreBufferedSerial/tests/CoreBufferedSerial_test.cpp @@ -59,20 +59,6 @@ TEST_F(CoreBufferedSerialTest, readable) // nothing expected } -TEST_F(CoreBufferedSerialTest, enableInput) -{ - coreserial.enable_input(); - - ASSERT_TRUE(spy_BufferedSerial_getEnableInput()); -} - -TEST_F(CoreBufferedSerialTest, disableInput) -{ - coreserial.disable_input(); - - ASSERT_FALSE(spy_BufferedSerial_getEnableInput()); -} - TEST_F(CoreBufferedSerialTest, sigio) { auto mock_function = MockFunction {}; diff --git a/include/interface/drivers/BufferedSerial.h b/include/interface/drivers/BufferedSerial.h index 8d191646f3..30fb6130f5 100644 --- a/include/interface/drivers/BufferedSerial.h +++ b/include/interface/drivers/BufferedSerial.h @@ -21,9 +21,6 @@ class BufferedSerial : public interface::DeepSleepEnabled virtual auto readable() -> bool = 0; - virtual void disable_input() = 0; - virtual void enable_input() = 0; - virtual void sigio(std::function const &callback) = 0; }; diff --git a/tests/unit/mocks/mocks/leka/CoreBufferedSerial.h b/tests/unit/mocks/mocks/leka/CoreBufferedSerial.h index a02b3d6d37..aa300b9a5a 100644 --- a/tests/unit/mocks/mocks/leka/CoreBufferedSerial.h +++ b/tests/unit/mocks/mocks/leka/CoreBufferedSerial.h @@ -15,8 +15,6 @@ class CoreBufferedSerial : public interface::BufferedSerial MOCK_METHOD(std::size_t, read, (uint8_t *, std::size_t), (override)); MOCK_METHOD(std::size_t, write, (const uint8_t *, std::size_t), (override)); MOCK_METHOD(bool, readable, (), (override)); - MOCK_METHOD(void, disable_input, (), (override)); - MOCK_METHOD(void, enable_input, (), (override)); MOCK_METHOD(void, sigio, (std::function const &), (override)); MOCK_METHOD(void, enableDeepSleep, (), (override));