diff --git a/UNITTESTS/features/cellular/framework/device/athandler/athandlertest.cpp b/UNITTESTS/features/cellular/framework/device/athandler/athandlertest.cpp index 6b8b414..a48c018 100644 --- a/UNITTESTS/features/cellular/framework/device/athandler/athandlertest.cpp +++ b/UNITTESTS/features/cellular/framework/device/athandler/athandlertest.cpp @@ -25,7 +25,6 @@ #include "mbed_poll_stub.h" #include "CellularUtil_stub.h" -#include "Timer_stub.h" using namespace mbed; using namespace events; @@ -228,7 +227,6 @@ at.process_oob(); at.clear_error(); - timer_stub_value = 0; filehandle_stub_table_pos = 0; at.read_bytes(buf, 5); @@ -244,7 +242,6 @@ filehandle_stub_table = table2; at.clear_error(); - timer_stub_value = 0; filehandle_stub_table_pos = 0; mbed_poll_stub::revents_value = POLLIN; mbed_poll_stub::int_value = 1; diff --git a/UNITTESTS/features/cellular/framework/device/athandler/unittest.cmake b/UNITTESTS/features/cellular/framework/device/athandler/unittest.cmake index 060b14a..26c8058 100644 --- a/UNITTESTS/features/cellular/framework/device/athandler/unittest.cmake +++ b/UNITTESTS/features/cellular/framework/device/athandler/unittest.cmake @@ -28,7 +28,6 @@ stubs/SerialBase_stub.cpp stubs/mbed_assert_stub.cpp stubs/mbed_poll_stub.cpp - stubs/Timer_stub.cpp stubs/equeue_stub.c stubs/Kernel_stub.cpp stubs/ThisThread_stub.cpp diff --git a/UNITTESTS/platform/ATCmdParser/test_ATCmdParser.cpp b/UNITTESTS/platform/ATCmdParser/test_ATCmdParser.cpp index 535aa19..dbe81c5 100644 --- a/UNITTESTS/platform/ATCmdParser/test_ATCmdParser.cpp +++ b/UNITTESTS/platform/ATCmdParser/test_ATCmdParser.cpp @@ -23,7 +23,6 @@ #include #include "FileHandle_stub.h" #include "mbed_poll_stub.h" -#include "Timer_stub.h" using namespace mbed; @@ -110,7 +109,6 @@ at.process_oob(); expected_oob_callback = false; - timer_stub_value = 0; filehandle_stub_table_pos = 0; at.read(buf, 5); @@ -127,7 +125,6 @@ table2[4] = 0; filehandle_stub_table = table2; - timer_stub_value = 0; filehandle_stub_table_pos = 0; mbed_poll_stub::revents_value = POLLIN; mbed_poll_stub::int_value = 1; diff --git a/UNITTESTS/stubs/Timer_stub.cpp b/UNITTESTS/stubs/Timer_stub.cpp deleted file mode 100644 index 2e20c16..0000000 --- a/UNITTESTS/stubs/Timer_stub.cpp +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright (c) , Arm Limited and affiliates. - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include "Timer.h" -#include "Timer_stub.h" - -namespace mbed { - -Timer::Timer() -{ -} - -Timer::Timer(const ticker_data_t *data) -{ -} - -Timer::~Timer() -{ -} - -void Timer::start() -{ -} - -void Timer::stop() -{ - ; -} - -int Timer::read_us() -{ - return 0; -} - -float Timer::read() -{ - return 0; -} - -int Timer::read_ms() -{ - timer_stub_value += timer_stub_step; - return timer_stub_value; -} - -us_timestamp_t Timer::read_high_resolution_us() -{ - return 0; -} - -void Timer::reset() -{ -} - -Timer::operator float() -{ - return 0; -} - -} // namespace mbed diff --git a/UNITTESTS/stubs/Timer_stub.h b/UNITTESTS/stubs/Timer_stub.h deleted file mode 100644 index a97333f..0000000 --- a/UNITTESTS/stubs/Timer_stub.h +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright (c) , Arm Limited and affiliates. - * SPDX-License-Identifier: Apache-2.0 - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef TIMER_STUB_H -#define TIMER_STUB_H - - -static uint16_t timer_stub_value = 0; -static uint16_t timer_stub_step = 20; - -#endif diff --git a/drivers/Timeout.h b/drivers/Timeout.h index 52a46de..da703e9 100644 --- a/drivers/Timeout.h +++ b/drivers/Timeout.h @@ -97,9 +97,6 @@ /** Clock to use with attach_absolute, guaranteeing running only while attached or manually locked */ using clock = HighResClock; - /** Clock to use with attach_absolute, running always */ - using steady_clock = SteadyHighResClock; - /** @copydoc TimeoutBase::scheduled_time() */ HighResClock::time_point scheduled_time() const { diff --git a/drivers/source/Timeout.cpp b/drivers/source/Timeout.cpp index d890e0e..daed37e 100644 --- a/drivers/source/Timeout.cpp +++ b/drivers/source/Timeout.cpp @@ -44,9 +44,7 @@ * (In C++17 could avoid the need for this by making the members inline). */ const bool HighResClock::is_steady; -const bool SteadyHighResClock::is_steady; const bool LowPowerClock::is_steady; -mstd::once_flag SteadyHighResClock::init; const bool RealTimeClock::is_steady; #if DEVICE_LPTICKER diff --git a/rtos/ConditionVariable.h b/rtos/ConditionVariable.h index cb6e56b..d602d7c 100644 --- a/rtos/ConditionVariable.h +++ b/rtos/ConditionVariable.h @@ -28,6 +28,7 @@ #include "rtos/mbed_rtos_types.h" #include "rtos/Mutex.h" #include "rtos/Semaphore.h" +#include "rtos/Kernel.h" #include "platform/NonCopyable.h"