diff --git a/drivers/Ticker.h b/drivers/Ticker.h index daa5148927..dac0f99ded 100644 --- a/drivers/Ticker.h +++ b/drivers/Ticker.h @@ -93,23 +93,6 @@ public: attach_us(std::forward(func), t * 1000000.0f); } - /** Attach a member function to be called by the Ticker, specifying the interval in seconds - * - * @param obj pointer to the object to call the member function on - * @param method pointer to the member function to be called - * @param t the time between calls in seconds - * @deprecated - * The attach function does not support cv-qualifiers. Replaced by - * attach(callback(obj, method), t). - */ - template - MBED_DEPRECATED_SINCE("mbed-os-5.1", - "The attach function does not support cv-qualifiers. Replaced by " - "attach(callback(obj, method), t).") - void attach(T *obj, M method, float t) - { - attach(callback(obj, method), t); - } /** Attach a function to be called by the Ticker, specifying the interval in microseconds * @@ -123,23 +106,6 @@ public: */ void attach_us(Callback func, us_timestamp_t t); - /** Attach a member function to be called by the Ticker, specifying the interval in microseconds - * - * @param obj pointer to the object to call the member function on - * @param method pointer to the member function to be called - * @param t the time between calls in microseconds - * @deprecated - * The attach_us function does not support cv-qualifiers. Replaced by - * attach_us(callback(obj, method), t). - */ - template - MBED_DEPRECATED_SINCE("mbed-os-5.1", - "The attach_us function does not support cv-qualifiers. Replaced by " - "attach_us(callback(obj, method), t).") - void attach_us(T *obj, M method, us_timestamp_t t) - { - attach_us(Callback(obj, method), t); - } virtual ~Ticker() { diff --git a/features/frameworks/utest/TESTS/unit_tests/case_control_async/main.cpp b/features/frameworks/utest/TESTS/unit_tests/case_control_async/main.cpp index 683eba4be4..e315e03f82 100644 --- a/features/frameworks/utest/TESTS/unit_tests/case_control_async/main.cpp +++ b/features/frameworks/utest/TESTS/unit_tests/case_control_async/main.cpp @@ -118,7 +118,7 @@ control_t await_case(const size_t call_count) TEST_ASSERT_EQUAL(1, call_count); TEST_ASSERT_EQUAL(6, call_counter++); - utest_to.attach_us(&validate1, &Utest_func_bind::callback, (1372*1000)); // Fire after 1372 ms + utest_to.attach_us(callback(&validate1, &Utest_func_bind::callback), (1372*1000)); // Fire after 1372 ms return CaseAwait; } @@ -146,7 +146,7 @@ control_t repeat_all_on_timeout_case(const size_t call_count) TEST_ASSERT(call_count <= 10); TEST_ASSERT_EQUAL((call_count-1)*3 + 9, call_counter++); if (call_count == 10) { - utest_to.attach_us(&validate2, &Utest_func_bind::callback, (50*1000)); // Fire after 50ms + utest_to.attach_us(callback(&validate2, &Utest_func_bind::callback), (50*1000)); // Fire after 50ms } return CaseRepeatAllOnTimeout(100); } @@ -181,7 +181,7 @@ control_t repeat_handler_on_timeout_case(const size_t call_count) TEST_ASSERT(call_count <= 10); TEST_ASSERT_EQUAL(call_count-1 + 40, call_counter++); if (call_count == 10) { - utest_to.attach_us(&validate3, &Utest_func_bind::callback, (50*1000)); // Fire after 50ms + utest_to.attach_us(callback(&validate3, &Utest_func_bind::callback), (50*1000)); // Fire after 50ms } return CaseRepeatHandlerOnTimeout(100); }